Skip to content

feat(chat-core): Composer root + Voice atom; ChatPane gains dictation (P3-b) - #9787

Merged
iamwhatever merged 1 commit into
mainfrom
feat/chat-core-p3b-pane-composer-parity
Sep 10, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
feat/chat-core-p3b-pane-composer-parity

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Crew Members DM threads and split panes have no microphone. Both mount ChatPane, which renders the same ChatInput as the main chat, but ChatInput learns about dictation through 23 voice* / onVoice* props that only ChatPage wires. The pane wired none of them, so the mic button never rendered. User report: "the Crew Member UI is still missing features, e.g. voice input." (#9775)

Why it matters

ChatInput is 4,900 lines with 110 props. Every capability is one more row of prop plumbing at every host, and a host that skips a row ships without the feature. Wiring 23 more props into ChatPane would close today's gap and reopen it with the next capability. The panes are the main surface for Crew Members (the perpetual-agent roster); a member you can only type at is a worse member.

What changed (motivation → approach → change)

Goal. Give panes dictation, and stop the class of bug: a capability must not depend on a host remembering to wire it.

Approach. The composer becomes a Composer root plus atoms (RFC §3 layer 4, §4 P3 — text updated in this PR). The root holds one small context a host fills in a few lines: slotKey and the editor's onChange + a live inputRef. (A capabilities record joins it with its first writer — the ChatEmbed embedded preset in P3-f; a surface that wants no dictation today simply does not mount the root, and no flag ships ahead of a writer.) Each atom owns its own state and hooks and reads the context. No atom imports the Redux store (#8651). ChatInput becomes a preset composition of atoms one slice at a time; this slice moves voice. Paste, mention, slash/skills, editor/send/attach follow in P3-c…f (#9807, #9808).

Change. chat-core/composer/Composer.tsx is the root + context + Composer.Voice. The root mounts the atom beside the host's children; the atom runs useComposerVoice (ChatPage's ~550-line dictation block, extracted verbatim: STT config, useVoiceInput engine, caret splice, disarm flags, slot-switch teardown, setup modal) and publishes its state into the root only when a value changed. ChatInput reads that state with one hook; its 23 voice props are deleted. (The atom is deliberately not a child of ChatInput: a subscriber that renders its own publisher is a render loop — React #185 — which CI caught on this PR's second head.) ChatPage wraps its ChatInput in the root and hands the atom only what it cannot know (the draft-settlement on-screen predicate, off-screen draft delivery, endpointer auto-submit, push-to-talk ownership, its caret refs) — behaviour unchanged. ChatPane wraps its ChatInput in the root and gets a mic; its steer-not-queue rule (#8852) stays on canSteer until the Send atom exists. Both hosts also disarm live streaming dictation on steer, not only on send (GPT round 2).

flowchart LR
  subgraph Before
    P1[ChatPage voice block ~550 lines]:::removed -->|23 props| I1[ChatInput]:::ctx
    N1[ChatPane]:::ctx -.->|nothing| I1
  end
  subgraph After
    R[Composer root + context]:::added --> V[Composer.Voice atom]:::added
    V -->|publishes on change| I2[ChatInput reads one hook]:::changed
    P2[ChatPage]:::changed -->|wraps| R
    N2[ChatPane]:::changed -->|wraps| R
  end
  classDef added fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:2px
  classDef changed fill:#FEF3C7,stroke:#D97706,color:#78350F,stroke-width:2px
  classDef removed fill:#FEE2E2,stroke:#DC2626,color:#7F1D1D,stroke-dasharray:4 3
  classDef ctx fill:#E0F2FE,stroke:#0284C7,color:#0C4A6E
  linkStyle 0,1 stroke:#DC2626,stroke-dasharray:4 3
  linkStyle 2,3,4,5 stroke:#16A34A,stroke-width:2px
Loading

🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged

Dictation is an atom under a root. Any host that wraps ChatInput in the root has a mic; nobody wires voice props.

Two things had to change underneath for more than one composer to dictate. One microphone. The engine is per instance, so two panes could open two captures; a module-level capture owner in useComposerVoice makes startVoice exclusive (generation-scoped latch, so a double-click during startup cannot release it early), and the other composers read it as voiceBusyElsewhere: the mic is disabled with a MicOff icon and a visible "Microphone in use in “kirocrew”" row above the textarea — it names the chat that holds the mic when the slot list knows it, "…in another chat" otherwise (in hold mode the same status row shows above a plain disabled hold bar; the name in the status row is a button that switches to that chat, so the user can go and end the capture in one click) — its own state, not the "Transcribing" spinner. A held transcript that lands later shows "Dictation added to your message" for a few seconds, so nobody re-dictates it. Mic errors now render through ErrorNotice (AUTOSDE errors-use-error-notice), no hand-off since the composer holds an unsaved draft. The transcript inbox is a set. voiceTranscriptInbox held one subscriber (its own header said a second mount would silently detach the first). Composers now co-mount, so begin fans out (every mic reads the same in-flight fact) and settle releases busy everywhere but delivers the text once: to the subscriber whose composer owns the session; else to one that accepts unowned text (ChatPage's draft store); else it is held — one entry per result, not a single slot, so two dictations that both settle unowned both survive — until a composer for that session is back on screen (redeliverPending on a slot change). A pane that switched slots during the /api/stt round-trip no longer loses the utterance.

UX at pane width: the dictation panel's header row now wraps, so the keyboard hint drops to its own line and the device label may take the row (no width cap) instead of reading "Fa…".

Tests

Written, not run locally (CI runs them):

  • chat-core/composer/Composer.test.tsx — standalone ChatInput has no mic; under a root the same ChatInput renders the mic with zero voice props; the host handle reaches disarmForSend.
  • test/ChatPane.composerParity.test.tsx — the real ChatInput inside ChatPane renders the mic; pressing it starts the shared engine.
  • chat-core/composer/useComposerVoice.test.tsx — a second composer is refused while the first holds the mic and reads micBusyElsewhere; release on idle, failed start, unmount; voiceTranscribeActive + withheld prewarm on the other composer. (Fixture fixed vs the first head: one QueryClient per hook, seeded STT config.)
  • hooks/voiceTranscriptInbox.test.ts — multi-subscriber begin; owner-only text delivery with busy release everywhere; unowned text only to accepting subscribers; held-until-owner + redeliverPending (GPT F2 case); several held results each landing for their own session (GPT round 4); errors surface everywhere; scoped unsubscribe.
  • ChatInput.dictation / holdToTalk / lexical / ChatInputCoverage migrated: the voice states they drive now arrive through ComposerVoiceSliceOverride (the test seam) instead of props. New: the held-elsewhere mic renders "Microphone in use in another chat", disabled, no spinner, plus the visible status row; it names the owning chat in quotes ("Microphone in use in “kirocrew”") when that session is a known slot, and falls back to the unnamed copy when it is not; the name in the status row is a button that switches to that chat; in hold mode the keyboard switch shows a visible "Type instead" label and stays enabled mid-capture (pressing it discards the in-flight press and hands the keyboard back); the status row wraps rather than truncates, so the name button survives a long title at pane width; the "Dictation added" cue; no notice row while idle; a real transcription still wins the label; a same-instance double-start cannot release the mic (F2 round 2). VoiceStatusBar.test follows the error branch onto ErrorNotice.
  • test/ChatPage.sendDuringDictation.test.tsx — a batch transcript for a slot that is not on screen lands in that slot's persisted draft, never the live composer (deliverOffScreen). test/ChatPageDrafts.test.tsx — a prefill staged for another slot is neither shown nor consumed, an unreadable prefill is discarded, and a file dragged over the page cannot navigate away. ChatPage.tsx lost ~550 lines of voice wiring here, which dropped its per-file coverage to 79.7%; these pin the paths that were left uncovered.

Verified locally: npx tsc --noEmit, npx eslint on every touched file, I18N_BASE_REF=origin/main npm run i18n:check (two new strings, components.chatInput.mic_in_use_elsewhere / mic_in_use_in / type_label, in all 13 locales plus the pseudo-locale).

Manual verification

Real pods, before = a main-based pod, after = this branch. Members page → default member DM: mic present; click → STT-off setup modal (pod has no provider); with /api/config/stt answered on by the harness, click → real MediaRecorder capture on Chromium's fake device → dictation panel; Esc discards. Split view (pod dashboard.session_grid on): recording in one pane blocks the other's mic with its own label. Held transcript: /api/stt/transcribe answered 4s late by the harness; dictate in default, stop, switch to radar before it answers, switch back — the text is in the composer.

Screenshots / video

light dark
Crew DM composer — before (main)
Crew DM composer — after (mic)
Recording — dictation panel at pane width (hint wraps below the header; the device name still truncates with an ellipsis at this width — the picker shows the full name)
Split view: left pane records, right pane's mic is held — MicOff, disabled, and a visible "Microphone in use in " row above its textarea, naming the chat that holds it
Same on a touch device in hold-to-talk mode: the held pane shows the same status row with the quoted, clickable chat name above a plain disabled hold bar; the holding bar is solid accent, the mode switch no longer wears the recording tint
Held transcript: dictated in default's DM, switched to radar before STT answered, came back — text landed with a "Dictation added to your message" cue
Mic error (permission blocked) through ErrorNotice · mic click with STT off → setup modal



Harness: website/scripts/capture-pane-composer-parity.mjs.

Related Issues

Closes #9775

Follow-ups: #9807 (P3-c Paste atom), #9808 (P3-d Mention atom).

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

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

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 545e664d4197324c700ac4e7118e04424b17eb2d — 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.

First-Principles-Verdict: PASS

Verify the "ChatPage behaviour unchanged" claim: startVoice gained two refusal gates (re-entry latch, mic-owner check) that now also run on the main chat's mic.

What this change ships

Inventory (10 items) — 6 justified, 4 harm-free riders

Intent: give Crew-Member DM threads and split panes the microphone the main chat already has (#9775), by moving dictation out of host-wired props — a FIX, delivered as one slice of a planned extraction (RFC updated in the same commit, as the docs rule mandates).

  1. Crew DM and split-pane composers gain a working microphone (chat-core P3-b: ChatPane composer reaches ChatPage parity (voice input, paste, mentions, slash) #9775) — justified
  2. ChatPage's ~550-line dictation block becomes a root-mounted Voice atom; ChatInput's 23 voice props are deleted — justified
  3. Only one composer can capture at a time; the others' mics disable with a MicOff "in use" state — justified
  4. The blocked composer names the capturing chat; the name is a one-click switch to it — justified
  5. Transcript inbox becomes multi-subscriber; unowned transcripts are held (≤16) and land when their session returns — justified
  6. Brief "Dictation added to your message" cue when a held transcript lands — justified
  7. Steer now also ends live streaming dictation on both hosts (was send-only) — rides along (named harm: a late partial rebuilds already-sent text)
  8. Mic errors render through ErrorNotice; the per-component dismiss label deleted from 14 locales — justified (AUTOSDE errors-use-error-notice)
  9. Pane-width voice UX: panel header wraps, device-label cap removed, hold-mode switch gets a visible "Type instead" label and stays enabled mid-capture, red pulse dropped from the mode switch — rides along (each carries a cited observed failure from this PR's UX review)
  10. Three new ChatPageDrafts tests (foreign-slot prefill, unreadable prefill, drag-over guard) — rides along (harm-free test pins; declaration unverifiable, description truncated at 8000 bytes)

More than 10: locale strings ×14 and the capture harness + 16 screenshots are omitted — the latter follows a counted repo convention (467 sibling capture-*.mjs scripts, temp-screenshots/ with its own README).

Depth check that carried the verdict: the fix sits at CAUSE level for the reported defect — per-host prop plumbing is what let a host ship without the feature, and the root+atom removes that class for voice. The same cause's siblings (paste, mention, slash/skills, editor/send) are counted and deferred with issue numbers (#9807, #9808, P3-c…f) in both the description and the RFC — accepted-and-deferred, not a point patch. The rewritten inbox header pin ("a second mount would silently detach the first") is removed on the pin's own stated premise (route exclusivity) no longer holding, with the pin quoted in the PR — evidence supplied, not recast as "stale". The deliberately absent capabilities record avoids the one zero-consumer surface this shape invited.

[FIRST-PRINCIPLES-REVIEWED] 545e664

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

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

Design-Verdict: PASS

Root-cause fix with the right shape: the atom removes the "host forgot to wire it" bug class, ships no writerless flags, and updates RFC + spec in-commit.

The strangler slice is proportionate (context root now, capabilities deferred to its first writer), the one-mic mutex and multi-subscriber inbox address the real concurrency the second host creates rather than deferring it, failure modes are bounded and stated (held-list cap, generation-scoped latch, documented owner tie-break with its escalation path), and manual verification covers the pane paths CI can't.

Suggestions

  • Until P3-f, hosts wire value/onChange into both Composer and ChatInput with nothing checking they agree; a cheap dev-mode assertion that ChatInput's value matches the root's inputRef would catch the interim miniature of the same "host mis-wires" class for the next host added.

[DESIGN-REVIEWED] 545e664

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

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

UX-Verdict: PASS

Cold reader correctly identified every voice control — mic, busy-elsewhere row, chat-name jump, "Type instead", "Dictation added" — across all sixteen shots, both themes.

[UX-REVIEWED] 545e664

@CrysisDeu CrysisDeu changed the title chat-core P3-b: ChatPane composer reaches ChatPage parity (voice, paste, mentions) feat(chat-core): ChatPane composer reaches ChatPage parity (P3-b) Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 545e664

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

@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

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

Review details

No findings.

The sole candidate — renderNoticeText using notice.text.indexOf(action.label) — is real only as a cosmetic mislocation (the underlined span can land on an earlier identical substring) and requires a chat title that is a substring of the leading template text ("Microphone in use in "), e.g. a chat literally titled Microphone/in/use. The onClick still dispatches switchSlot(voiceBusyElsewhereSession) correctly regardless of which span is wrapped, so there is no broken action, crash, or data loss — only an edge-case visual mis-underline on an unusual title. That does not clear the confidence bar for a reportable finding.

[OPUS-REVIEWED] 21d4bc3

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

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

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Sep 9, 2026
@CrysisDeu
CrysisDeu force-pushed the feat/chat-core-p3b-pane-composer-parity branch from ac5faf5 to 2aa3700 Compare September 10, 2026 00:35
@CrysisDeu CrysisDeu changed the title feat(chat-core): ChatPane composer reaches ChatPage parity (P3-b) feat(chat-core): Composer root + Voice atom; ChatPane gains dictation (P3-b) Sep 10, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: removed — ChatPane's hand-written paste orchestration is gone from this PR

  • Queued paste cancellation loses the pasted content (span=42cfccb1d7fb) — fixed by removal, head 2aa3700.

The pane's paste-block orchestration (expand / store / carry-back / queue stash) is no longer in this PR: the design was redirected to a Composer root + atoms, and paste becomes the Composer.Paste atom in P3-c (#9807) with the queue-stash carry as an acceptance criterion there. On 2aa3700 ChatPane has no pasteBlocks state, so no collapsed paste can reach its queued-send stash. Findings about paste blocks lost across a pane's send / cancel / restore are covered by this ruling until #9807 lands them.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: inbox holds an unowned transcript until an owner appears; redeliverPending on slot change

  • Unclaimed pane transcripts are consumed and dropped (span=132ecbe9b9b3) — fixed, head 2aa3700.

voiceTranscriptInbox.dispatchSettle no longer fans unowned text out to every subscriber. Text goes to the owner; with no owner, only to subscribers that declare acceptsUnowned (ChatPage's draft store, via useVoiceInput opt acceptsUnowned = !!deliverOffScreen); with neither it returns false and the result is HELD in pending. useComposerVoice calls redeliverPending() in its session-change effect, so a pane that switched slots during /api/stt receives the transcript when it shows that slot again; a re-subscribe hands it over too. Busy state is still released everywhere on the first settle. Pinned by voiceTranscriptInbox.test.ts ("holds unowned text nobody can take… GPT F2"). Findings that an unowned batch transcript is dropped by a subscriber without an off-screen sink are covered by this ruling.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Paste/attachment half of parity is a second hand-synced orchestration copy — fixed by redesign, head 2aa3700.

Accepted as the outside view of the same problem: prop-by-prop parity reproduces the drift class. The PR was redirected to a Composer root + atoms (RFC §3 layer 4, §4 P3 text in this head): each capability is one atom that owns its state and hooks and reads one small context; ChatInput renders the atom and reads its state; hosts wrap ChatInput in the root. On 2aa3700 only voice moved (Composer.Voice); the duplicated paste orchestration is removed from ChatPane and becomes Composer.Paste in P3-c (#9807), with a cross-host parity pin as acceptance. The RFC §4.2 table now names P3-c and P3-d rows.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Recording panel in the pane truncates the provider name to "Fa…" — fixed, head 2aa3700.

VoiceDictationPanel's header row is now flex-wrap: at pane width the keyboard hint drops whole to its own line (whitespace-nowrap) and the device picker's cap rises from 40% to 60% of the row, so the provider name reads ("Fake Default Audi…" on the harness device vs "Fa…" before). Screenshot crew-dm-recording-{light,dark}.png on 2aa3700 shows the new layout at ~300px.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

The @ mention picker is no longer wired in ChatPane on 2aa3700 (the PR was narrowed to the Voice atom; mention becomes Composer.Mention in P3-d). #9808's acceptance criteria carry this finding verbatim: middle-truncate keeping the distinguishing tail, or show only the differing suffix, plus the post-pick chip screenshot.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Evidence gaps: long-paste chip and staged @-pick chips never screenshotted — resolved by scope, head 2aa3700.

Neither surface exists in this PR any more: paste collapse and the @ picker left ChatPane with the redesign and are tracked as P3-c (#9807) and P3-d (#9808), each with the requested screenshot named as an acceptance criterion. The screenshot set on 2aa3700 covers what this head ships: before/after composer, recording at pane width, STT-off setup modal.

@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 10, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Intent: Give Crew Members DM threads and split panes a working microphone by making dictation a Composer.Voice atom under a Composer root that any host mounts — so a capability never again depends on a host wiring it prop by prop. ChatPage behaviour unchanged.
Not a goal: Moving paste, mention, slash/skills, editor, send, attach or follow-ups out of ChatInput (P3-c…f), push-to-talk inside panes, or any new pane prop on ChatInput.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Sep 10, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • dispatchSettle's unowned fallback delivers to every acceptsUnowned subscriber — fixed, head 3045852.

Unowned text now lands in at most one taker (the last-subscribed acceptsUnowned sink), the same tie-break the owner path uses, so two co-mounted draft-store hosts cannot each append one transcript to the same persisted draft. voiceTranscriptInbox.test.ts pins it: two takers, one delivery, the other released without text.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • RFC names a Composer.Voice export the code deliberately does not ship — fixed, head 3045852.

The RFC's landed-shape line and the P3-b row now say "root-mounted Voice atom" and note the export is deliberately absent (module-private; the closing note in Composer.tsx), so the spec and the export surface agree.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • Stranded opening quote at line end in the status row — fixed, head 3045852.

The button now carries word joiners (U+2060) between each quotation mark and the name, and the span drops [overflow-wrap:anywhere] (plain break-words remains), so no break opportunity exists between quote and first word. Re-shot: split-mic-held-elsewhere-* and split-hold-bar-held-elsewhere-* show “Fix empty-glob crash in list_sessions” intact on its own line.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • Same message, two shapes; hold mode loses the one-click path to the capturing chat — fixed, head 3045852.

The status row (with the name button) now shows in hold mode too — the !voiceHoldMode gate is gone — and the disabled hold bar keeps its plain "Hold to talk" label instead of repeating the sentence. One message, one shape, and the way to the capturing chat is reachable in both modes. ChatInput.holdToTalk pins the row + plain bar; split-hold-bar-held-elsewhere-* re-shot.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Held pane in hold mode: reader unsure whether typing is still possible — fixed by the notice-row change above, head 3045852.

With the status row naming the reason above a plain disabled bar and the enabled "Type instead" switch beside it, the pane now reads as "mic held elsewhere, typing available" in one glance; the reviewer's own suggestion was that the notice-row fix covers this, and it does.

@CrysisDeu
CrysisDeu force-pushed the feat/chat-core-p3b-pane-composer-parity branch 2 times, most recently from aaa3ad8 to 545e664 Compare September 10, 2026 07:57
@CrysisDeu

CrysisDeu commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • Empty steer discards active dictation (ChatPage.tsx steer, ChatPane.tsx doSteer) — fixed, head 545e664. (span=fd89d98b48d2)

Both steer callbacks now validate the payload before disarming, exactly as send() already did: the disarmForSend() call sits after the !raw && !files.length return, so an Enter on an empty composer before the first partial lands sends nothing and leaves the capture live. Test: ChatPage.sendDuringDictation — mid-turn empty Enter with streaming capture live: no sendChat, no stop/toggle, recording stays true, and the next partial still lands. This ruling covers "a no-op path disarms dictation" for every host that calls disarmForSend.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • Item 6: hold-mode switch now discards in-flight speech, on a same-PR note — author confirms the trade (rebutted as intended).

Confirmed as intended: the switch itself deletes nothing. It hands the keyboard back; the discard is the hold gesture's own pre-existing teardown (useTouchPushToTalk.abandon, "a gesture may not outlive the element it is bound to"), the same rule pointercancel and hold-mode-off already apply. The greyed switch protected a capture from being orphaned, which the teardown already guarantees, so it only removed the way out of voice mode. If a real-user report shows the opposite preference, the one-line disabled gate restores the old behaviour.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

The root-plus-atoms shape is the direction this PR was given by its owner mid-review (the prop-spread alternative was the first head, ac5faf5, and was redirected); the RFC line records that ruling. The machinery's second consumer is the Paste atom, #9807 (deferred-finding, assignee CrysisDeu, Due 2026-09-24), which also carries the shared publish-on-change extraction — the moment the Slot store has two writers is the moment it is either justified or collapsed, and that issue is where that judgement is due.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • Drop the legacy acceptsUnowned ?? !ownsSession default in useVoiceInput.ts — fixed (subtracted), head 545e664.

The flag is now explicit with a plain ?? false; the one production caller (useComposerVoice.ts) passes both ownsSession and acceptsUnowned, so the inferred "no predicate means take everything" branch had no caller. Doc comment updated to match.

… (P3-b)

Crew Members DM threads and split panes had no microphone: ChatInput
learned about dictation through 23 voice*/onVoice* props that only
ChatPage wired. Wiring them into ChatPane would close today's gap and
reopen it with the next capability.

- RFC §3 layer 4 / §4 P3: the composer becomes a `Composer` root plus
  atoms that own their own state and read one small context
  ({ slotKey, editor onChange/inputRef, capabilities }); surfaces
  compose; no atom imports the store (#8651). ChatInput becomes a
  preset composition of atoms slice by slice (P3-c..f).
- chat-core/composer/Composer.tsx: root + context + Composer.Voice.
  The atom runs useComposerVoice (ChatPage's dictation block, extracted
  verbatim) and publishes its state into the root; ChatInput renders
  the atom and reads that state with one hook; its 23 voice props are
  deleted. ChatPage wraps ChatInput in the root and hands the atom only
  what it cannot know (on-screen predicate, off-screen draft delivery,
  auto-submit, push-to-talk, caret refs) — behaviour unchanged. ChatPane
  wraps ChatInput in the root with queue:false (#8852) and gets a mic.
- One microphone across mounted composers (module-level capture owner;
  other mics read it as voiceTranscribeActive, prewarm withheld).
- voiceTranscriptInbox becomes multi-subscriber: begin fans out, settle
  delivers text once — to the owner, else to a subscriber that accepts
  unowned text, else HELD until a composer for that session is back on
  screen (redeliverPending on slot change). No unowned drop.
- VoiceDictationPanel header wraps at pane width so the device name is
  readable and the keyboard hint takes its own line.
- ChatInput dictation tests migrate to the ComposerVoiceSliceOverride
  seam; new tests for the root, the pane, the mutex and the inbox.
- Capture harness + before/after screenshots (temp-screenshots/).

Closes #9775
@CrysisDeu
CrysisDeu force-pushed the feat/chat-core-p3b-pane-composer-parity branch from 545e664 to 21d4bc3 Compare September 10, 2026 08:15
@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

FINDING -- website/src/components/ChatPane.tsx:292 -- doSendRef.current?.() omits the steer flag, so endpointed dictation queues during a busy steer-only member turn -> Fix: pass steerNow when busyMode === 'steer-only' && busy.
[GPT-REVIEWED] 21d4bc3

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

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Dev-mode assertion that ChatInput's value matches the root's inputRef until P3-f — rebutted (disproportional for the window it would guard).

The double wiring exists in exactly two hosts, both written in this PR and both pinned by parity tests that drive the real ChatInput under the real root (ChatPane.composerParity.test.tsx, Composer.test.tsx: a press reaches the engine and the transcript lands in the composer the user sees). A third host cannot be added without going through the same tests, and P3-f (the Editor atom) removes the second wire entirely — a dev-only assertion would be a new mechanism whose whole lifetime is the gap before that slice, the "flag without a writer" shape the First Principles lane has twice asked this PR not to ship.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 10, 2026
@iamwhatever
iamwhatever merged commit 41724de into main Sep 10, 2026
67 of 73 checks passed
@iamwhatever
iamwhatever deleted the feat/chat-core-p3b-pane-composer-parity branch September 10, 2026 17:43
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 10, 2026
amadsalmon pushed a commit to amadsalmon/KiroCrew that referenced this pull request Sep 22, 2026
… (P3-b) (kirodotdev#9787)

Crew Members DM threads and split panes had no microphone: ChatInput
learned about dictation through 23 voice*/onVoice* props that only
ChatPage wired. Wiring them into ChatPane would close today's gap and
reopen it with the next capability.

- RFC §3 layer 4 / §4 P3: the composer becomes a `Composer` root plus
  atoms that own their own state and read one small context
  ({ slotKey, editor onChange/inputRef, capabilities }); surfaces
  compose; no atom imports the store (kirodotdev#8651). ChatInput becomes a
  preset composition of atoms slice by slice (P3-c..f).
- chat-core/composer/Composer.tsx: root + context + Composer.Voice.
  The atom runs useComposerVoice (ChatPage's dictation block, extracted
  verbatim) and publishes its state into the root; ChatInput renders
  the atom and reads that state with one hook; its 23 voice props are
  deleted. ChatPage wraps ChatInput in the root and hands the atom only
  what it cannot know (on-screen predicate, off-screen draft delivery,
  auto-submit, push-to-talk, caret refs) — behaviour unchanged. ChatPane
  wraps ChatInput in the root with queue:false (kirodotdev#8852) and gets a mic.
- One microphone across mounted composers (module-level capture owner;
  other mics read it as voiceTranscribeActive, prewarm withheld).
- voiceTranscriptInbox becomes multi-subscriber: begin fans out, settle
  delivers text once — to the owner, else to a subscriber that accepts
  unowned text, else HELD until a composer for that session is back on
  screen (redeliverPending on slot change). No unowned drop.
- VoiceDictationPanel header wraps at pane width so the device name is
  readable and the keyboard hint takes its own line.
- ChatInput dictation tests migrate to the ComposerVoiceSliceOverride
  seam; new tests for the root, the pane, the mutex and the inbox.
- Capture harness + before/after screenshots (temp-screenshots/).

Closes kirodotdev#9775
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.

chat-core P3-b: ChatPane composer reaches ChatPage parity (voice input, paste, mentions, slash)

2 participants