Repository navigation
feat(viewer): show the session id and project name on each viewer - #422
Merged
Merged
Conversation
The native viewer takes a --label with the session id and the project folder name. It shows the label in the window title and as a pill on the thumbnail, cut with an ellipsis when it is too wide. The browser fallback gets the same title and thumbnail label from the URL fragment. A live test runs two native viewers for two sessions and checks that expanding, collapsing and closing one leaves the other unchanged. Closes #367
…adable in any script
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With two sessions open, every viewer had the same generic title and its thumbnail sat in the same corner, so the user could not tell which window showed which agent.
Each viewer now shows its session id and project folder name, such as
desk-1a2b3c · my-app. Sessions have no name of their own, so the project folder is the name. The window title is<label> · Pickforge viewer. The thumbnail draws the same label in a small pill at the top-left, above the attention banner when an agent asks for help. A long folder name ends with an ellipsis, so the id stays visible. Characters the viewer's embedded font cannot draw, such as CJK, become an ellipsis on the thumbnail; the title keeps the full name. The label is hidden in expanded and control modes, where the title is enough.The host builds the label and strips control, format and bidi characters from the folder name. The native viewer gets it through a new optional
--labelargument and strips the same characters. The browser fallback viewer gets it in the URL fragment after the capability token, keeps it in sessionStorage with the token, and sets it as text only; the bridge, its token checks and the Content Security Policy are unchanged. The browser page title is now "Pickforge viewer", like the native one.The README now says how
watchpicks a session without--session, how to choose one with--session <id>, and that a project can have one live browser session at a time.Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol (high). Sol verdict: approved.
Final review by Fable 5.1 (high), 2 rounds: approved. Round 1 found the attention banner covering the label, also found by Sol, and the font gap; both are fixed. Declined nits: a source check against
innerHTMLin the page test stays as a cheap guard for an untrusted folder name; a double ellipsis when a cut lands right after a replaced run, and a hidden banner on thumbnails under about 100 px tall (only with a non-default--thumbnail-width; the help request also expands the viewer).Closes #367
desk-… · alpha · Pickforge viewer; full CJK name in the title~/.pickforge/investigations/367/titles.txt,titles-review.txt,browser-title.txt01-two-thumbnails.png,02-long-name-thumbnail.png,06-browser-thumbnail.png,07-request-expands-a-cjk-name-on-b.png,08-collapsed-a-label-above-banner.pngnative-viewer-live.test.ts;03,04,05,geometry.txt,after-close.txtwatchtarget.tsanddevtools-mcp.ts--sessionwith one, two or no sessions;--sessionfrom another projectREADME.mdwatch and session sections&,#in the fragment; text set withtextContentviewer-launch.test.ts,args.rstests,test/securitydocs/releases/UNRELEASED.mdstill holds the tagged 0.7.1 notesRelease note for the next version: "Each viewer shows its session id and project folder name in the window title and on the thumbnail, so two open viewers are easy to tell apart. (#367)"
QA ran on private Xvfb host displays with
WAYLAND_DISPLAYunset; the scripts and logs are in~/.pickforge/investigations/367/.Follow-ups: #421 draws banner and label text in scripts the embedded font lacks. #420 is a Chrome profile test flake seen in the full suite.
Checks: cargo fmt, clippy with
-D warningsandcargo test -p pickforge-viewer(117 tests);bun run build,typecheck,lint; 18 viewer, browser session and security suites (336 tests) after the rebase on main;bun run test:coveragewith the CI environment variables before the review fixes, with one unrelated failure (#420); PickCheck (no new or worsened functions).