Skip to content

feat(members): dock the chat SidePanel beside the DM thread (first tab: Crew summary) - #9437

Merged
bolichen97 merged 1 commit into
mainfrom
feat/members-sidepanel-tabs
Sep 9, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/members-sidepanel-tabs

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

The Crew Members page's right column is a closable DetailPanel drawer (X in its header, a Details toggle in the thread header, one fixed body). The chat page's right column is the tabbed SidePanel: pinned Changes / Artifacts / Files, a + menu of further views (Summary, Pins, Issues, Links, Subagents, Workflows, Git, Side chat, Browser, per-chat Terminal — #8703), document tabs, reorder, resize, per-slot tab memory. A member DM thread is a chat slot, yet the two surfaces teach two different right-panel models. Zezhen: "这个侧边栏去掉关闭按钮,做成和 session 一样的 tab 形式,第一个 tab 是 crew summary".

Why it matters

The Members page is the perpetual-agent roster: it is where a member's patrol (#8936), the sessions it drives (#8591) and its escalations (#8614) surface. Today that surface has none of the tools a chat has beside it — no Files browser, no Terminal in the member's project, no artifacts — and it is a hand-built copy of chat infrastructure, which is the drift class this page keeps producing (drag handle, list background, steer badge, Quote/Ask were each one PR).

What changed (motivation → approach → change)

Approach: reuse SidePanel, do not build a second one. The only things the panel lacked were a way to host a page-owned first tab and a way to be permanent.

  • pages/chat/SidePanel.tsx

    • leadingTab?: { id, title, icon, render } — a host-owned tab rendered AHEAD of the pinned block as a pinned-style chip: non-closable, not a Reorder.Item, never in the + menu, body rendered by the host only while active. Its id must not collide with a TabKind ('summary' is the chat's session summary — a different thing; this one is 'crew-summary', and its icon is the member's avatar, not a kind glyph).
    • onClose becomes optional. Absent ⇒ permanent: no close control in the strip (the trailing divider goes with it) and the views' Escape does nothing. ChatPage passes it as before; the Members docked column omits it; the Members narrow-window overlay passes it.
    • extraReserveW?: number — a sibling column's live width kept clear on top of measureSidePanelReservedW() (the Members roster), so a drag can never fold the thread to nothing — the contract the drawer's reserveWidth carried.
    • TabChip accepts an icon override and a kind-less tab for the leading chip.
  • hooks/usePanelTabs.ts — usePanelTabs(slot, descriptors, { leadingId }): a fresh strip's focus is the leading tab (not the first pinned view syncPinned would otherwise pick), syncPinned never "repairs" a leading-tab focus away for not being a stored tab, and closing the last tab / closeAll lands back on it. No change without leadingId.

  • hooks/usePanelDocumentActions.ts (new, at the shared hooks layer — it is a two-host module from birth) — file open / artifact open / file save, extracted verbatim from useChatPageResourcesController (which now calls it with onOpened = reveal dock + close find pane). One implementation for both hosts, so the 404-vs-error read contract, the artifact involvement breadcrumb and the save-baseline reconcile cannot drift.

  • pages/members/MembersPage.tsx

    • DetailPanel drawer, drawerOpen, DRAWER_* and the mc-members-drawer-width key are gone. The panel is the chat SidePanel on the chat page's right-dock motion, canDockBottom={false}, slot = the member's DM slot, projectDir from the live slot (Files root / Terminal cwd), tab strip bucketed per member (usePanelTabs(memberKey, …, { leadingId: CREW_SUMMARY_TAB_ID })) so switching members swaps the strip and switching back restores it.
    • panelSitsBeside({ winW, rosterW, isMobile }) (pure, exported) decides the placement: wide enough (shell reserve + roster + gaps + panel minimum) ⇒ permanent column, no header toggle, no close; narrower ⇒ an overlay the header button opens, sliding in over a full-bleed scrim (bg-bg/60 + blur) that dims the whole chat column — no sliver of thread peeking beside the panel — and dismissed by the panel's own close control or a click on the scrim, the drawer convention. A failed document read while the overlay is open closes the overlay as the notice appears above the thread, so the failure is never hidden behind the panel that caused it. Below md is always overlay.
    • The drawer body moved into the Crew summary tab unchanged, with an identity row (avatar + name + live status) where the drawer header used to carry it. Its data reads and the patrol countdown are gated on the summary being on screen (previously on drawerOpen).
    • Failed document reads from the panel's Files / Artifacts tabs are reported above the thread through the shared ErrorNotice (askAgent; nothing there holds a draft).
  • i18n: one new key pages.membersPage.crew_summary in en.json + 12 locales, en-XA regenerated (pure-additive, 13 lines).

  • docs/feature-map/README.md: Crew Members / Monitor loops rows updated.

  • Views this host cannot feed are withheld, not shipped empty (SidePanel.hiddenViews, applied to the pinned block and the + menu alike; MEMBERS_UNFED_VIEWS): Changes / Issues / Links / Pins read ChatPage-owned transcript indexes this page does not run, so an empty Changes chip on the monitoring page would assert "nothing changed" while a member edits. The chat page's session Summary is withheld too — one click from the "Crew summary" chip it is an indistinguishable sibling label. The withdrawal is a RENDER-time filter over the bucket, never a deletion: syncPinned still receives the whole PINNED_VIEWS list, a withheld pinned view (Changes) simply is not drawn, and tabs already in the slot's bucket (a member DM opened on the chat page can have stored Pins / Issues) are neither rendered nor focused here but stay in storage for the chat page; a stored focus on such a tab falls back to the leading tab in the STRIP only — the store keeps the focus (a withdrawal can be temporary: every slot view is withheld for the moment a re-open POST is in flight, and a stored focus on Files must come back as Files) — and the panel reports what it shows through a new onActiveTabChange, which is what the Members page gates its summary reads on. The unfed set is derived, not enumerated: usePanelTabs.VIEW_DATA_SOURCE classifies every ViewKind as slot or chat-transcript (exhaustive Record, so a new view kind cannot exist unclassified) and MEMBERS_UNFED_VIEWS = [...CHAT_TRANSCRIPT_VIEWS, 'summary']. Body-owning tabs (Browser, Terminal, editors) stay MOUNTED and hidden while withheld — the body loop walks every stored tab and a withheld one is simply never active — so a temporary withdrawal cannot destroy a live WebContentsView. The persisted bucket keeps a leading-tab focus (serializeBucket only refocuses when the focused tab was itself dropped), so a reload lands on Crew summary when that is what was selected. They return when the extraction moves below ChatPage (follow-up tracked on the chat-core extraction RFC, chat-core P3: store-free seam for ChatInput so ChatEmbed no longer requires the host store #8651). Side chat is offered (MEMBERS_WITHHELD_VIEWS equals the unfed set): feat(chat): Quote / Ask on selected text in ChatPane (Members + split) #8947 moved its composer draft into the per-slot chat-core store (sideChatDrafts), so SidePanel unmounting the body on a tab or member switch loses nothing — and the selection toolbar's Ask about this on the thread lands there: openMemberSideChat focuses the panel's Side tab for the endpoint-confirmed slot only (revealing the overlay on a narrow window) and returns false otherwise so the seam never seeds a quote into a Side Chat that did not open — the drawer-hosted Side Chat feat(chat): Quote / Ask on selected text in ChatPane (Members + split) #8947 added to this page is replaced by that tab (MembersPage.sideChat.test.tsx). While the thread is unconfirmed the withheld set is likewise derived, not enumerated (MEMBERS_UNCONFIRMED_WITHHELD_VIEWS = every classified ViewKind + Terminal + app tabs), so a new view kind is withheld in that window by construction. Files / Artifacts / Terminal / Browser / Subagents / Workflows / Git work against the DM slot.

  • The panel binds only the POST-confirmed slot. The tab bucket and SidePanel.slot use activeSlot (set by POST /api/members/{slug}/thread), never the roster's derived slot_key — that key is a stale binding until confirmed, and an ordinary slot can occupy it after a restart. Until the thread is confirmed (or when the POST is refused), every slot-bound view is withheld; only the slot-free Crew summary (and Terminal, a PTY in a directory) is offered.

  • One SidePanel instance across placements. Docked and overlay share one keyed motion element (only the wrapper class and motion axis differ), so a placement flip never remounts the panel; a closed overlay stays mounted-and-hidden while a live Browser / app tab exists (shouldMountSidePanel / isSidePanelHidden, the chat page's rule). overlayOpen is reset whenever the panel docks, and a document open only reveals the overlay when the panel IS an overlay — so an open made while docked cannot pop the overlay over the thread on a later narrowing.

  • The panel is unbound for the whole in-flight window of a re-open, not just after a refusal. confirmedSlot is empty from the moment a thread POST is issued until it confirms (a request sequence makes only the NEWEST POST's answer count — an older answer, success or refusal, is dropped whole, so a stale success can never rebind a key the latest refusal unbound; nothing is lost because every open re-POSTs); the thread column keeps its cached key as a render hint, the panel offers only the Crew summary and its document actions carry no slot, so nothing can be recorded against a key the endpoint is about to refuse.

  • A refused re-open unbinds. activate always re-POSTs (the endpoint is the idempotent creator/repairer); a refusal now clears the cached slot as well as showing the error, so a key confirmed by an earlier open cannot keep the thread or any panel view aimed at a session that is no longer this member's. Terminal additionally waits for the WS slots frame that carries the confirmed slot's record (its project is the shell's cwd) — the POST answers before that frame, and a shell spawned in the gap would take the backend's HOME fallback with no re-rooting; a member with no project still gets its shell in the fallback cwd, as a project-less chat does. Until confirmation, Terminal and every app-contributed tab are withheld too (hiddenViews accepts 'terminal' and the 'app' switch) — a PTY or an AppHost opened into the provisional (no-slot) bucket would be orphaned / remounted when the strip re-keys. The feature map's App-contributed panel tabs row now names /members as a second path. openFile captures the initiating slot before awaiting the read, like saveFile already did.

  • Width is shared with the chat panel on purpose: the panel persists under the chat panel's mc-side-panel-width, so resizing it on either page resizes both. It is the same panel; one width is the consistency the request asked for. The old mc-members-drawer-width key is orphaned (a stale localStorage entry, nothing reads it).

Tests

Written, not run locally (this session's rule: tsc / eslint / i18n gate only — all green; CI runs vitest).

  • src/test/sidePanelLeadingTab.test.tsx (new): leading chip renders first, ahead of the pinned block, with the host icon and no close control, and is not in the Reorder tablist; fresh bucket focuses it (body shows); it is absent from the + menu while Terminal is offered; closing the last dynamic tab refocuses the neighbour, closeAll lands on the leading tab; no close control without onClose, one with it; focus is per slot; hiddenViews withdraws a view from the pinned block and the + menu alike.
  • pages/members/MembersPage.test.tsx: the drawer cases now assert the docked SidePanel (permanent, no Details toggle, no close control, resize splitter present); Crew summary is tabs[0], aria-selected, named, without nested buttons, CREW_SUMMARY_TAB_ID !== 'summary'; selecting Artifacts swaps the body and the chip brings the summary back; the + menu lists Terminal and not Crew summary; narrow window ⇒ closed overlay, toggle opens, close control dismisses; panelSitsBeside boundary at 1168px for a 264px roster, mobile never; the withheld set is pinned (MEMBERS_UNFED_VIEWS) and absent from strip + menu; a refused thread POST leaves only Crew summary on the strip and nothing slot-bound in the menu; an overlay opened narrow is closed again after dock → re-narrow. member-drawer test id → member-crew-summary; every existing summary-content case (config, memory disclosure, driving sessions, patrol, activity, wake sources, edit exits) is kept and re-pointed.
  • Existing sidePanelPinnedAlwaysPresent / sidePanelAddMenu contracts are unchanged (no leadingTab ⇒ identical strip).

Manual verification

Against a live pod (kirocrew pod up kc-wt-members-sidepanel --seed <dir> with a seed config of four fictional crews; real gateway, real SPA dist, real POST /api/members/{slug}/thread, no stubbed API): docked panel at 1440×900, Crew summary selected on open, no close / toggle, + menu offers Terminal, member switch swaps the strip and the summary body, Workflows opens from +, chip returns to the summary. Theme flipped through the pod's own PUT /api/config/theme.

Screenshots / video

recorded from 925acb8 · origin/kirodotdev/KiroCrew · mode: pod (kirocrew pod up, dark/light via PUT /api/config/theme) · real server + model, no fixtures

Before — closable drawer (X in header, Details toggle in the thread header):

before dark

After — the chat SidePanel docked, Crew summary as the permanent first tab, no close control:

after dark

+ menu on a member DM — the chat panel's views, Terminal included:

plus menu dark

Switch member → strip and summary follow; + → a view opens; chip → back to the summary (6.7s):

tabs follow the member

Narrow window (1000px): closed by default with the header toggle; the overlay carries the panel's own close control:

overlay closed
overlay open

Docked → overlay → docked across the panelSitsBeside boundary (window resized 1440 → 1000 → 1440; one keyed element, no remount; 6.9s):

resize flip

Not captured: the member-panel-action-error notice. I tried to force it (route-intercept /api/file-read → 500 and open a file from the Files tab), but a member DM slot in the pod has no project directory, so the Files tab has no rows to open; its render is the shared ErrorNotice already shown for the star-write failure on this page.

Light theme + before/light

before light
after light
plus menu light
overlay open light

Related Issues

Closes #9432. Builds on #8936, #8591, #8614 (summary content), #8703 (Terminal in the + menu), #8718 (state-transition continuity).

Pattern harvest

Not generalizable as a rule — but it is the same class as the week's other Members-page fixes: the Members page was hand-built by copying chat surfaces instead of mounting them, and each copy drifts (drag handle, list background, steer badge, Quote/Ask, and this drawer). This PR retires the largest copy by mounting the real SidePanel and extracting the document actions into a shared hook. The remaining copy is the left column; the follow-up "Members page: reuse ChatSidebar list infrastructure" (being filed by the React Query migration work) closes the class at its source.

Checklist

  • At most two commits (one), Conventional Commits title
  • New tests added; existing tests re-pointed (CI runs them)
  • Self-review completed
  • Documentation updated (feature map)
  • No secrets, credentials, or internal references in the diff (the GIF deliberately opens Workflows, not a real Terminal — a PTY paints the host's login/hostname into the frame)

@CrysisDeu
CrysisDeu requested review from a team and pepmach September 8, 2026 09:24
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of e910f04a43b518bd9cd58ac49f0ccf0152f2b815 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All key hunks verified against the description: the SidePanel host-API additions, the usePanelTabs leading-tab/serialization changes, the shared usePanelDocumentActions extraction (with useChatPageResourcesController now delegating to it), the MembersPage rewrite with the confirmed-slot gating, and the i18n change (the removed side_chat_draft_waiting key matches the documented drawer-Side-Chat replacement). temp-screenshots/ is an established committed-deliverable convention at the base commit. The withheld-views mechanism is derived from an exhaustive Record, the store-vs-shown focus split is deliberately reasoned and test-pinned, failure paths (refused/in-flight thread POST, PTY gap, overlay error visibility) each have a named cause, and the change is cleanly revertible (the orphaned localStorage key is acknowledged). The remaining cross-page coupling (pages/chat/ hosting a two-host component) is explicitly tracked as follow-up #8651.

Design-Verdict: PASS

Retires the drift-prone drawer copy by mounting the real SidePanel, with each new host seam given a named cause, tests, and a tracked extraction follow-up.

Suggestions

[DESIGN-REVIEWED] e910f04

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of e910f04a43b518bd9cd58ac49f0ccf0152f2b815 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All mechanical checks are done. The deleted i18n key has zero remaining consumers, DetailPanel keeps 9 other page consumers, the shared document-actions hook has 2 real consumers, and temp-screenshots/ is the documented PR-evidence convention. The review below is my final output.

First-Principles-Verdict: PASS

The description's "pure-additive" i18n claim is false — the diff also deletes side_chat_draft_waiting from 14 files; the deletion is correct, the claim isn't.

Not justified as shipped

  1. The Side-Chat draft tooltip key is deleted across 13 locales + en.context.json — undeclared: the description calls the i18n change "pure-additive, 13 lines". Grepped side_chat_draft_waiting: 0 remaining consumers, so the deletion itself is right; only the framing is wrong.

What this change ships

Inventory (10 items) — 9 justified

Intent: give a member's DM thread the same right-hand tool panel a chat has, per Zezhen's quoted request ("去掉关闭按钮…tab 形式,第一个 tab 是 crew summary") — an ADDITION with a move inside it. More than 10 differences exist (layout inset move, reload-focus persistence fix, live width tracking); the 10 most noticeable are kept.

  1. The right column is now the chat page's tabbed SidePanel, permanent (no close control) on wide windows, replacing the closable drawer — justified
  2. The drawer's member details moved into a "Crew summary" first tab with an identity row — justified
  3. The member DM gains Files, Artifacts, Terminal, Browser, Subagents, Workflows, Git and app tabs against its slot — justified
  4. Side Chat moved from a drawer view to the panel's Side tab; the draft-gated "way back" button is deleted (the persistent tab replaces it at cause level) — justified
  5. Narrow windows get an overlay over a full-bleed scrim, opened by the header button, dismissed by scrim or close — justified
  6. Changes / Issues / Links / Pins / session Summary are withheld here (no transcript indexes feed them; an empty chip would assert a falsehood) — justified
  7. Until the thread POST confirms the slot, every slot-bound view is withheld and a stale POST success cannot rebind — justified
  8. File/artifact open and save became one shared hook for both hosts (2 counted consumers; deletes a would-be second copy) — justified
  9. side_chat_draft_waiting deleted from 13 locales + context file — undeclared (described as "pure-additive")
  10. Feature-map rows rewritten for the new panel — justified (AGENTS.md same-commit doc rule)

[FIRST-PRINCIPLES-REVIEWED] e910f04

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed e910f04a43b518bd9cd58ac49f0ccf0152f2b815 — this comment is updated in place on each push.

Review details

No candidates were proposed by the discovery pass. Reading the full diff, this is a frontend refactor that docks the chat SidePanel into the Crew Members page, extracts usePanelDocumentActions, and adds leadingTab/hiddenViews/onActiveTabChange/extraReserveW seams to SidePanel, with corresponding doc, i18n, and test updates. It touches no security boundary and no blocking: true AUTOSDE-governed path. I looked for concrete, reachable defects in the changed logic — the serializeBucket dropped-focus vs. leading-tab distinction, the activeId fallback and onActiveTabChange reporting (store left untouched), the confirmedSlot/hiddenViews gating during in-flight/refused thread POSTs, the saveFile/openFile slot-capture-before-await discipline, and the removed side_chat_draft_waiting i18n key (all references removed in the same file). Nothing produces an observable wrong outcome grounded to the Step-1 bar.

No findings.

[OPUS-REVIEWED] e910f04

Verdict parsed from the review's SHA-scoped output markers for commit e910f04a43b518bd9cd58ac49f0ccf0152f2b815.

False positive or not applicable? A repository writer can comment:
/ai-review override fable e910f04a43b518bd9cd58ac49f0ccf0152f2b815: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

UX-level review of e910f04a43b518bd9cd58ac49f0ccf0152f2b815 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

Crew summary chip, + menu and overlay all read cleanly cold; the panel's icon-only chips and close glyph did not, and two new states are unshown.

Watch

  • Pinned Files/Artifacts chips are icon-only when inactive: the blind reader saw "two small grey icons… no idea what they show" (shot-03) — the PR's headline tools (Files, Artifacts) are invisible-by-name at first contact on this page, every visit, until a click. Inherited chat-panel behavior, but this page's audience meets it cold; showing icon+label while the strip has room would close it.
  • The overlay's close control was misread: "maybe pins the panel in place or switches it between floating and docked → no idea" (shot-09). The scrim click (correctly guessed) and the header toggle mitigate, but the one labeled dismiss reads as a dock toggle — narrow-window users, every overlay use.
  • Reader could not tell the + menu's "Terminal" from the sidebar's "Terminal" ("I can't tell if they open the same thing or two different terminals") — this PR introduces the second one on this page; they are different things (per-member PTY vs global page).

Evidence gaps

  • The member-panel-action-error notice (failed Files/Artifacts read reported above the thread, overlay auto-closing) appears in no screenshot — PR states why; a seeded-project pod capture would close it.
  • The Side Chat tab hosted on this page (replacement for the drawer Side Chat; the "Ask about this" landing) appears in no screenshot or recording.

Suggestions

  • The narrow-window toggle keeps pages.membersPage.details ("Details") but now opens a panel whose first tab says "Crew summary" — rename the toggle's label to match what it reveals.

[UX-REVIEWED] e910f04

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of e910f04a43b518bd9cd58ac49f0ccf0152f2b815 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] e910f04

False positive or not applicable? A repository writer can comment:
/ai-review override gpt e910f04a43b518bd9cd58ac49f0ccf0152f2b815: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 8, 2026
@CrysisDeu
CrysisDeu force-pushed the feat/members-sidepanel-tabs branch from 0282876 to 39bca34 Compare September 8, 2026 10:08
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 8, 2026
@CrysisDeu
CrysisDeu force-pushed the feat/members-sidepanel-tabs branch from 39bca34 to 5a976ac Compare September 8, 2026 10:35
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 8, 2026
@CrysisDeu
CrysisDeu force-pushed the feat/members-sidepanel-tabs branch from 5a976ac to 95cce10 Compare September 8, 2026 10:56
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 8, 2026
@CrysisDeu
CrysisDeu force-pushed the feat/members-sidepanel-tabs branch from 95cce10 to b47fd1b Compare September 8, 2026 11:17
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 8, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The "transcript views return when extraction moves below ChatPage" promise is prose only — file the follow-up (span=252e3361ca4f)

Disposition: accept-and-defer — the return of the transcript-fed views is a milestone of the chat-core extraction already tracked on its RFC issue #8651 (the P-series that moves the transcript indexes below ChatPage); the description now names that issue next to the promise so the withholding is tied to a tracked item rather than prose.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The two inactive pinned chips (Files, Artifacts) render icon-only beside "Crew summary" (span=ce48d647f886)

Disposition: accept-and-defer — inherited from the shared SidePanel strip, which renders inactive pinned chips icon-only on the chat page too; changing it here alone would make the two surfaces disagree. Belongs to a SidePanel-wide change (label-on-focus or a persistent short label), out of this PR's scope. Same ruling as span 258f2e435c30 on the previous head.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • 11 binary verification captures under a repo-root temp-screenshots/ directory enter git history (span=8d96a08aad51)

Disposition: rebutted — this is the repository's Screenshot Evidence convention: verification captures are committed under temp-screenshots/<branch>/ and pinned by SHA in the PR body so the Screenshot Evidence gate and the human reviewer can open them; every frontend PR on this repo carries them the same way (e.g. #9428's temp-screenshots/shared-drag-handle/). Dropping them would fail the evidence gate.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt 4ebc382: Request authority is bound to the tab's own captured session_key/callback_secret and re-verified per call at the gateway (McpAppFrame.tsx:459-464, 656-674 — a relay for a session other than the spool record's is refused and raises re-auth via noteStaleOwnerResponse), and the AppHost body is handed active={shown && !panelHidden} (false while withheld) with sessionKey bound to the tab's OWN slot (SidePanel.tsx:1069/1082, AppHost.tsx:60-66); the display:none toggle grants no authority, so a withheld body cannot act under the refused slot. Independently re-read on this head: the withheld case reuses the exact mounted-but-not-shown path a same-strip app tab of ANOTHER slot already takes on the chat page (shown false when tabSlot !== slot), so this PR adds no new request surface.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

AI-review override not recorded: keep the reason to 500 characters or fewer.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt 4ebc382: Request authority is bound to the tab's own captured session_key/callback_secret and re-verified per call at the gateway (McpAppFrame.tsx:459-464, 656-674 refuses stale-owner relays and raises re-auth); AppHost gets active=false while withheld with sessionKey bound to the tab's own slot (SidePanel.tsx:1069/1082); display:none grants no authority, and this is the same mounted-not-shown path another slot's app tab already takes on the chat page.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

@CrysisDeu marked the gpt AI finding as false positive, not applicable, or explicitly accepted for 4ebc382145c41dcda1f1627e455d7b252ef762e2.

Request authority is bound to the tab's own captured session_key/callback_secret and re-verified per call at the gateway (McpAppFrame.tsx:459-464, 656-674 refuses stale-owner relays and raises re-auth); AppHost gets active=false while withheld with sessionKey bound to the tab's own slot (SidePanel.tsx:1069/1082); display:none grants no authority, and this is the same mounted-not-shown path another slot's app tab already takes on the chat page.

This decision applies only to this commit. A new push requires a new judgment.

iamwhatever
iamwhatever previously approved these changes Sep 9, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docking the panel is a real improvement and DetailPanel is correctly left in place for ChannelPage, FolderPanel, SidePanel and TaskDetailPanel, so nothing is orphaned. Five things I would want fixed or disclosed before this lands, and one of them is a behaviour change the body does not mention.

  1. MembersPage.tsx:2145-2156 — connected is never forwarded to SidePanel, which defaults it to true (SidePanel.tsx:463). The page reads connected at line 644 for its own reconnect re-POST, so it tracks disconnection everywhere except the panel it now hosts; the panel's document bodies (SidePanel.tsx:1042, 1334) then assume a live socket.

  2. MembersPage.tsx:756-764 — slotRecordPresent withholds only Terminal until the WS slots frame lands. Files stays offered in that window with projectDir undefined, so SidePanel.tsx:983 renders FilesHomePanel projectDir="" — a blank browser root. Your own cwd-staleness rationale for withholding Terminal applies to the Files root for the same reason.

  3. MembersPage.tsx:1596 + 2194 — the narrow-window toggle's aria-controls="member-side-panel" points at an element that is unmounted whenever the overlay is closed with no live browser/app tab. The old drawer's labelled region is gone too: the new wrapper carries no role, aria-label or aria-modal, so the overlay is not announced as a dialog and does not trap focus. Since it renders over a dimmed scrim, it is a dialog in everything but markup.

  4. An undisclosed default flip. The body says "narrower ⇒ an overlay the header button opens", but never that 768–1167px previously opened the drawer by default — the old initializer was matchMedia('(min-width: 768px)'). For everyone in that band the right column goes from visible to hidden on upgrade, which is the kind of change that should be in the body rather than discovered from the diff.

  5. The screenshots contradict the code they exist to prove. All 11 are pinned to 925acb8, and shots 05/06 show "Side Chat" in the + menu, which MEMBERS_WITHHELD_VIEWS now withholds. The member-panel-action-error notice this PR adds appears in no capture. UX Review raised both evidence gaps and neither is closed.

Two more things worth naming plainly rather than leaving in the diff. The panel's width now persists under the chat page's own key mc-side-panel-width, so resizing it on either page resizes both, and the previously saved members drawer width is discarded. And at wide widths the user can no longer dismiss the right column to give the thread full width — only shrink it to 320px. UX Review raised that and you rebutted it as the requested design, which is exactly the call that belongs to the repo owner rather than to either of us.

One process note, not a defect: the GPT 5.6 lane on head 4ebc382 reads "human override accepted", not PASS, because you issued /ai-review override gpt on this head yourself. So the only line-level correctness lane has no model verdict for the commit under review — worth the owner knowing before approving. CI is otherwise green (62 SUCCESS, 5 fork-only skips) and mergeable reports UNKNOWN, so it needs a re-check before any merge.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The unconfirmed/refused-window withheld set is enumerated, not derived (span=8bcf83093425)

Disposition: fixed in 691dc47 (carried on 4ebc382, rebase-only).

MEMBERS_UNCONFIRMED_WITHHELD_VIEWS is now derived from VIEW_DATA_SOURCE (every classified ViewKind + 'terminal' + 'app') and the !confirmedSlot branch uses it; MembersPage.test.tsx pins the set against the classification, so a new ViewKind is withheld in that window by construction, the same guarantee the unfed set already had.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Extract the slot-binding state machine as a useConfirmedSlotBinding hook (span=cb5cdff3c2ce)

Disposition: accept-and-defer — agreed on the shape, deferred until a second host exists to drive the extraction; extracting it speculatively inside this PR would widen the diff without a consumer to test the seam against. Tracked as a follow-up when the next SidePanel host lands.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Wide windows lose the drawer's one-click dismiss: the docked panel renders no close control (span=84ae7cb749bd)

Disposition: rebutted — this is the requested design, not an omission: the maintainer asked for the panel to dock beside the thread as a permanent column on wide windows with no close control (the Crew-summary tab is not closable), mirroring the chat page's own docked SidePanel, which likewise has no close control when it sits beside the transcript. Width is recoverable by dragging the divider, the same affordance the chat page offers. The maintainer rules if this should change.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The inactive pinned chips (Files, Artifacts) are icon-only squares (span=258f2e435c30)

Disposition: accept-and-defer — inherited from the shared SidePanel strip, which renders inactive pinned chips icon-only on the chat page too; changing it here alone would make the two surfaces disagree. Belongs to a SidePanel-wide change (label-on-focus or a persistent short label), out of this PR's scope.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Narrow-window toggle still carries pages.membersPage.details ("Details") while it now opens the tabbed side panel (span=08766b841a31)

Disposition: accept-and-defer — agreed the label should name what it reveals; it is a new i18n key across 13 locales plus the pseudolocale, deferred to a copy follow-up rather than folded into a PR already in its review-ready rebase cycle. The maintainer may name the word.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The description claims Side chat "works against the DM slot," but MEMBERS_WITHHELD_VIEWS adds 'side' (span=32423fc5453f)

Disposition: fixed — on this head the two agree again: after the rebase over #8947 (which moved the Side Chat draft into the per-slot chat-core store) Side chat is offered (MEMBERS_WITHHELD_VIEWS equals the unfed set) and is the landing for the selection toolbar's Ask; the description says so.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The "transcript views return when extraction moves below ChatPage" promise is prose only — file the follow-up (span=252e3361ca4f)

Disposition: accept-and-defer — the return of the transcript-fed views is a milestone of the chat-core extraction already tracked on its RFC issue #8651 (the P-series that moves the transcript indexes below ChatPage); the description now names that issue next to the promise so the withholding is tied to a tracked item rather than prose.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The two inactive pinned chips (Files, Artifacts) render icon-only beside "Crew summary" (span=ce48d647f886)

Disposition: accept-and-defer — inherited from the shared SidePanel strip, which renders inactive pinned chips icon-only on the chat page too; changing it here alone would make the two surfaces disagree. Belongs to a SidePanel-wide change (label-on-focus or a persistent short label), out of this PR's scope. Same ruling as span 258f2e435c30 on the previous head.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • 11 binary verification captures under a repo-root temp-screenshots/ directory enter git history (span=8d96a08aad51)

Disposition: rebutted — this is the repository's Screenshot Evidence convention: verification captures are committed under temp-screenshots/<branch>/ and pinned by SHA in the PR body so the Screenshot Evidence gate and the human reviewer can open them; every frontend PR on this repo carries them the same way (e.g. #9428's temp-screenshots/shared-drag-handle/). Dropping them would fail the evidence gate.

…b Crew summary

The Members page's right column was a closable DetailPanel drawer — a
hand-built lookalike of the chat page's right column. It is now the chat
page's own tabbed SidePanel, permanent on wide windows (no close control,
no header toggle), whose first tab is the member's Crew summary carrying
what the drawer showed (identity + status, counters, driving sessions,
auto patrol, recent activity, wake sources, configuration, memory note,
edit exits). The + menu is the chat panel's (Files / Artifacts / Terminal
/ Browser / Side chat …) against the member's DM slot; the strip is
bucketed per member so it follows the roster selection.

SidePanel gains `leadingTab` (a host-owned, non-closable, non-draggable
tab ahead of the pinned block whose body the host renders), an optional
`onClose` (absent ⇒ no close control, Escape inert) and `extraReserveW`
(a sibling column's live width kept clear on drag). `usePanelTabs` takes
`opts.leadingId` so a fresh strip opens on the leading tab and an emptied
strip falls back to it. File / artifact open and file save move out of
useChatPageResourcesController into the shared `usePanelDocumentActions`
so both hosts run one implementation. Narrow windows (roster + thread +
panel cannot seat) keep the panel as an overlay the header button opens.

Closes #9432

Review round 1 (GPT): no agent hand-off on the panel read-error notice (the ChatPane below holds the DM draft as unsaved local state); Side chat withheld on this page until its composer draft persists or SidePanel keeps its body mounted (MEMBERS_WITHHELD_VIEWS, test-pinned).

Review round 2 (GPT): the panel binds to the member slot record only from the CURRENT snapshot (slotsLoaded) and only when it is the member's own (mode === member), so a record left over across a reconnect can never root Files / Terminal in a pre-restart project (test-pinned).

Design round: the unconfirmed-window withheld set is derived from VIEW_DATA_SOURCE (every classified view + terminal + app) instead of enumerated, so a new ViewKind is withheld there by construction; test pins it against the classification.

Rebased over #8947 (Quote / Ask on selected text): the drawer-hosted Side Chat main added is replaced by the panel's own Side tab — `openMemberSideChat` focuses it (revealing the overlay on narrow windows) for the confirmed slot only — and Side chat is offered again, since #8947 moved its composer draft into the per-slot chat-core store (the unmount-loss reason it was withheld for is gone). MembersPage.sideChat.test.tsx rewritten for the panel.

Fix-up: the Side tab is a dynamic tab (title as text, no aria-label) so the sideChat tests read it by accessible name; the drawer-only `side_chat_draft_waiting` key is removed from every catalog (dead-keys ratchet).
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The unconfirmed/refused-window withheld set is enumerated, not derived (span=8bcf83093425)

Disposition: fixed in 691dc47 (carried on 4ebc382, rebase-only).

MEMBERS_UNCONFIRMED_WITHHELD_VIEWS is now derived from VIEW_DATA_SOURCE (every classified ViewKind + 'terminal' + 'app') and the !confirmedSlot branch uses it; MembersPage.test.tsx pins the set against the classification, so a new ViewKind is withheld in that window by construction, the same guarantee the unfed set already had.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Extract the slot-binding state machine as a useConfirmedSlotBinding hook (span=cb5cdff3c2ce)

Disposition: accept-and-defer — agreed on the shape, deferred until a second host exists to drive the extraction; extracting it speculatively inside this PR would widen the diff without a consumer to test the seam against. Tracked as a follow-up when the next SidePanel host lands.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Wide windows lose the drawer's one-click dismiss: the docked panel renders no close control (span=84ae7cb749bd)

Disposition: rebutted — this is the requested design, not an omission: the maintainer asked for the panel to dock beside the thread as a permanent column on wide windows with no close control (the Crew-summary tab is not closable), mirroring the chat page's own docked SidePanel, which likewise has no close control when it sits beside the transcript. Width is recoverable by dragging the divider, the same affordance the chat page offers. The maintainer rules if this should change.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The inactive pinned chips (Files, Artifacts) are icon-only squares (span=258f2e435c30)

Disposition: accept-and-defer — inherited from the shared SidePanel strip, which renders inactive pinned chips icon-only on the chat page too; changing it here alone would make the two surfaces disagree. Belongs to a SidePanel-wide change (label-on-focus or a persistent short label), out of this PR's scope.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Narrow-window toggle still carries pages.membersPage.details ("Details") while it now opens the tabbed side panel (span=08766b841a31)

Disposition: accept-and-defer — agreed the label should name what it reveals; it is a new i18n key across 13 locales plus the pseudolocale, deferred to a copy follow-up rather than folded into a PR already in its review-ready rebase cycle. The maintainer may name the word.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The description claims Side chat "works against the DM slot," but MEMBERS_WITHHELD_VIEWS adds 'side' (span=32423fc5453f)

Disposition: fixed — on this head the two agree again: after the rebase over #8947 (which moved the Side Chat draft into the per-slot chat-core store) Side chat is offered (MEMBERS_WITHHELD_VIEWS equals the unfed set) and is the landing for the selection toolbar's Ask; the description says so.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The "transcript views return when extraction moves below ChatPage" promise is prose only — file the follow-up (span=252e3361ca4f)

Disposition: accept-and-defer — the return of the transcript-fed views is a milestone of the chat-core extraction already tracked on its RFC issue #8651 (the P-series that moves the transcript indexes below ChatPage); the description now names that issue next to the promise so the withholding is tied to a tracked item rather than prose.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • The two inactive pinned chips (Files, Artifacts) render icon-only beside "Crew summary" (span=ce48d647f886)

Disposition: accept-and-defer — inherited from the shared SidePanel strip, which renders inactive pinned chips icon-only on the chat page too; changing it here alone would make the two surfaces disagree. Belongs to a SidePanel-wide change (label-on-focus or a persistent short label), out of this PR's scope. Same ruling as span 258f2e435c30 on the previous head.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • 11 binary verification captures under a repo-root temp-screenshots/ directory enter git history (span=8d96a08aad51)

Disposition: rebutted — this is the repository's Screenshot Evidence convention: verification captures are committed under temp-screenshots/<branch>/ and pinned by SHA in the PR body so the Screenshot Evidence gate and the human reviewer can open them; every frontend PR on this repo carries them the same way (e.g. #9428's temp-screenshots/shared-drag-handle/). Dropping them would fail the evidence gate.

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: a member DM thread is a chat slot, so it should get the chat page's tabbed SidePanel rather than a second right-column model. Readiness and CI verified on this head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[insider] Members detail pane: replace the closable drawer with the chat SidePanel tab model (first tab: Crew summary)

4 participants