Repository navigation
fix(chat): follow Settings -> Chat in bot chats and split panes - #37861
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. Having the rows and the composer read their own settings, with any prop the host passes still winning, fixes the cause and not one surface at a time. Screenshots of this revision are attached. Notes
[DESIGN-REVIEWED] 6d1b499 Description read[DESCRIPTION-READ] 1ae3225bba4fd2e06c29da577eeeeda8c41e41622e0fb6d248dcc61d04aa77e0 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The PR adds no new control or copy. It applies existing Settings -> Chat choices to Bot chats and split panes, and the screenshots show the paste and timestamp cases. Notes
[UX-REVIEWED] 6d1b499 Description read[DESCRIPTION-READ] 65a7ac009afa6666913e53684fb37c6d28ee15da3c5e94a9530ef11fb9c1b704 That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Two things to look at, neither blocking: split panes and the crew window now fold working steps by default, which the description never says, and the Sessions chat still hides timestamps and turn stats itself, a check the rows now repeat. Notes
What this change shipsInventory (10 items) — 7 justifiedIntent: settings chosen under Settings → Chat take effect in a Bot's chat and in split-view panes, as they do on the Sessions page. A FIX.
[FIRST-PRINCIPLES-REVIEWED] 6d1b499 Description read[DESCRIPTION-READ] 146af2dde1764b40f12dea7a8fdc260378152f5bbd3c3cb3114981e0c08259f7 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
e4d3950 to
14f9131
Compare
|
Not re-syncing for a docs-only base move. Head 14f9131 cherry-picked onto ffb50b0 merges cleanly ( |
|
This PR edits docs/feature-map/README.md, which records product design. A maintainer needs to approve that before it can merge. Review result: no blocking findings on this head. The review traced every changed path in the diff. It checked that useChatSetting returns only primitive values, so no snapshot can loop on re-render. ChatInput's stored fallbacks keep the old composer defaults. The timestamp and turn stats gating changes nothing in the Sessions chat. The Optional:
|
14f9131 to
cb4deec
Compare
|
Rebased: main moved in website/src/app-sdk/messageRenderers.tsx, website/src/pages/chat/transcriptRenderers.tsx, docs/feature-map/README.md and docs/system-specs/modules/learn-cron-dashboard.md since this head went green (31cc202 -> bb912cb); CI re-running. On the rebased head cb4deec, tsc and the 179 vitest files that touch those renderers or this PR pass (3242 tests). |
cb4deec to
292d683
Compare
|
self-added: yes
|
|
|
292d683 to
0d4b2b3
Compare
|
Not re-syncing for an unrelated same-directory move: |
0d4b2b3 to
1942138
Compare
|
Rebased: main moved in website/src/pages/chat/AssistantMessage.tsx (a conflict on its prop list: main renamed |
|
The re-sync budget for this PR is spent (3/3), so the drive loop stops rebasing here. |
A Bot's chat and a split-view pane draw through ChatPane, which never threaded most chat settings, so Show Pasted Text in Full, Show Timestamps, turn stats, File Change Chips, Show Thinking Inline, Copy on Select, Link Previews and the context readout only worked on the Sessions page. The composer and the message rows now read these settings themselves through one live reader (useChatSetting), with a host prop still winning, so a surface that forgets to pass one still follows the user. The pane passes Copy on Select and Link Previews to its rows, and the pane and the crew window pass Show Thinking Inline. A Bot's chat keeps its turns unfolded: it draws messages only. ChatMessageList starts a turn at the same rows the Sessions chat does (opensDisplayTurn), so a fold never takes an auto-nudge cycle's answer.
1942138 to
6d1b499
Compare
|
Resolved the current merge conflicts and rebased onto main at d76732d. Kept main’s new Prompt stash row and grillMid/grillSent message fields, then reapplied this PR’s chat-setting changes. Focused Vitest: 111 passed. TypeScript, changed-file ESLint, feature-map, docs-lint, and diff checks passed. New head: 6d1b499. |
Problem / Motivation
Goal: A Bot's chat and a split-view pane follow the user's Settings -> Chat choices the same way the Sessions chat does.
Turn on Show Pasted Text in Full and paste a long block into a Bot's chat: it still collapses into a
[ Paste #1 · N lines ]chip. The same is true of Show Timestamps, File Change Chips, Show Thinking Inline, Copy on Select, Link Previews and the context readout: each works on the Sessions page and is ignored in a Bot's chat and in split-view panes.Why it matters
Anyone who talks to Bots, or works in split view, cannot set up their chat once. Turning a setting on appears to do nothing on those surfaces, so the settings page reads as broken there.
Not a goal
useComposerSendModeand the Sessions chat's send-key wiring as they are.What changed (motivation → approach → change)
Symptom → cause → change: a Bot's chat and a split pane both draw through
ChatPane. The Sessions chat threads each setting into the composer and the rows as a prop;ChatPanethreaded almost none, so those surfaces fell back to built-in defaults. Threading more props intoChatPanewould leave the next new surface with the same gap, so the components that draw a setting read it themselves, and a host's prop still wins.ChatInput(chat-input/composerSettings.ts)AssistantMessage,UserMessageChatMessageListcollapseAllStepsOne live reader,
hooks/useChatSetting.ts, serves all of them and five existing single-setting hooks (spellcheck, inline markdown, arrow-key history, dim inactive panes, simplified tool names), which were five copies of the same subscription. It updates onmc-config-changedand on a save in another tab. Its snapshot must be a primitive, soloadChatConfig(pages/chat/ChatSettings.tsx) coercesshowTimestamps,collapseAllStepsandsimplifiedToolNamesto booleans, like its other fields.ChatMessageListstarts a turn at the same rows the Sessions chat does (opensDisplayTurn, which counts an auto-nudge cycle), so a fold never takes an earlier cycle's answer. A Bot's chat does not fold its turns: it draws messages only (2026-10-09 decision), so folding would hide the Bot's own words. The Sessions dock and the crew window stop threading the composer values, and the docs that named the old wiring (docs/feature-map/README.md,learn-cron-dashboard.md,turn-stats-footer.md) say where each is read.Backwards compatibility
Compatible: every changed prop is optional and still wins when a host passes it; a host that passes nothing gets the user's stored choice, whose defaults equal the values these surfaces used before (timestamps on, turn stats on, chips expanded, pastes collapsed, context readout off).
Removes nothing: no prop, export, setting or stored key is removed; the five hooks keep their names and return values.
Tests
website/src/pages/members/CrewComposer.chatSettings.test.tsx: the real Bot composer collapses a long paste by default and keeps it as text with the setting on.website/src/test/chatRowSettings.test.tsx: reply and user rows drop a timestamp the host still passes, the SDK rows a Bot's chat draws through hide both times, turn stats follow their setting, chip style falls back to the stored one, and a change applies to a row already on screen.website/src/test/composerSettings.test.tsx: stored fallback, defaults, prop wins, live update, and another-tab update.website/src/test/ChatMessageList.collapseAllSteps.test.tsx: the list forwards the fold toTurnBlockon both its plain and virtualized mounts, an embed keeps every step by default, and in a finished two-cycle auto-nudge session the nudge row opens its own turn, so neither cycle's answer is folded.website/src/test/ChatSettings.test.tsx: a stored non-boolean for each of the three coerced fields reads as its default.Proof: not provable -- frontend test (prove.py runs Python only)
Reverting the paste fallback by hand turns
CrewComposer.chatSettings.test.tsxred (1 failed, 1 passed).Determinism: no timers, clocks or ports; state is seeded through
localStorage, which the setup file restores after each test.Manual verification
ChatInput.approval.test.tsxandCrewChatWindow.test.tsx, whose same 4 cases fail on an untouchedorigin/maincheckout on this host.mainand this branch.Screenshots / video
A Bot's chat as
ChatPanedraws it (the SDK rows and the realCrewComposer, no setting threaded as a prop), rendered from each tree's own Storybook build with Settings -> Chat set to Show Pasted Text in Full: on and Show Timestamps: off, then a 12-line paste.mainRelated Issues
Closes #37860
Sibling sweep
Swept: git grep -nE "<(ChatMessageList|ChatInput|StableChatInput|ChatPane|ChatEmbed|ChatPanel)\b" -- website/src
Sibling: website/src/components/ChatPane.tsx -- changed here
Sibling: website/src/pages/chat/crew-window/CrewChatWindow.tsx -- changed here
Sibling: website/src/components/SessionGridView.tsx -- not affected -- it mounts ChatPane, so the pane change covers split view
Sibling: website/src/pages/members/MembersPageThread.tsx -- not affected -- it mounts ChatPane with CrewComposer, covered by the pane and composer reads
Sibling: website/src/app-sdk/ChatEmbed.tsx -- not affected -- it already reads Show Pasted Text in Full itself, and its rows read the row settings now
Pattern harvest
Rule candidate: review-prompt
Pattern: a chat setting threaded as a prop from one host only, so every other surface drawing the same component silently drops it; read it in the component instead.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)