Repository navigation
feat(studio): add session inspection panels and minimap - #1942
Conversation
9c0824c to
fd79128
Compare
5d598cf to
9789340
Compare
Update the landed Studio chat AC1.1 under the directing human’s explicit #1942 authorization. The inventory keeps inspect-only rows for the separate read-only group while preserving cursor-loop incompleteness, and the proof points to the existing test. Co-Authored-By: OpenAI Codex <[email protected]> Signed-off-by: Samuele Verzi <[email protected]>
Update the landed Studio chat AC1.1 under the directing human’s explicit #1942 authorization. The inventory keeps inspect-only rows for the separate read-only group while preserving cursor-loop incompleteness, and the proof points to the existing test. Co-Authored-By: OpenAI Codex <[email protected]> Signed-off-by: Samuele Verzi <[email protected]>
c41ce33 to
ad35306
Compare
ad35306 to
afad0c2
Compare
peppescg
left a comment
There was a problem hiding this comment.
Reviewed afad0c2e6 statically across the BFF/contracts, web chat core, tests/e2e, and user docs. The code looks solid, with no code-level blockers. The one blocker is process.
Blocker
CI has never run on the current head. gh pr checks 1942 shows only Vercel. The last CI/perf/Deslop runs are on ad353061a from Sep 29, so the "CI passed Studio, lint, race…" line in the description refers to an older commit. This head is today's rebase onto main, which includes #2143 and touches the same side-thread-panel.tsx / chat-workspace.tsx. It needs a green CI run before merge. An empty push or a close/reopen should trigger it. The branch merges cleanly with main and is 1 commit behind (proto comments only).
Verified OK
- #2143 survived the rebase.
VerdictLedger, theviewedSessionIdlate-verdict guards, thecontrolPendingreset,messageOwnsApproval/unmatchedApprovals, and the verdict error prefix are all intact.side-thread-panel.tsxonly moves its frame intoSidePanelShell. - BFF inspection routes. They run per request under
runWithCredential. Anonymous requests get 401, and foreign or unknown sessions get 404.no-storeapplies to 200s and to early 401/503s.PlacementMetadataexposes no paths or selectors, error details are fixed strings, and?root=is rejected. The tests assert all of this. - Inspect-only sessions are read-only. They have no composer, run, or verdict controls. Transcript and queue queries are gated on proven chats. Folder, rename, and delete are hidden for them, and they are excluded from keyboard navigation and from the latest-chat pick.
- Escape priority. Selection and a pending ask take precedence over closing the panel through
escapeManagedExternally. - Selector cache. It is evicted on view change and on unmount, and a rejected selector triggers a relist.
- Existing tests. None were weakened. The changes are fixture extensions and the "Close preview" → "Close panel" relabel. The Escape coverage moved to
delegation-workspace.test.tsx. - User docs. The new
studio.mdsections match the UI labels.
Should-fix
apps/server/src/routes/chat.ts:873(successorFailure). When a selector is present, genericinvalid_argumentis mapped toplacement_selector_invalid("relist worktrees"), and genericfailed_preconditiontoplacement_selector_stale. Scenario: a Fork with a selector while a live run owns control, or with an invalid model/effort. The user is told to relist worktrees, which is misleading. Suggest mapping only the explicitplacement_selector_*codes and letting the rest fall through to the standard handler.apps/web/e2e/message-minimap.spec.ts:98-105is likely flaky.scrollToTranscriptRowusesbehavior: "smooth". The poll passes as soon asscrollTop < 200, then the test immediately asserts that row 1 sits within 2px of the scrollport top. That can fail mid-animation, for example atscrollTop150. Suggest polling forscrollTop <= 2, or settingreducedMotion: "reduce"and honouring it.- The PR description is stale.
- It says the PR is stacked on #1939 and targets the plan branch, but the base is now
main. - It cites an amendment to
docs/acceptance/studio-chat.md, but that directory no longer exists. The branch touches nodocs/path, so this is fine code-wise. - It lists the AC4.2 "guarded draft clear" ship blocker owned by #1848. #1848 is closed and draft clear is on main (
chat-escape.ts), so that blocker appears resolved. - The Verification section describes older commits.
- It says the PR is stacked on #1939 and targets the plan branch, but the base is now
Nits
side-panel-shell.tsx:61-69: the focus effect re-runs when the panel switches between file and activity, which causes a brief focus flicker to the outer opener.thread-map.ts:readThreadAssociationswrites storage during a read (the v1 migration). It is bounded, but it is a side effect in a read path.- Per-parent keys are never pruned for deleted sessions.
void readThreadAssociations(...).then(...)has no.catch.
threadKeyForMessage/parseThreadMaparen't dead code, only unused outside the module. Dropping theirexportwould be enough.
I'll approve once CI is green on the head, assuming nothing new shows up.
|
@kantord you need to push an empty commit to trigger the ci, I don't know this happened honestly |
Adds capability-gated session inspection (soul, worktree-selected fork and clear), inspect-only session rows, a message minimap with occurrence-scoped reply threads, and a shared responsive side-panel frame hosting previews, canvas, threads, activity, and authorization review. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…imap e2e Generic invalid_argument/failed_precondition on a selected successor no longer report placement_selector_* problems, and the picker relists only on a placement_selector_* code. The minimap e2e now waits for the smooth scroll to settle, thread-association reads handle rejection, and chat-approval fixtures carry the proven-chat capability. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
afad0c2 to
d65cd9c
Compare
|
@peppescg thanks, the push did trigger CI. I rebased onto the latest Changes since your review:
Locally, Biome, typecheck, the server and web unit tests (182 and 651), the generated-contract drift check and the full Playwright suite all pass. I left the focus-flicker and storage-in-read nits as follow-ups. Could you review again and approve if CI is green? 🙏 Fully or partially written by an AI agent. |
Tracking: #1850
Stage and baseline
Implementation, stacked on Plan / Interface PR #1939. The implementation starts from proposed plan commit
5068018c2c8d585cb5ade93253bb1abd42eceddcand targetsplan/studio-session-inspection-panels. #1939 is open, so no merged approved baseline exists yet. The directing human explicitly requested this early stacked PR. Merge #1939 before this PR.Current implementation candidate:
c41ce33c2c13022457157716a278389c855cc4e1. The plan remains proposed in this stack.Included
Interface conformance and dependencies
Interfaces match the proposed #1939 contract: Yes. There is no approved contract yet. The branch adds no gRPC/protobuf, exported Go API, tool schema, CLI/config, daemon event, server persistence, trust, or placement decision. Credentials and physical placement paths stay out of BFF-generated public fields and error details.
The directing human explicitly authorized a direct amendment to the older, landed
docs/acceptance/studio-chat.mdAC1.1 in #1942 on 2026-09-27. That amendment includes inspect-only inventory rows for #1850's separate read-only group, retains the cursor-loopcomplete: falserule, and points to the existingincludes inspect-only sessions and reports an incomplete inventory on a cursor loopproof. It changes no other acceptance criterion or interface. The authorization and direct-route override are recorded in the run record.#1885 and its implementation #1907 have merged. Their
SessionActivityContentis hosted in the shared frame, while the activity-local Escape handler has been removed in favor of the workspace priority. AC4.3's activity seam has been reconciled with mounted and browser proofs. AC4.2 remains provisional: the approved #1848 plan owns layered Escape and approval behavior; merged #1909 supplied authorization review and exact control prerequisites but explicitly left guarded draft clear and other browser interactions for later #1848 work. Final acceptance requires that browser integration and #1939's approval before this PR merges.Verification
task studio:typecheck, scoped Biome, andtask studio:generated-checkpassed.task site:build, and user docs checks passed on the prior candidate; the rebased plan passedCGO_ENABLED=0 task docs. Committed diff checks passed.CGO_ENABLED=0 task docs, andgit diff --check. Integrated AC1.1 behavior and the amended proof were revalidated.Human review and merge remain separate steps.