Skip to content

feat(chat): Quote / Ask on selected text in ChatPane (Members + split) - #8947

Merged
iamwhatever merged 1 commit into
mainfrom
feat/chatpane-selection-quote-ask
Sep 9, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
feat/chatpane-selection-quote-ask

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Selecting text in a Crew Members thread (and in a split-view pane) offered Copy only. AssistantMessage draws the selection actions its host hands it (useSelectionActions(onQuote, onAsk), AssistantMessage.tsx:212), and ChatPage was the only host passing onQuote/onAsk — Quote's FlyingQuote-into-composer and Ask's open-/side-and-seed were ChatPage-local.

This PR extracts both into one chat-core seam and wires ChatPane to it, so the Members page and split view get Quote / Ask about this / Copy with the same behaviour as the main chat. No second implementation is left behind.

The seam — website/src/chat-core/composer/

  • selectionActions.ts — useSelectionQuoteAsk({ slot, setInput, revealComposer, openSideChat }) → { onQuote, onAsk, quoteFlight, endQuoteFlight }. Hosts hand it only what they own: the composer draft, how to bring the composer into view after a quote, and how to bring a Side Chat surface on screen (openSideChat absent = no Ask; no slot = no Ask; an opener that returns false refused, and the selection is then not seeded; an opener that must re-bind the page first returns a Promise of that verdict and the seed waits for it). chat-core imports nothing from pages/.
  • quoteDraft.ts — quoteIntoDraft(prev, text), the one blockquote shaping for the main composer, a pane's composer and the Side Chat seed (three copies collapsed).
  • sideChatDrafts.ts — the per-slot Side Chat draft store, in-memory and subscribable (useSideChatDraft(slot) via useSyncExternalStore). It is the one place a Side Chat's unsent text lives: typing, a failed request handing its text back, and Ask's seed all write it. The seed is a store write (seedSideChatDraft(slot, selection) appends the blockquote and bumps a seedTick), not an event fired at the panel — a store entry waits for the panel to mount and read it, so a Side Chat that comes up a frame late (after switchSlot, a tab open and a drawer transition) still finds the selection where an event would have fired unheard. SideChat keeps only the focus nudge (caret after the quote) keyed on seedTick.

Wiring

Host Quote lands in Ask opens
ChatPage (unchanged behaviour) main composer + FlyingQuote activity panel side tab (openActivityToTab('side'))
ChatPane in split view (SessionGridView) the pane's own composer + FlyingQuote ChatPage's opener: switchSlot(paneSlot) if it is not the active slot (the panel — and its SideChat — is bound to the active slot), awaited — the side tab opens and the seed lands only once the switch succeeded and that pane is still the active slot (a switch overtaken by a later one reports false, like the slice ignores its stale fulfilment); a rejected switch (pane session gone) reports false, seeds nothing and surfaces pages.chatPage.side_chat_pane_gone through the page's ErrorNotice. Split mode is not left.
ChatPane on the Members page the thread composer + FlyingQuote the detail drawer, switched to a Side Chat view bound to the member's slot (<SideChat slot={memberSlot}/>), with a "Details" header action back and close resetting the view
  • app-sdk: ChatMessageList / MessageRenderContext gain onQuote / onAsk; the default assistant row passes them through (same shape as onFileOpen). ChatPane therefore needs no renderer override.
  • SideChat: runs its composer in controlled mode against sideChatDrafts and subscribes to it; no event listener, no mount poll, no DOM probe. data-side-chat-slot on the composer wrapper remains as a test / capture-harness hook only.
  • ChatPage.tsx: limited to consuming the hook (logic-equivalent; the deleted handleQuote/handleAsk bodies are the hook, byte-for-byte in behaviour) plus threading the one-prop opener into SessionGridView.
  • User-visible copy (round 13): the selection toolbar's Ask button is relabelled "Ask about this" (was "Ask in Side Chat"; components.selectionToolbar.ask, all 13 catalogs + en-XA regenerated) and gains a hint, components.selectionToolbar.ask_hint — the hover tooltip AND the button's accessible description (aria-describedby → a visually-hidden sibling node), so keyboard and screen-reader users get it too — saying where the question lands and that pressing the button sends nothing. The Members drawer's draft-gated Side Chat header action gains a tooltip, pages.membersPage.side_chat_draft_waiting. Everything else reuses pages.chat.sidePanel.menu_side ("Side Chat") and pages.membersPage.details. Translator context for all three keys is in en.context.json.
  • Deliberate global restyle — the Side Chat composer band is tinted on EVERY Side Chat (SideChat.tsx: border-t border-accent/30 bg-accent/5), including the main chat's right-panel Side Chat, not only the Members drawer. The hazard it answers — an off-record composer next to a live one, same send arrow — exists on the main chat too (side panel open beside the main composer, or beside a split pane), and Side Chat is one component on every surface; scoping the tint to one host would make the same panel read differently depending on where it is docked.
  • Members drawer navigation: from the details view a Side Chat header action appears whenever the member's Side Chat holds an unsent draft, so checking details or closing the drawer mid-question is not a one-way door (re-selecting text would append a second quote). Ask swaps the drawer's content (details → Side Chat) rather than opening a second panel — the page has exactly one aside, and a member thread is a narrow three-column layout with no room for a fourth. The swap is a 120 ms crossfade keyed on the view (AnimatePresence mode="wait", initial={false} so the drawer's own mount animation is not doubled), the header title changes to "Side Chat", a Details header action is the way back, closing the drawer forgets the view, and switching members returns to details. Recording below.
  • Side Chat drafts survive the panel unmounting (chat-core/composer/sideChatDrafts.ts, in-memory, per slot, subscribable): every host unmounts SideChat through a control beside its composer — another activity tab, the Members drawer's Details, closing it, switching members — and the draft used to die with each. send clears it through the same path; a failed submit or failed queued edit restores into the slot the request was FOR (restoreDraftTo(vars.slot)), whichever slot the panel shows by then. In-memory on purpose: a Side Chat is never persisted, so its draft should not outlive the page either. integration/setup.ts resets the store per test (same rule as the Pierre staging reset).

Relationship to feat/members-chat-steer-only (parallel PR)

Branched from origin/main, not stacked. Overlap is limited to the <ChatPane …/> mount line in MembersPage.tsx (both add one prop) and the ChatPane.tsx import block / <ChatInput> neighbourhood. None of that PR's steer/composer/busyMode logic is touched. Whichever lands second keeps both props on the mount line.

ChatPane vs ChatPage — remaining interaction gaps (list only, not fixed here → P3 / P5 backlog)

Props ChatPage passes to AssistantMessage that the SDK's default assistant row (what ChatPane, and so Members + split view, renders) does not:

Capability Props ChatPage passes, ChatPane lacks
Open chips: folder / artifact / session links onFolderOpen, onArtifactOpen, onSessionOpen, sessions, activeSession
File-change chips → diff viewer onOpenDiff, fileChipStyle, artifactPaths
Regenerate + variant navigation onRegenerate, onSwitchVariant, isRegenerating (variants/variantIdx ARE passed, so the arrows render inert)
Fork / plan-from-here onFork, onPlanFromHere, forkIndex, forkMessageId
Load earlier messages inline onLoadEarlier, loadingOlder, earlierRemaining (the pane uses its own "earlier messages → open session" row instead)
Speak (TTS) onSpeak
Apply plan onApplyPlan, planTaskId
Pin / unpin message pinned, onTogglePin
Share card + link previews shareEnabled, prevUserText, linkPreviews
Identity for footer actions messageTs, slotKey, slotTitle, mode

Also outside AssistantMessage: the pane's user row is the SDK default (no onEditResend / edit-and-resend; the parallel PR is adding its own user override for steer chrome), and the pane has no mcp_oauth/plan orchestrator dispatch beyond what the registry carries (#5893). These are the P3 "composer/row capability" seams still to thread; this PR threads exactly one (selection actions) and deliberately nothing else.

Tests (written, not run locally per task rules — CI runs them)

  • src/test/selectionActions.test.tsx — quoteIntoDraft shaping/stacking, sideSeedTargets, seedSideChat waits for the named slot's composer (old-slot composer present ≠ satisfied), mount-wait exhaustion still dispatches, hook offers Ask only with an opener, Quote appends + one flight, Ask opens for THIS slot + seeds by slot + leaves the draft alone.
  • src/test/ChatPane.selectionActions.test.tsx — the pane hands AssistantMessage onQuote always / onAsk only with openSideChat; Quote lands in the pane composer with the flight; stacking; Ask calls openSideChat(paneSlot) and the seed names the pane slot, draft untouched.
  • src/pages/members/MembersPage.sideChat.test.tsx — the page hands the pane an opener; Ask swaps the drawer to the member-slot Side Chat titled "Side Chat"; Details returns; close forgets the view.
  • src/test/SelectToAsk.test.tsx (+1) — SideChat takes a seed naming its slot, ignores one naming another, marks its composer with data-side-chat-slot.
  • src/test/ChatPageMoreCoverage.test.tsx — existing Quote/Ask regression pins unchanged; the Ask pin additionally asserts the seed names the active slot.

Screenshot evidence

Real components in the capture entries, genuine triple-click selections, every frame state-asserted by the harness scripts (all frames OK):

Members page — website/scripts/capture-members-selection-quote-ask.mjs

01 — toolbar over a member reply: Quote / Ask about this / Copy toolbar
02 — Ask: drawer became the member's Side Chat (tinted composer band), seeded with the selection; thread composer empty ask
03 — Quote: selection in the thread composer as a blockquote; drawer stays on details quote
04 — recording: the drawer's details → Side Chat crossfade on Ask, and Details back 04-drawer-details-to-side-chat.webm
05 — back on Details after an Ask: the header carries the draft-marked Side Chat action (data-testid="member-drawer-side-chat", absent while the Side Chat holds nothing) return

Split view (selection made in the NON-active pane, pane-b) — website/scripts/capture-chatpane-selection-quote-ask.mjs, on the shared prepareSplitChatPage fixture

1 — toolbar in the non-active pane: Quote / Ask about this / Copy split toolbar
2 — Ask from pane-b: the page re-bound to pane-b (sidebar highlight moved to Release checklist), Side tab opened, pane-b's Side Chat seeded; split mode kept; both pane composers empty split ask
3 — Quote from pane-b lands in pane-b's own composer; pane-a untouched split quote

Round 1 (head 75bf525a9, rebased onto origin/main @ #8951)

  • GPT F1 (security, fixed): the Members drawer's Side Chat now mounts only on the endpoint-confirmed activeSlot (never the roster slot_key), and openMember resets the drawer view to details on member switch — a slug-collided member can no longer inherit a Side Chat bound to a rejected key. Two new tests pin both halves (MembersPage.sideChat.test.tsx).
  • GPT F3 (fixed): docs/feature-map/README.md Side chat + Crew Members rows carry the new reach paths.
  • GPT F2 (rebutted, disposition posted): max-two-buttons-per-row on the selection toolbar — the diff adds no markup to that row; useSelectionActions already renders Quote / Ask / Copy for ChatPage on main (grandfathered). ChatPane merely stops withholding the two callbacks the shared component takes.
  • UX Watch 1 (implemented): Side Chat composer band is now tinted (border-accent/30 bg-accent/5) so the off-record composer reads differently from the live thread composer at a glance.
  • UX Watch 2 (verified perceivable): split-view Ask's switchSlot is visible as the sidebar highlight moving to the pane's session + the panel header (frame 2 above); split mode is kept. Restoring the prior slot on close was rejected — it would fight a later explicit selection and the grid's own onCollapse already uses the same switch.
  • UX Evidence gap (closed): split-view frames above.
  • UX Suggestion ("MCPs" wording): pre-existing shared string on the main chat's Side Chat; deferred with a tracked issue.
  • Automated Rule Check: test cleanup uses replaceChildren(), not .innerHTML.
  • Frontend Tests (3) / Coverage cascade: deadKeys ratchet red was main-inherited (fixed on main by fix(i18n): drop the dead pages.chatPage.dismiss_upload_error key #8951; this head is rebased onto it).

Round 2 (head c0ebaf8d7, rebased onto origin/main @ #8927)

  • First Principles Watch 1 (declared): the composer tint is a deliberate global restyle — see the Wiring bullet above.
  • First Principles Watch 2 / Subtraction (fixed): the slot-less seed compatibility branch is gone — SideSeedDetail.slot is required, sideSeedTargets / sideChatComposerFor have no "any Side Chat" arm, and the hook offers no Ask without a slot. Tests updated (selectionActions.test.tsx, SelectToAsk.test.tsx: a seed naming no slot is ignored).
  • UX Watch (fixed): the drawer's details ↔ Side Chat swap is a crossfade keyed on the view; rationale in the Wiring bullet above.
  • UX Evidence gap (closed): recording 04 above, produced by the Members harness.
  • UX Suggestion (fixed): both harnesses wait out the toolbar's mount animation before the frame; all six stills re-shot.
  • Readiness red on 75bf525a9: a PR-body edit after the GPT lane had posted re-triggered the lane and its newest run was cancelled by concurrency, which readiness reads as a failure — re-ran that run (green). This head's body edit landed before the push so the push supersedes it.

Round 3 (head c7f3a6d8e)

  • GPT F1 (data-loss, fixed): leaving the Side Chat view (Details / close / member switch) unmounted SideChat and discarded its uncontrolled draft. Fixed at the component: drafts are kept per slot in sideChatDrafts.ts and SideChat runs its composer in controlled mode against it — which also closes the same pre-existing loss on the main chat's activity panel when switching tabs. Pinned by a new SelectToAsk.test.tsx case (unmount → other slot sees nothing → same slot gets the draft back).
  • Frontend Tests (3): the slug-collision test asserted the Side Chat's absence synchronously while the previous member's view was still crossfading out — assertion now waits for the exit.

Round 4 (head 166204b35, rebased onto origin/main @ #8958)

  • GPT F1 (data-loss, fixed): a failed side submit handed the text back through mergeIntoDraft, i.e. into whatever slot the panel showed at rejection time — after a re-bind (split-view Ask, member switch) A's question landed in B's draft. Now restoreDraftTo(vars.slot, vars.q): the visible draft when that slot is still the one shown, otherwise straight into that slot's store entry. Pinned by a new SelectToAsk.test.tsx case (submit on A, re-bind the same instance to B, reject → A's store has the question, B's draft untouched).
  • Frontend Tests (2): the new draft-survival test seeded a hand-picked chat state that lacked the per-slot maps the composer's selectors read for a non-active slot; it now spreads the reducer's initial state.
  • Backend Tests (3.12, 4): test_snapshot.py::TestNotificationCopyWhenNoLiveFileExists timing failure in untouched Python (also seen in round 1); this PR changes no backend code. Re-run only that job if it recurs on this head.

Round 5 (head 48436bb9e)

  • GPT F1 (data-loss, fixed — same file as round 4, second hit on that span): the per-slot draft cache in state could shadow the store: submit on A clears the cached {A, ''}, re-bind to B, A fails and restores into the store only, re-bind to A → the stale cached empty string was shown and the next keystroke overwrote the restored question. Invariant now: the store is the single source of truth — SideChat reads readSideChatDraft(slot) on every render and keeps state only as a render tick, so nothing can shadow a restore. The failed-submit test now also drives the return to A and asserts the restored question is shown and appended to, not overwritten.
  • Frontend Tests (2): the failed-submit test could not observe the submit — the file's api mock minted a fresh vi.fn per property access, so mockImplementation and the call assertion targeted different fns; sideTurn / sideOpen are now stable mocks (the SideChat.oversizeQuestion pattern).

Round 6 (head 8a039f385)

  • GPT F1 (data-loss, fixed): the third sibling of the same class — editQueued.onError (a failed queued-question edit) still merged the text into the draft of whatever slot the panel showed. Now restoreDraftTo(vars.slot, vars.content). Rather than another point fix, restoreDraftTo's doc now carries the table of every draft writer and why each lands on the right slot (typing / chips / send-clear → the shown slot by definition; seed → gated by sideSeedTargets; queue release → read from slotSide[slot], waits in the store for a hidden slot; failed submit and failed edit → restoreDraftTo(vars.slot)), with the rule that a mergeIntoDraft inside a mutation callback is the wrong-slot bug again. (The Opus adjudicator flagged the finding as naming non-existent code; it was reading the ChatPane queue hook — the mergeIntoDraft is in SideChat.tsx's own editQueued.onError, so the finding was real and is fixed.) New test in SideChat.steerQueue.test.tsx: edit on A, re-bind to B and type, A's edit fails → A's store draft holds the wording, B's draft untouched.
  • Backend Tests (3.12, 4): test_snapshot.py::TestNotificationCopyWhenNoLiveFileExists — the known flake tracked in flaky: TestNotificationCopyWhenNoLiveFileExists ordering asserts race on loaded CI shards #8893 (open); no backend code in this PR.

Round 7 (head 8226e607e)

  • GPT: ✅ no blocking findings on 8a039f385.
  • Design CONCERNS (fixed, both suggestions taken): the seed no longer travels over the side-seed event + 20-frame rAF poll + data-side-chat-slot DOM probe — all three are deleted. sideChatDrafts moved into chat-core and became subscribable (useSyncExternalStore); Ask writes the quote into the slot's store entry (seedSideChatDraft) and the panel renders it whenever it mounts, so a late-mounting panel cannot miss the selection. Draft state now lives in exactly one place. revealComposer is a host callback (selectionActions.ts no longer imports from pages/). Tests: store contract (selectionActions.test.tsx, incl. the seed-before-mount case), SelectToAsk.test.tsx seed cases rewritten against the store, host tests assert the store instead of listening for an event.
  • UX Watch (label pair is a first-use guess) → needs a maintainer call, asked in the disposition; the labels ("Quote" / "Ask in Side Chat") pre-exist on main, this PR does not change them.
  • UX Watch (split-pane placeholder wraps + clips) → accepted-and-deferred to ChatInput placeholder wraps and clips in narrow split-view panes #9016: pre-existing ChatInput behaviour on every split pane on main; this PR does not touch ChatInput.
  • UX Suggestion ("MCPs" wording) → already tracked in i18n: reword Side Chat footer 'Tools and MCPs are unavailable here' into plain language #8964.

Round 8 (head c2b4fd126, rebased onto origin/main @ #8998) — readiness passed on 8226e607e; two advisories fixed

  • Opus advisory (fixed): seedTick was never reset, so every later remount of a once-seeded slot (reopening the Side tab, a member switch and back) re-ran the focus nudge into an empty composer. The nudge now consumes the seed (consumeSideChatSeed), so a non-zero tick means "a seed is waiting for the caret", never "was seeded once". Store contract test added.
  • UX Watch (one-way door into the Members Side Chat, fixed): the details view now offers a Side Chat header action while useSideChatDraft(activeSlot) holds text; new MembersPage.sideChat.test.tsx case (absent without a draft, present with one, gone when it clears).
  • UX Watch ("Ask in Side Chat" is a first-use guess): maintainer decision still open (posted as needs-a-decision in round 7); labels pre-exist on main, default is to ship as-is.

Round 9 (head f936f404a)

  • GPT F1 (data-loss, fixed): split-view Ask on a non-active pane dispatched switchSlot unguarded while every other switchSlot in ChatPage (tab strip, sidebar row, ?sid deep link, tab close) is gated on connected — offline, the rejected switch clears the active pane's messages and the transcript the reader just selected from disappears until reconnect. Two-part fix: the grid is handed openSideChat only while connected, so panes' toolbars offer Copy / Quote only offline (capability by omission, no Ask into the void and no orphan seed); and openSideChatForPane itself checks connectedRef before the switch, covering the frame between the drop and the re-render — it does nothing rather than open a Side Chat bound to some other slot. Two new ChatPageMoreCoverage.test.tsx cases through a stubbed SessionGridView: connected Ask re-binds to the pane's slot and opens the side tab; after sseDisconnected the capability is gone and a slipped-through call moves nothing.
  • Frontend Tests (4): MochiChatPanel.coverage.test.tsx › replaces the streamed text with the committed message — a findByText('partial') timeout (1034 ms) in the Mochi app's streaming footer; this PR touches nothing under apps/mochi and the file has a prior stabilisation for the same streaming assertion (test: stabilize flaky widget-tag streaming assertion (#3314) #3378). Not this PR's; Coverage Merge is its cascade.
  • Backend Tests (3.12, 4) + Coverage Gate: the flaky: TestNotificationCopyWhenNoLiveFileExists ordering asserts race on loaded CI shards #8893 test_snapshot flake again — also red on main's own runs 34035151321 / 34033073642 at the same time.

Round 10 (head af095d91e) — round 9's new connected-path test, fixed

  • Frontend Tests (3), own test: re-binds the activity panel to a split pane's slot… asserted activeSlot === 'chat-2' but the harness knew only chat-1, and ChatPage undoes a switch to a slot its list does not hold (the mode-guard clears activeSlot, the auto-select falls back to the first known slot) — the test was switching to a stranger. renderChatPage now takes a slots option; the split tests render with chat-1 + chat-2. Production code unchanged from round 9.
  • Every other check green on f936f404a (GPT ✅ no blocking, Opus ✅, all advisory lanes settled); Coverage Merge / Coverage Gate were the cascade.

Round 11 (head 38a1bf806, rebased onto origin/main @ #9037) — CONFLICTING cleared

Round 12 (head f3aeec2f0, rebased onto origin/main @ #8694) — picks up the #8893 fix

Round 13 (head 2e22aed33, rebased onto origin/main @ #9407) — CONFLICTING cleared; UX Watch items closed in-PR

  • Rebase (185 commits): two textual conflicts — docs/feature-map/README.md Crew Members row (main's star/filter wording ∪ this PR's Side Chat wording) and MembersPage.tsx activate() (main's safeSetItem(LAST_MEMBER_KEY) + this PR's setDrawerView('details'), both kept). One semantic break the rebase could not see: main moved connectedRef out of ChatPage into useChatPageSessionController, so openSideChatForPane's offline guard lost its ref — re-declared locally next to the callback (same read-at-click-time shape). tsc -b --force clean.
  • UX Watch ("Ask in Side Chat" is a first-use guess) — resolved in-PR, label changed: the blind reader's block was the noun — the UX lane's blind read on f3aeec2f0: "Ask in Side Chat: a guess (I don't know what a 'Side Chat' is yet)", carried as a first-use-guess Watch in rounds 7, 8 and 12 (round-7 disposition quotes it and asked the maintainer, who directed the relabel), so the button no longer names the panel: "Ask about this" says what happens to the selection, and a tooltip (ask_hint) says where it lands and that the main chat is untouched — the panel's own header then reads "Side Chat" when it opens. Shorter than the old label, so the width the capture/selection-toolbar-ask.tsx entry reviews only shrinks. SelectionAction gains an optional hint (renders as title; the accessible name stays the label). All 13 catalogs updated (zh-CN keeps its existing "随手问", which already followed this pattern); en.context.json entries rewritten/added; AssistantMessage.test.tsx + SelectToAsk.test.tsx follow the label, and the latter pins the tooltip.
  • UX Watch (draft-gated "Side Chat" return button has no cue it holds the user's text) — fixed: the button now carries the roster's accent "something is waiting here" dot and a tooltip, pages.membersPage.side_chat_draft_waiting ("An unsent question is waiting in this member's Side Chat"). MembersPage.sideChat.test.tsx pins the tooltip.
  • UX Evidence gap (return button in no screenshot) — closed: new frame 05 above, produced by the Members harness (asserts: absent before Ask, present after Details, text "Side Chat", tooltip, Side Chat unmounted). All eight stills + the recording re-shot on this head with the new label.

Round 14 (head aff53f5b3, rebased onto origin/main @ #9507) — CONFLICTING cleared, no code change

  • 2e22aed33 was fully green (61/61, MERGEABLE) and sat ~7 h awaiting merge while main moved 34 commits. Rebased; three conflicting files, all resolved on main's structure:
    • MembersPage.tsx — main's react-query rewrite replaced the slots / errors maps with threadOutcome (slot_key / collision / failed). Kept: useSideChatDraft(activeSlot) (now reads threadOutcome.slot_key), the setDrawerView('details') reset in activate(), and openSideChat={openMemberSideChat} on the <ChatPane> mount beside main's new hideEmptyHint. Dropped: this PR's setErrors(...) cleanup, whose state no longer exists.
    • ChatPane.tsx — hideEmptyHint (main) and openSideChat (this PR) are both additive props; union.
    • en.context.json — pages.membersPage.edit_member (main) ∪ pages.membersPage.side_chat_draft_waiting (this PR).
  • MembersPage.sideChat.test.tsx follows main's harness: the api mock provides defaultAgent / autonudgeList (the page's new reads) instead of the retired kirocrewAgents, and the collision case waits on member-thread-error (main's ErrorNotice test id) rather than a bare role="alert".
  • tsc -b --force, eslint, i18n:check (19, base origin/main) clean; both capture harnesses re-run green on the rebased page (stills re-shot, pinned above).

Round 15 (head a98d3d7ad)

  • Frontend Lint (jscpd), own red — fixed: main shipped capture-queue-edit-multiline.mjs with the same 34-line split-harness stanza (splitLayouts / json / FIXTURES / check) this PR's capture-chatpane-selection-quote-ask.mjs had, so the 0%-duplication gate tripped on the merge ref. Hoisted the stanza into scripts/lib/prepare-split-chat-page.mjs (TWO_PANE_SPLIT_LAYOUTS, jsonResponder, splitPaneFixtures, makeChecker) — the place that file's own header says the shared wiring belongs — and this PR's script imports it. main's copy is left as-is (not this PR's file); jscpd is 0 clones with one copy gone. Harness re-run green.
  • Frontend Tests (3), own red — fixed: my round-14 rebase pointed the slug-collision test at member-thread-error; main's rewrite renders a collision under its own member-thread-collision id (the -error id is the failed-POST notice). Test retargeted.
  • Bundle Size Gate, inherited: App chunk over by 1.1 KB. Measured on a pristine main @ 6ae74179d worktree: 3,440,273 B against the 3,440,640 B ceiling — 367 B (0.01%) headroom, the drift class check-bundle-size.mjs itself documents. chore(bundle): re-measure the App chunk ceiling (3360 -> 3530 KB) #9523 (opened independently) re-measures it to 3530 KB; this PR picks it up when it merges. Not folded in here, per the file's own convention.
  • Backend Tests (Windows) (4), inherited: test_work_ledger.py::test_two_conductors_binding_one_worker_at_once… — identical failure on main's own run at this base (34266985826).
  • First Principles Subtraction — taken: subscribeSideChatDrafts is module-private; useSideChatDraft is the one subscription surface. The store test that called the raw subscriber now pins the same notify contract through the hook.
  • First Principles Watch (relabel provenance) — answered in a disposition: the observed confusion is on record — the UX lane's blind reader on f3aeec2f0 ("Ask in Side Chat: a guess — I don't know what a 'Side Chat' is yet"), raised in rounds 7, 8 and 12 as a first-use-guess Watch, and the maintainer directed that it be resolved in-PR by relabelling rather than overridden.
  • UX Watch + Suggestion — taken: ask_hint now carries the no-commit reassurance the blind reader lacked ("Opens Side Chat with the selection quoted — nothing is sent until you send, and the main chat is untouched"), all 13 catalogs + en-XA; and because a hover title is invisible to touch/keyboard, the hint is also the button's aria-description.

Round 16 (head 41cb6fc06) — two own reds from round 15's additions

  • Frontend Lint, own red — fixed: aria-description trips jsx-a11y/role-supports-aria-props (the rule's ARIA table predates the 1.3 attribute) and CI lints at --max-warnings 0. Replaced with aria-describedby → a sr-only sibling node per action (useId prefix, since split view mounts several toolbars). The node is a sibling, not a child, so the button's own text stays the label — the capture harnesses and getByRole name lookups read it as such. SelectToAsk.test.tsx pins toHaveAccessibleDescription(/nothing is sent/) and the clean text. Full-tree eslint src/ --max-warnings 0 clean locally.
  • Frontend Tests (3), own red — fixed: the Hindi ask_hint used formal आप, tripping the hiStyle ratchet (style/hi.md §4: address the user as तुम). Reworded. Audited every string this PR adds against the sibling style gates and fixed the same register slip in de (Sie → du), fr (vous → tu) and ru (вы → ты) before their ratchets could catch it; es/it/pt/zh/ja/ko were already in register.
  • Bundle Size Gate, inherited (unchanged): waiting on chore(bundle): re-measure the App chunk ceiling (3360 -> 3530 KB) #9523.
  • Backend Tests (Windows) (4): green on this round.

Round 17 (head 84afb49ae, rebased onto origin/main @ #9523) — bundle red cleared; two advisories taken

  • Rebase: chore(bundle): re-measure the App chunk ceiling (3360 -> 3530 KB) #9523 (App-chunk ceiling 3360 → 3530 KB) merged at 21:31 UTC, so the one remaining red on 41cb6fc06 — inherited, see round 15 — clears on this merge ref. 11 commits, no conflicts; en-XA regenerated against the merged en.json (byte-identical tree).
  • First Principles Subtraction — taken: the quoteIntoDraft re-export from selectionActions.ts is gone; the only importer (its test) reads quoteDraft.ts directly.
  • UX Suggestion — taken: the Members drawer's draft-gated Side Chat pill gets the same treatment as the Ask hint: aria-describedby → sr-only sibling (useId), so its "an unsent question is waiting" reason reaches keyboard and screen-reader users, not only hover. MembersPage.sideChat.test.tsx pins toHaveAccessibleDescription.
  • UX Evidence gaps (hover tooltips in no screenshot) — answered in a disposition: both are native title tooltips, drawn by the OS outside the page, which a Chromium page.screenshot() cannot paint; the text itself is pinned by tests (SelectToAsk.test.tsx, MembersPage.sideChat.test.tsx) and, since round 16, is also the element's accessible description.
  • First Principles Watch (relabel provenance) — same disposition as round 15.
  • Every other check on 41cb6fc06 green: GPT ✅, Opus ✅, Design PASS.

Round 18 (head 6a8247bc1) — UX Watch on the composer band, taken

  • UX Watch (blind reader could not tell the Side Chat composer from the live one; the tint "never registered") — fixed, smallest form: the tinted band now says what it is in words. A one-line marker sits above the Side Chat input — the toolbar's Ask icon + pages.chat.sideChat.off_record_marker ("Side Chat · not saved to the conversation"), 13 catalogs + en-XA, en.context.json entry — so the seeded composer is recognisably where "Ask about this" led and states that text here does not reach the main conversation. Frames 02 and 2 re-shot (marker visible above the seeded quote). Not an in-page tooltip: the reader's failure was the box, not the button, so the words go on the box.
  • UX Suggestion (replace native title with an in-page tooltip) — declined for this PR: the hint copy is now reachable three ways (hover title, aria-describedby for AT, and — for the destination question specifically — the marker above the composer the button opens), which is the reader's actual gap; a tooltip component change on the shared selection toolbar is a separate surface decision.
  • First Principles Watch (relabel provenance): the round-13 bullet above now links the disposition that quotes the misled reader, which is the lane's stated clearing condition.
  • 84afb49ae finished fully green (61/61, MERGEABLE): GPT ✅, Opus ✅, Design PASS; this head changes only the Side Chat composer band and catalogs.

Round 19 (head dae03e58a) — harness helpers get their other consumers

  • First Principles Subtraction (one-consumer generalisation) — taken: the shared split-harness helpers hoisted in round 15 now have the consumers their existence claimed: capture-queue-edit-multiline.mjs (main's script that shared the stanza) imports TWO_PANE_SPLIT_LAYOUTS / jsonResponder / splitPaneFixtures / makeChecker instead of carrying the paste, and this PR's capture-members-selection-quote-ask.mjs imports makeChecker instead of its inline check/failed. All three harnesses re-run green through the shared code; jscpd 0 clones. Scripts only — no product code changes on this head.
  • First Principles Watch (relabel) and UX Watch / evidence gaps (Quote-vs-Ask pre-click distinguishability; hover tooltips uncapturable): same span as rounds 15–18; dispositions on record, no further change here. The round-18 marker is what the blind reader now names as the cue that tells the two boxes apart.
  • 6a8247bc1 finished fully green (60/60, MERGEABLE): GPT ✅, Opus ✅, Design PASS.

Round 20 (head f09a32ae4) — the pair's hints now disambiguate each other

  • UX Suggestion (quote_hint) — taken: round 13 gave Ask a hint but left Quote's title restating its label, so the pair's tooltips did not tell the two destinations apart. components.selectionToolbar.quote_hint ("Quotes the selection into the composer of this conversation — your reply goes to the main chat"), 13 catalogs + en-XA, en.context.json entry; wired through the same hint → title + aria-describedby path. SelectToAsk.test.tsx pins that Quote's description names the main chat and Ask's names the Side Chat. No screenshot change (tooltips).
  • First Principles Watch (relabel) / UX Watch (pre-click pair distinguishability, hover capture): same span as rounds 15–19; dispositions on record.
  • dae03e58a finished fully green (61/61, MERGEABLE): GPT ✅ (all findings downgraded on adjudication), Opus ✅, Design PASS.

Round 21 (head 34dfc65e6) — GPT F1 (fenced, security-class): a refused opener no longer seeds

  • GPT F1 (selectionActions.ts:79, fixed rather than overridden): onAsk called openSideChat(slot) and then seeded the slot's draft store unconditionally, so when the opener refused — ChatPage.openSideChatForPane returning early offline (round 9's guard) — the quote was still parked in that slot's in-memory draft and would surface at the next unrelated open. The adjudicator rated the residual LOW (additive, visible, clearable, never persisted or auto-sent) and pre-drafted an override; the fix is one line cheaper than arguing it. The opener contract is now (slot) => boolean | void: return false to refuse, and onAsk skips the seed. openSideChatForPane returns false on the offline path and true otherwise; the Members opener always opens (void = opened). ChatPane / SessionGridView prop types follow. Tests: selectionActions.test.tsx — a refusing opener leaves the store empty; ChatPageMoreCoverage.test.tsx — the slipped-through offline call returns false.
  • f09a32ae4: every other check green (59), Opus ✅, Design PASS; UX/FP advisory dispositions on record.

Round 22 (head 1a21d0fbe) — GPT F1 (fenced): concurrent failed restores composed through the store

  • GPT F1 (SideChat.tsx:198, fixed): restoreDraftTo took a shortcut when the failed request's slot was the one on screen — mergeIntoDraft(text) — and in controlled mode that resolves its functional updater against the composer's render-time draft (useComposerDraft.ts:201). Two edits rejected in the same tick therefore both built on the same stale base and the second restore erased the first. Now every restore, shown slot or not, goes writeSideChatDraft(target, append(readSideChatDraft(target), text)): the store read is synchronous and current, so successive restores compose, and the shown composer re-renders from the store as it does for every other write. The slotRef the shortcut needed is gone. New SideChat.steerQueue.test.tsx case: two queued edits fail in one tick → both wordings are in the slot's draft.
  • 34dfc65e6: every other check green (59), Opus ✅, Design PASS; FP/UX dispositions on record.

Round 23 (head 2b044a8af) — GPT F1 (upheld): a rejected pane re-bind no longer strands the seed; own test red fixed

  • GPT F1 (ChatPage.tsx:4360, fixed): openSideChatForPane dispatched switchSlot(slot) and returned true synchronously, so when the server rejected the switch (the pane's session deleted under it → 404 → switchSlot.rejected falls back to the prior slot) the seed had already been written for a slot the panel never bound to, with no visible error. The opener now returns dispatch(switchSlot(slot)).unwrap().then(…): on success it opens the side tab and resolves true; on rejection it reports through the page's ErrorNotice (showActionError, new key pages.chatPage.side_chat_pane_gone, 13 catalogs) and resolves false. The seam (selectionActions.ts) accepts boolean | void | Promise<boolean | void>: a sync verdict seeds synchronously (same-slot Ask, Members), a Promise defers the seed to its verdict. ChatPane / SessionGridView prop types follow. Tests: selectionActions.test.tsx (Promise-true seeds after settle; Promise-false seeds nothing), ChatPageMoreCoverage.test.tsx (connected re-bind resolves true; a 404'd re-bind resolves false, falls back to chat-1, opens no Side tab, and the notice is on screen).
  • Frontend Tests (1), own red — fixed: round 22's new test located the queue stack with getByRole('button', { expanded: false }), which matched other aria-expanded controls on the page; it now finds the stack as the [role=button][aria-expanded] ancestor of a card's text.
  • 1a21d0fbe: Opus ✅, Design PASS, every other check green (52 at the time of writing, shards still running).

Round 24 (head 94f490c1d) — GPT F1 (fenced): a re-bind overtaken by a later switch no longer opens the wrong pane; rebased

  • GPT F1 (ChatPage.tsx:4373, fixed): round 23 resolved true on switchSlot.fulfilled alone. If the user moved on to pane A while pane B's switch was still in flight, chatSlice ignores B's stale fulfilment (activeSlot !== key → return) but the opener did not: it opened the Side tab — now bound to A — and the seam seeded B's draft, so A's Side Chat came up while B's quote sat hidden. The opener now checks store.getState().chat.activeSlot === slot once the switch resolves and reports false otherwise; the seam seeds nothing and no tab opens. Test: ChatPageMoreCoverage.test.tsx "a re-bind overtaken by a later switch reports false" (B's detail fetch held open, switchSlot('chat-1') in between, then released).
  • E2E [vs-base] red on 2b044a8af was main drift: the 26 added app-detail findings all sit in AppDetailPage.tsx, untouched by this PR; the base tree CI exported (d4e59297) was 18 commits past the branch's merge-base. Rebased onto origin/main (02921dfc1), clean.
  • 2b044a8af: Frontend Tests 1–4 ✅ (round 22/23 tests pass), Opus ✅, Design PASS, everything else green.

Round 25 (head b3a89b0cf) — opener reads the Provider's store, not the module singleton

  • Frontend Tests (3), own red — fixed: round 24's post-switch guard read store.getState() from ../store — the module singleton. In production that is the store the page renders under, but ChatPageMoreCoverage renders ChatPage under its own createTestStore, so the happy-path Ask resolved false. The opener now takes the bound store via useAppStore() (the pattern InstancesViewport / App already use) and reads that after the await — the same store its dispatches went to. No behaviour change in the app.
  • 94f490c1d: all five review lanes green (GPT ✅ for the first time since round 20, Opus ✅, UX ✅, Design ✅, First Principles ✅); Frontend Tests 1/2/4 ✅; E2E [vs-base] was still running.

Round 26 (head ebf99636b) — rebase only: main drifted to CONFLICTING

  • b3a89b0cf was 61/61 green and MERGEABLE; main then moved (67716d722, members roster "+" + the ChatPane pin/onDisplayItems props) and the PR went CONFLICTING. Rebased; two textual conflicts, both unions: ChatPane.tsx passes main's onDisplayItems/hiddenRow and this PR's onQuote/onAsk to ChatMessageList; the Crew Members row in docs/feature-map/README.md takes main's badge wording and keeps this PR's Side Chat additions. No code change otherwise; tsc / eslint / i18n clean, both harnesses re-verified.

Round 27 (head de6320652) — rebase only: picks up the #9682 fix for the inherited shard-4 red

Local gates

tsc -b ✓ · eslint on every touched file ✓ · i18n:check with I18N_BASE_REF=origin/main ✓ (19 checks, incl. the diff-scoped catalog QA) · check-theme-colors ✓ · check-phantom-classes ✓ · jscpd . ✓ (0 clones). vitest/pytest deliberately not run locally.

no linked issue: dispatched from a crew work item (session task), not a GitHub issue; #8964 is a follow-up filed by this PR, #5893 / #5895 / #5892 are referenced as precedent only.

@CrysisDeu
CrysisDeu requested review from a team and hoang-phan98 September 6, 2026 08:22
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

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

Design-Verdict: PASS

One chat-core seam, store-backed seeding, and host-owned capabilities — the right shape, with every failure path named, caused, and pinned.

Suggestions

  • The opener contract fails open: void means "opened", so a future host whose opener can refuse but forgets to return false silently re-seeds — the exact bug class rounds 21/23/24 each fixed once. Inverting to fail-closed (only true/Promise<true> seeds; the three current openers return it explicitly) makes the next host safe by construction instead of by reading the doc comment.

[DESIGN-REVIEWED] de63206

@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of de6320652fdf640971c89387f8b090e9cdc1150e — 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 verification is done. The final review follows the contract's output shape.

First-Principles-Verdict: CONCERNS

The Ask relabel across 13 catalogs and Quote's mirror tooltip rest on design taste — no named reader was failing on "Ask in Side Chat".

Not justified as shipped

  • Item 3 — unjustified relabel: renaming "Ask in Side Chat" → "Ask about this" cites only "a first-time reader has not met the Side Chat panel yet" — reasoning, not a report; existing users relearn the label in every locale while the destination is demoted to a tooltip.
  • Item 5 — inherited (symmetry): quote_hint's own comment says "The pair's hints disambiguate each other" — the twin is its only support; a Quote tooltip's harm is never named without Ask's.
  • Item 6 — undeclared: the description declares the tint only; the in-words "Side Chat · not saved" row (new key off_record_marker, shown on the main chat too) is never mentioned. Its harm is the tint's, so inventory only.

What this change ships

Inventory (10 items) — 7 justified

Intent: give Members threads and split-view panes the same Quote / Ask-on-selection the main chat has — an ADDITION.

  1. Selected text in a split-view pane offers Quote / Ask, not Copy only — justified
  2. Selected text in a Members thread offers Quote / Ask; Ask turns the detail drawer into that member's Side Chat — justified
  3. Ask button relabelled "Ask in Side Chat" → "Ask about this", all 13 catalogs — unjustified move (no named person failing on the old label)
  4. Ask gains a tooltip + screen-reader description ("lands in Side Chat, nothing sent yet") — justified
  5. Quote gains a matching tooltip/description (quote_hint) — one consumer, generalized; symmetry-form inherited
  6. Every Side Chat composer band tinted AND labeled "Side Chat · not saved" in words — undeclared (words beyond the declared tint)
  7. Side Chat drafts survive panel unmount, per slot, in-memory; failed sends/edits restore to the submitted slot — justified
  8. Ask's seed is a store write, replacing the 20-frame DOM poll (cause-level; poll deleted) — justified
  9. Ask from a non-active split pane re-binds the page, awaited, with staleness/offline guards and a new failure notice — justified
  10. Members drawer details gains a draft-gated "Side Chat" return pill — justified

More than 10 exist (app-sdk onQuote/onAsk pass-through, capture harnesses + committed screenshots per temp-screenshots/README.md convention, jscpd-driven helper extraction, feature-map rows) — all counted and covered: the SDK props have 1 real consumer (ChatPane.tsx:983) in the documented onFileOpen shape; the extraction is derived from the real pretest: jscpd gate with 3 consumers.

Watch

  • The relabel (item 3): "the panel it lands in is named by its tooltip, not the button" — a preference presented as a requirement; the habituation cost lands on every existing locale user. Clears when: a report or observed confusion with "Ask in Side Chat" is named, or the old label is restored (the new ask_hint stands on its own either way).
  • quote_hint (item 5): grepped quote_hint — 1 consuming component (SelectionToolbar.tsx), justification purely the Ask twin. Clears when: the key is deleted, or a first-use harm for Quote is named without referencing Ask.

Subtractions

  • Restore components.selectionToolbar.ask to its prior value across the 13 catalogs — the relabel is separable from the feature and from ask_hint.
  • Drop components.selectionToolbar.quote_hint (+ its en.context.json entry and the hint on the quote action) — symmetry is its only support; Ask's hint alone already disambiguates the pair.

[FIRST-PRINCIPLES-REVIEWED] de63206

@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 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

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

Review details

Based on the candidate file, the discovery pass reported "No candidates." I independently reviewed the core code changes (the selectionActions.ts seam, sideChatDrafts.ts store, ChatPage.tsx openSideChatForPane, SideChat.tsx controlled-draft wiring, and MembersPage.tsx drawer view), attempting to ground a defect to the (a)/(b)/(c) bar.

Verdict-gated seeding correctly withholds the seed on sync false, on a Promise resolving false/rejecting, and after a re-bind race (activeSlot !== slot re-check); rejection surfaces through showActionError/ErrorNotice. The sideChatDrafts store returns a stable EMPTY const so useSyncExternalStore cannot churn; seedTick is consumed exactly once. restoreDraftTo(vars.slot, …) routes failed submits/edits to the submitted slot via a synchronous store read, avoiding the wrong-slot/stale-base bug. The Members drawer binds the draft-waiting pill and Side Chat host to the endpoint-confirmed activeSlot, not the roster slot_key. Capability-by-omission hides Ask when no openSideChat (offline / no Side Chat surface). No grounded defect at 80+ emerged, and none of the survivors reached the BLOCKING classes.

No findings.

[OPUS-REVIEWED] de63206

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

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

@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

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

Reconciliation is complete. The blind read covered every screenshotted control and got the whole flow right: Quote → "puts the text into my message box as a quotation" (correct, rated a guess), Ask about this → "opens the Side Chat with the text quoted" (correct via the shot 1→2→3 sequence, rated a guess), the off-record marker read as "sure", the draft-gated pill and the Details toggle both read correctly. The drawer details↔side swap has a stated reason, a crossfade, and a committed recording. The {{error}} suffix on the new error string matches existing catalog convention. What was never shown: the side_chat_pane_gone error notice and the three new hover tooltips.

UX-Verdict: CONCERNS

Cold read comprehended every control correctly — but the new error notice and the tooltips carrying Ask's destination were never shown to anyone.

Watch

  • Both primary toolbar buttons were correct on cold read but only as guesses — "Quote probably puts the text into my message box", "Ask about this probably starts some kind of question" (shot-01). The destination copy lives solely in hover title tooltips (ask_hint, quote_hint), which touch users never see; every first Ask is a leap of faith, once per user, low impact since the press is safe (seeds, sends nothing). Smallest fix: none required in-scope — verify the hints render on hover and rely on the safe first press.

Evidence gaps

  • pages.chatPage.side_chat_pane_gone error notice (Ask from a split pane whose session was deleted) appears in no screenshot; one capture of the notice above the main composer would close it.
  • The three new tooltip strings (ask_hint, quote_hint, side_chat_draft_waiting) are hover-only states shown in no screenshot, so the blind read never tested the copy that names Ask's destination.

[UX-REVIEWED] de63206

@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings (all downgraded on adjudication)

GPT 5.6 flagged blocking issues on de6320652fdf640971c89387f8b090e9cdc1150e; Opus 4.8 adjudication downgraded every one of them to advisory. Adjudication downgraded all 1 blocking finding(s) to advisory: the remedy each one requires is disproportionate to the harm it prevents. Read them as advice, not as merge conditions.

This comment is updated in place on each push.

Review details

BLOCKING -- docs/feature-map/README.md:87 -- Side Chat endpoint does not exist

POST /api/chat/slots/{slot}/side/*
Reader follows endpoint -> router only registers /open, /turn, and /close -> request returns 404.
Anchor: feature-map-correctness
Fix: List the three registered Side Chat endpoints.
[BLOCK-MERGE-DOWNGRADED] de63206
[GPT-REVIEWED] de63206

Adjudication (Opus 4.8) — is blocking on each finding proportionate?

Line 87 (docs/feature-map/README.md) lists POST /api/chat/slots/{slot}/side/* in the Crew Members row. The router (src/kiro_crew/dashboard/routes/chat.py:102-104) registers exactly /side/open, /side/turn, /side/close; there is no literal /side/* endpoint.

Harm rung: LOW. The * is a documentation wildcard shorthand, and the same feature's three concrete endpoints are already spelled out verbatim four rows up at README.md:77 (.../side/open, .../side/turn, .../side/close). A reader who wants the real spellings has them; nothing at runtime consumes this doc line, so the "404" outcome requires a human to literally transcribe a glob character as a path. Consequence is cosmetic, visible, and self-correcting against line 77. Blocking the merge on a doc-only wildcard shorthand is disproportionate to the trivial-but-cosmetic harm.

[ADJUDICATION] de63206 total=1 uphold=0 downgrade=1
DOWNGRADE F1 docs/feature-map/README.md:87 reason=disproportionate-remedy
[GPT-ADJUDICATED] de63206

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

@CrysisDeu
CrysisDeu force-pushed the feat/chatpane-selection-quote-ask branch from 148ebb4 to 75bf525 Compare September 6, 2026 08:53
@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 labels Sep 6, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • F1 — Side Chat mounts an unverified roster slot (website/src/pages/members/MembersPage.tsx) — span=e7ac5689c151 — fixed in 75bf525

The drawer's Side Chat now mounts only on activeSlot, the key filled by POST /api/members/{slug}/thread, never on activeMemberKey's roster fallback; and openMember resets drawerView to 'details' on every member switch, so a side view left open on one member cannot re-mount on the next member's rejected key. Both halves are pinned by new tests in MembersPage.sideChat.test.tsx ("switching members returns the drawer to details", "never mounts a Side Chat on a thread key the opener rejected (slug collision)").

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • F3 — New Side Chat entry point absent from the feature map (website/src/pages/members/MembersPage.tsx) — span=e7ac5689c151 — fixed in 75bf525

docs/feature-map/README.md: the Side chat row now lists the three reach paths (right panel Side tab, /side, and Ask in Side Chat on selected text in main chat / split panes / Members threads) plus MembersPage.tsx as a page; the Crew Members row names the drawer's Side Chat surface, the selection-toolbar reach path, handlers/side.py and the side/* endpoints.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • F2 — Selection toolbar grows to three peer buttons (website/src/components/ChatPane.tsx) — span=42cfccb1d7fb — rebutted (grandfathered row; the diff adds no markup to it)

max-two-buttons-per-row scopes to what the diff ADDS. The row in question is SelectionToolbar's action strip, rendered by useSelectionActions(onQuote, onAsk) — unchanged by this PR. On main, ChatPage.tsx already passes both callbacks, so the identical Quote / Ask in Side Chat / Copy row ships today in the main chat. This PR only stops ChatPane from withholding the two callbacks the shared component already takes (ChatMessageList → ctx.onQuote/onAsk → AssistantMessage), so the same component renders the same row in a second host. Moving Copy into an overflow menu would have to change the main chat's shipped toolbar — out of this PR's scope and the UX lane's call; UX Review returned CONCERNS on other points and did not flag the row. Same precedent as #5895 (FollowUpBar mounted in ChatPane) and #5892 (QueueStack onEdit in ChatPane), both overridden on the grandfather clause.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • UX Watch — wrong-composer risk: two identical composers on one screen (Members thread + Side Chat) — fixed in 75bf525

Took the smallest fix named: the Side Chat composer band in SideChat.tsx is now tinted (border-t border-accent/30 bg-accent/5) so the off-record composer reads differently from the live thread composer at a glance, not only from the panel header. Applies to the main chat's Side Chat too, so the two surfaces stay one family. Re-shot frame 02 (Members) shows the pair side by side with the tinted band.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • UX Watch — split-view Ask silently switches the active slot (openSideChatForPane → switchSlot) — rebutted on the "verify the switch is perceivable" branch, with evidence

The switch is perceivable: in split mode the active slot's only visible manifestations are the sessions-sidebar highlight and the activity panel's binding, and both move to the pane's session on Ask — see the new split-view frame 2 (temp-screenshots/chatpane-selection-quote-ask/2-split-ask-side-chat-seeded.png): the sidebar highlight sits on Release checklist (pane-b), the Side tab is open and seeded for pane-b, and the grid stays in split. Nothing else re-renders (the main transcript is not mounted in split mode). Restoring the prior slot on side-chat close was considered and rejected: the grid's own onCollapse already switches the active slot the same way, and an automatic switch-back would fight whatever the user selected in between. "Without interrupting the active run" stays true — no turn is interrupted; only which session the panel is about changes, which is exactly what Ask-from-this-pane asks for.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • UX Evidence gap — the split-view pane's Quote / Ask appears in no committed screenshot — fixed in 75bf525

Added website/scripts/capture-chatpane-selection-quote-ask.mjs on the shared prepareSplitChatPage fixture, selecting in the NON-active pane (pane-b), with three state-asserted frames under temp-screenshots/chatpane-selection-quote-ask/: the toolbar in the non-active pane; Ask re-binding the page to pane-b, opening the Side tab and seeding pane-b's Side Chat while split mode is kept and both pane composers stay empty; Quote landing in pane-b's own composer with pane-a untouched. Embedded in the PR body.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Agreed on the wording. The string (pages.chat.sideChat.context_only_tools_unavailable) is pre-existing and shared with the main chat's Side Chat panel — this PR only exposes it on a second surface — so the reword is a 13-catalog copy change (en + 12 locales via i18n-translate.mjs, en-XA regenerated) that belongs in its own PR rather than inside the selection-actions wiring. Tracked in #8964 (deferred-finding, assigned, Due 2026-09-20) with the proposed replacement "Tools and integrations are unavailable here."

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt 75bf525: max-two-buttons-per-row on the selection toolbar is a grandfathered row — SelectionToolbar already renders Quote / Ask in Side Chat / Copy for ChatPage on main via useSelectionActions; this diff adds no markup to that row, it only stops ChatPane withholding the two callbacks the shared component takes (same clause as #5895 FollowUpBar and #5892 QueueStack onEdit).

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

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

max-two-buttons-per-row on the selection toolbar is a grandfathered row — SelectionToolbar already renders Quote / Ask in Side Chat / Copy for ChatPage on main via useSelectionActions; this diff adds no markup to that row, it only stops ChatPane withholding the two callbacks the shared component takes (same clause as #5895 FollowUpBar and #5892 QueueStack onEdit).

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

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Sep 6, 2026
@CrysisDeu
CrysisDeu force-pushed the feat/chatpane-selection-quote-ask branch from 75bf525 to c0ebaf8 Compare September 6, 2026 09:20
@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — the everywhere-relabel "Ask in Side Chat" → "Ask about this" names no user who failed under the old label — rebutted: the observed confusion is on record

The provenance is this PR's own UX lane, not the description's reasoning. On f3aeec2f0 the UX blind reader recorded: "Ask in Side Chat: a guess (I don't know what a 'Side Chat' is yet)", and the lane carried "'Ask in Side Chat' remains a first-use guess; resolve the label before it spreads to two more surfaces" as a Watch in rounds 7, 8 and 12 (see the round-7 and round-8 needs-a-decision dispositions above). The maintainer then directed that it be resolved in-PR by changing the label rather than overriding the lane. That is a named reader failing under the old label on the exact surfaces this PR adds it to; the relabel is the smallest change that removes the unknown noun from the button while the tooltip / aria-description and the panel's own header keep the name.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — the relabel "Ask in Side Chat" → "Ask about this" names no user who was failing; revert and keep ask_hint — rebutted: the failing reader is on record, and the hint alone does not reach the click

Provenance, again, is this PR's UX lane rather than the description: on f3aeec2f0 the blind reader logged "Ask in Side Chat: a guess (I don't know what a 'Side Chat' is yet)", the lane carried it as a first-use-guess Watch across rounds 7, 8 and 12, and the maintainer directed it be resolved in-PR by relabelling instead of overridden. "Keep only ask_hint" does not substitute: the hint is a hover/AT description and the reader's failure was at first sight of the button, before any hover — the unknown noun had to leave the label itself. The panel header still reads "Side Chat" once it opens, so nothing is renamed, only un-named on the button.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Evidence gaps — the ask_hint and side_chat_draft_waiting tooltips appear in no screenshot — not capturable; pinned by tests and by the accessible description instead

Both are native title tooltips. The browser draws those as OS-level windows outside the page surface, so Playwright's page.screenshot() never contains them — there is no frame to add. What the screenshot cannot show is asserted where it can be checked: SelectToAsk.test.tsx pins the Ask button's title and toHaveAccessibleDescription(/nothing is sent/), MembersPage.sideChat.test.tsx pins the pill's title and toHaveAccessibleDescription(/unsent question/), and both harnesses assert the pill's tooltip text on the real page (frame 05). Since round 16/17 each hint is also the element's aria-describedby target, so the copy is no longer hover-only in any case.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Suggestion — replace the native title on the Ask button and the drawer pill with an in-page tooltip (PastePreviewTooltip pattern) — declined for this PR; the reader's gap is closed on the surface it occurred on

The reader's confusion was about the box the text lands in ("two filled-in boxes look almost identical"), not about the button's hover. This head puts the answer where that failure happened: a worded marker on the Side Chat composer band itself ("Side Chat · not saved to the conversation", frames 02 / 2), which a first-time or touch user sees the moment Ask opens the panel — before any send. The hint copy already reaches users three ways (hover title, aria-describedby for keyboard/AT, and now the band). Swapping the shared selection toolbar's tooltip mechanism is a component decision on a surface this PR did not introduce; it belongs in its own change if wanted.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — the relabel's provenance is "(round 13)", nothing a reader can open; clears when a linked report or review comment shows a reader misled by the old label — cleared: the link is now in the description

The round-13 bullet of the description links the round-7 disposition, which quotes this PR's own UX blind read on f3aeec2f0 verbatim — "Ask in Side Chat: a guess (I don't know what a 'Side Chat' is yet)" — and records the maintainer question the relabel answered. That is a reviewer misled by the old label, on the surfaces this PR adds it to, in a comment on this PR.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — the relabel "Ask in Side Chat" → "Ask about this" names no person failing on the old label; clears when a linked review comment names the confusion — cleared by the link already in the description

Round-13 bullet of the description links the round-7 disposition, quoting this PR's UX blind read on f3aeec2f0: "Ask in Side Chat: a guess (I don't know what a 'Side Chat' is yet)", carried as a first-use-guess Watch across rounds 7, 8 and 12, and the maintainer's direction to resolve it by relabelling. That is the named reader on the surfaces this PR adds the button to. Same disposition as rounds 15, 17 and 18; no further change on this span.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — Quote and Ask land visually similar quoted text; the reader says the "Side Chat · not saved to the conversation" label is the one cue telling the two boxes apart — accepted as the designed state; no further change on this span

That label is the cue, added in round 18 for exactly this reading, and the reader now reports it works ("the only clue which one I'm in is the purple 'Side Chat · not saved…' label"). It sits on the band itself, above the input, in the accent colour, with the toolbar's Ask icon, on every Side Chat surface; the panel header says "Side Chat" a second time. Distinguishing two composers further (different input chrome, a stronger tint) would restyle ChatInput — the shared component every composer on the product uses — which is outside this PR. Hover-tooltip capture and the pre-click hint are on record in the round-17/18 dispositions.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — the relabel "Ask in Side Chat" → "Ask about this" names no person failing on the old label; clears when a linked review comment names the confusion — cleared by the link already in the description

Round-13 bullet of the description links the round-7 disposition, quoting this PR's UX blind read on f3aeec2f0: "Ask in Side Chat: a guess (I don't know what a 'Side Chat' is yet)", carried as a first-use-guess Watch across rounds 7, 8 and 12, and the maintainer's direction to resolve it by relabelling. That is the named reader on the surfaces this PR adds the button to. Same disposition as rounds 15, 17, 18 and 19; no further change on this span.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — pre-click indistinguishability of the toolbar pair; the reader misattributed the Side Chat seed to Quote — addressed: the pair's descriptions now disambiguate; the rest is on record

This head takes the lane's own suggestion: components.selectionToolbar.quote_hint ("Quotes the selection into the composer of this conversation — your reply goes to the main chat") sits beside ask_hint ("Opens Side Chat with the selection quoted — nothing is sent…"), both as title and as the button's accessible description, so the two no longer share a restated label. The remaining pre-click gap — a scanning mouse user sees neither hint before hovering — is the native-tooltip constraint dispositioned on rounds 17 and 18, and the post-click cue (the "Side Chat · not saved to the conversation" band marker) is the one the reader confirmed. Hover-state capture stays uncapturable for the reason on record.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — the draft-gated "Side Chat" header pill "could also be read as a status light rather than a button"; the dot's meaning is hover-only — accepted as designed; the affordance is the header's own

The pill is a real <button> in the drawer's headerActions slot, styled identically to the "Details" action that occupies the same slot in the other view (text-[12px] px-2 py-1 rounded-md text-muted hover:text-text hover:bg-bg-hover), so it carries the same hover/focus affordance the reader already used to press Details. Its label is the destination ("Side Chat"), and the dot's meaning is not hover-only: since round 17 the pill's aria-describedby reads "An unsent question is waiting in this member's Side Chat", and the dot reuses the roster's unread mark. Frame 05 shows it in place. Restyling header actions into chevron/outlined buttons would change the drawer's existing action row, not this PR's addition.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — the relabel "Ask in Side Chat" → "Ask about this" names no person failing on the old label; clears when a linked review comment names the confusion — cleared by the link already in the description

Round-13 bullet of the description links the round-7 disposition, quoting this PR's UX blind read on f3aeec2f0: "Ask in Side Chat: a guess (I don't know what a 'Side Chat' is yet)", carried as a first-use-guess Watch across rounds 7, 8 and 12, and the maintainer's direction to resolve it by relabelling. That is the named reader on the surfaces this PR adds the button to. Same disposition as rounds 15 and 17–20; no further change on this span.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — pre-click indistinguishability of the toolbar pair; the reader misattributed the Side Chat seed to Quote — addressed: the pair's descriptions now disambiguate; the rest is on record

This head takes the lane's own suggestion: components.selectionToolbar.quote_hint ("Quotes the selection into the composer of this conversation — your reply goes to the main chat") sits beside ask_hint ("Opens Side Chat with the selection quoted — nothing is sent…"), both as title and as the button's accessible description, so the two no longer share a restated label. The remaining pre-click gap — a scanning mouse user sees neither hint before hovering — is the native-tooltip constraint dispositioned on rounds 17 and 18, and the post-click cue (the "Side Chat · not saved to the conversation" band marker) is the one the reader confirmed. Hover-state capture stays uncapturable for the reason on record.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Watch — the draft-gated "Side Chat" header pill "could also be read as a status light rather than a button"; the dot's meaning is hover-only — accepted as designed; the affordance is the header's own

The pill is a real <button> in the drawer's headerActions slot, styled identically to the "Details" action that occupies the same slot in the other view (text-[12px] px-2 py-1 rounded-md text-muted hover:text-text hover:bg-bg-hover), so it carries the same hover/focus affordance the reader already used to press Details. Its label is the destination ("Side Chat"), and the dot's meaning is not hover-only: since round 17 the pill's aria-describedby reads "An unsent question is waiting in this member's Side Chat", and the dot reuses the roster's unread mark. Frame 05 shows it in place. Restyling header actions into chevron/outlined buttons would change the drawer's existing action row, not this PR's addition.

chenmingwei23
chenmingwei23 previously approved these changes Sep 9, 2026
… view)

Selecting text in a Crew Members thread (or a split-view pane) offered Copy
only: AssistantMessage's selection toolbar draws the actions its host hands
it, and ChatPage was the only host passing onQuote/onAsk — quote's
FlyingQuote-into-composer and ask's open-/side-and-seed were ChatPage-local.

Extract both into one chat-core seam, chat-core/composer/selectionActions
(useSelectionQuoteAsk + quoteIntoDraft + seedSideChat), and make ChatPage and
ChatPane both consume it — no second implementation. Hosts differ only in
what they own: the composer draft, and how a Side Chat surface for a slot is
brought on screen (openSideChat). Quote is always offered; Ask exactly when
the host provides an opener (capability by omission, like onOpenFull).

- app-sdk: ChatMessageList/MessageRenderContext gain onQuote/onAsk; the
  default assistant row passes them through.
- ChatPane: wires the seam to its own composer (FlyingQuote lands in the
  pane) and takes an openSideChat prop.
- Split view: SessionGridView threads ChatPage's opener, which re-binds the
  activity panel to the pane's slot (switchSlot) before opening the side tab.
- Members page: the detail drawer gains a Side Chat view bound to the
  member's slot (reuses existing "Side Chat"/"Details" strings — no new copy).
- SideChat: the side-seed event now names its slot; a SideChat bound to
  another slot ignores it, and the seed poll waits for the named slot's
  composer (data-side-chat-slot) rather than any Side Chat's.
- ChatPage: only change is consuming the hook (behaviour unchanged) plus the
  one-prop grid wiring.

Tests (mutation-oriented pins): selectionActions unit tests, ChatPane
selection-actions test, MembersPage Side Chat drawer test, SideChat
slot-aware seed, ChatPage Ask seed regression. Capture harness
website/scripts/capture-members-selection-quote-ask.mjs with three
asserted frames under temp-screenshots/members-selection-quote-ask/.

@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.

The two things I most expected to be wrong here are both fine, so let me put them first.

It does not intercept ordinary text selection. The floating popover already appeared in Members threads and split panes with Copy alone; this PR adds two buttons to an existing affordance rather than hooking selection for the first time. It portals at the mouse point +8px (selection rect for keyboard and touch), clamps to the viewport, flips above the anchor on bottom overflow, and dismisses on Escape, on outside mousedown, on a click that collapses the selection, and on picking either action. Copy alone keeps it open with a check.

Nothing sends on click. Quote pre-fills this surface's own composer with > -prefixed lines plus a trailing blank line; Ask also only pre-fills, opening the Side Chat (activity Side tab for main chat and split panes, the detail drawer on Members) with the selection quoted and the caret after it. Ask is a write into an in-memory per-slot draft store plus a focus nudge, and it is withheld entirely when the opener refuses (offline, deleted pane session).

Not stale either, which is worth stating since the branch is 20 commits behind: head de63206 is a clean rebase onto c0cf53f, the normalized patch is identical to the already-approved b3a89b0c except for context lines, and the rebase preserved main's newer onDisplayItems/hiddenRow props on the ChatMessageList call it edits. Main's newer drivingSessions change (#9728, MembersPage.tsx:532) sits clear of this PR's insertion at line 544, and main's docs/feature-map/README.md edit at line 169 is clear of this PR's at 74–87.

Four defects, all low:

  1. docs/feature-map/README.md:87 advertises POST /api/chat/slots/{slot}/side/*, which does not exist. routes/chat.py registers only /side/open, /side/turn, /side/close — which the Side chat row four lines above already spells out correctly. This is GPT's one BLOCKING finding, downgraded by Opus adjudication as disproportionate, and I agree with the downgrade: it is a doc wildcard.

  2. chat-core/composer/selectionActions.ts:53 — the opener contract is fail-open. It is typed boolean | void and void reads as "opened" (if (verdict === false) return, if (ok !== false)). All three current openers are correct, but a future host that can refuse and forgets return false will silently strand a quote in an unopened slot's draft — which is the exact class this seam's own comments say earlier rounds fixed three times. Design raised it as a Suggestion.

  3. MembersPage.tsx:544 — useSideChatDraft(activeSlot) subscribes the whole page to the draft store to decide one pill's visibility, and sideChatDrafts.ts:49 mints a new snapshot object on every write. So every keystroke in the member's Side Chat re-renders all 2039 lines of MembersPage — roster, drawer, driving-session list — when the pill only flips at the empty↔non-empty boundary. No lane raised this.

  4. SideChat.tsx:537-547 — consumeSideChatSeed(slot) sits outside the if (el) guard, so a frame where the textarea is not yet resolvable burns the seed and the caret is never placed. The focus is also unconditional with no isTouchDevice() skip, unlike composerFocus.revealComposer, which deliberately avoids focus on touch so the soft keyboard does not cover the content. Behaviour carried over from the deleted side-seed handler, but it now reaches mobile Members threads and split panes for the first time.

Two things for the owner rather than the author, since they are scope questions rather than bugs. The PR also changes two existing surfaces the title does not name: the Ask button is relabelled across all 13 locales, and every Side Chat composer — including the main chat's — gains an accent tint plus a new "Side Chat · not saved to the conversation" label row. First Principles is 🟡 CONCERNS on exactly that, with two explicit Subtractions proposed (restore the old ask value in all 13 catalogs; delete the single-consumer quote_hint), and no disposition targets the current head de63206 — the latest ones target 8a039f3, 34dfc65, 75bf525. UX is also 🟡 CONCERNS: both buttons were comprehended on cold read only as guesses, and the destination copy lives solely in hover title tooltips that touch users never see.

Worth knowing on the mechanics: chenmingwei23 approved this at 08:17Z on b3a89b0c, and the approval was dismissed 7 minutes later by a force-push and again by the 11:14Z one — but the PR's content has been byte-identical since, because both pushes were pure rebases. mergeStateStatus: BLOCKED is a missing re-approval, not a failing gate. CI is green: 62 SUCCESS, 4 skipped, nothing failing or pending.

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.

4 participants