Skip to content

fix(chat): follow Settings -> Chat in bot chats and split panes - #37861

Merged
bolichen97 merged 1 commit into
mainfrom
fix/bot-chat-settings-parity
Nov 18, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/bot-chat-settings-parity

Conversation

@KiroCrewCaptain

@KiroCrewCaptain KiroCrewCaptain commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • The phone send-key rule (Return inserts a line on a phone). #23215 owns it; this PR leaves useComposerSendMode and the Sessions chat's send-key wiring as they are.
  • Settings a Bot's chat leaves off on purpose: Pin the Latest Turn (feat(crew): no pinned-prompt banner in a crewmate's chat #18346), Optimize Prompt, and the agent / model / effort / approval chips (a Bot sets those on its profile card).
  • Features the pane does not have at all (Edit & Resend, the turn minimap, Share).
  • #37237 (a sent paste expanding after the Bot replies), a separate storage bug.

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; ChatPane threaded almost none, so those surfaces fell back to built-in defaults. Threading more props into ChatPane would 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.

Setting Read by Reaches
Show Pasted Text in Full, context % / tokens ChatInput (chat-input/composerSettings.ts) every composer
Show Timestamps, turn stats, File Change Chips AssistantMessage, UserMessage every message row
Show Thinking Inline ChatMessageList collapseAllSteps split panes, crew window
Copy on Select, Link Previews pane renderer options split panes, Bot's chat

One 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 on mc-config-changed and on a save in another tab. Its snapshot must be a primitive, so loadChatConfig (pages/chat/ChatSettings.tsx) coerces showTimestamps, collapseAllSteps and simplifiedToolNames to booleans, like its other fields. ChatMessageList starts 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 to TurnBlock on 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.tsx red (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

  • Every vitest file that reads the chat config (212 files, 3017 tests) passes.
  • The wider chat set (488 files) passes except 2 files, ChatInput.approval.test.tsx and CrewChatWindow.test.tsx, whose same 4 cases fail on an untouched origin/main checkout on this host.
  • The before/after screenshots below were taken by hand in Storybook builds of main and this branch.

Screenshots / video

A Bot's chat as ChatPane draws it (the SDK rows and the real CrewComposer, 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.

main this PR
Paste main: the paste still collapses to a chip this PR: the paste stays as text
Hover a reply main: the reply still shows its time this PR: no time, as on the Sessions chat

Related 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|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

@KiroCrewCaptain
KiroCrewCaptain requested a review from a team as a code owner November 16, 2026 06:58
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 6d1b499882aa17f574245b2cc7101cb7114ddf57 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • useChatSetting's snapshot calls loadChatConfig(), which parses localStorage on every render. Each AssistantMessage now makes three of those calls, so a long transcript re-render parses the stored config about three times per row. Memoizing the parsed config once per mc-config-changed/storage event inside the hook would remove that cost on every surface.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 6d1b499882aa17f574245b2cc7101cb7114ddf57 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Before/after screenshots show only Show Pasted Text in Full and Show Timestamps. Add stills of the other settings this PR now applies (thinking folded in a split pane, the context readout in a Bot composer, file-change chip style) so a reviewer can check them.
  • The blind reader couldn't tell whether the [ Paste #1 · 12 lines ] chip gets sent as the full log or as the label, and wasn't sure the full log was behind it. This chip existed before the PR, so it's a candidate for a follow-up.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 6d1b499882aa17f574245b2cc7101cb7114ddf57 — 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 does not.

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

  • Item 3 — undeclared: the description says the user's stored defaults "equal the values these surfaces used before". That is not true for Show Thinking Inline. The stored collapseAllSteps defaults to true (ChatSettings.tsx:180), and collapseAllSteps={!crewmate && chatConfig.collapseAllSteps} now folds the steps of every finished turn in split panes and in the crew window. Before, those surfaces showed every step.
  • Item 2 — second check: AssistantMessage and UserMessage now read showTimestamps and showTurnStats themselves. transcriptRendering.tsx:426 still checks them again (chatConfig.showTimestamps ? msgTime : undefined, chatConfig.showTurnStats ? … : undefined). Subtraction: delete those two checks and pass the values through unchanged.

What this change ships

Inventory (10 items) — 7 justified

Intent: 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.

  1. A Bot's chat and split-pane composers follow Show Pasted Text in Full and the context readout — justified
  2. Every reply and user row follows Show Timestamps, turn stats and the file chip style — justified
  3. Split panes and the crew window now fold working steps by default — undeclared
  4. Replies in split panes and Bot chats follow Copy on Select and Link Previews — justified
  5. The SDK list starts a new turn at an auto-nudge cycle — rides along
  6. Five single-setting hooks now share one reader that also updates on a save in another tab — rides along
  7. Three stored settings are coerced to booleans when the chat config loads — justified
  8. The Sessions dock and crew window stop passing composer settings as props — justified
  9. ChatMessageList gets a collapseAllSteps prop, used by 2 callers — justified
  10. Docs now say where each setting is read — justified

[FIRST-PRINCIPLES-REVIEWED] 6d1b499

Description read

[DESCRIPTION-READ] 146af2dde1764b40f12dea7a8fdc260378152f5bbd3c3cb3114981e0c08259f7

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 6d1b499882aa17f574245b2cc7101cb7114ddf57 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 6d1b499

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 6d1b499882aa17f574245b2cc7101cb7114ddf57 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 6d1b499

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 6d1b499882aa17f574245b2cc7101cb7114ddf57 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain
KiroCrewCaptain force-pushed the fix/bot-chat-settings-parity branch from e4d3950 to 14f9131 Compare November 16, 2026 07:55
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

Rebased: main moved in docs/feature-map/README.md and docs/system-specs/modules/learn-cron-dashboard.md since this head went green (467de02 -> 31cc202); CI re-running. Feature-map check, docs-lint and tsc pass on the rebased head 14f9131.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 16, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

Not re-syncing for a docs-only base move. main moved 5 commits (31cc202 -> ffb50b0) in docs/feature-map/README.md (same file, other rows) and in other files under docs/system-specs/modules/; none of this PR's code files changed on main.

Head 14f9131 cherry-picked onto ffb50b0 merges cleanly (docs/feature-map/README.md auto-merges), and on that merged tree scripts/check_feature_map.py, scripts/docs-lint.sh and tsc -p tsconfig.app.json all pass. Keeping the current green and the re-sync budget (1/3 used).

@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 16, 2026 09:01
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

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 !crewmate guard keeps a Bot's chat from folding, which follows the 2026-10-09 decision. The new row, composer and list tests fail on main, and each one pairs an absence check with a presence check. Done well: the components that draw a setting now read it themselves, so the next host of a pane or composer cannot drop a setting by forgetting a prop.

Optional:

  • In split panes and the pop-out crew window, finished turns now fold by default (ChatPane.tsx:985, CrewChatWindow.tsx:500). On main they never folded. This matches the Sessions chat and the goal, but the Backwards compatibility section says the defaults are unchanged. Please name this change there so the merging maintainer can accept it.
  • The comment at AssistantMessage.tsx:137 says "A host's explicit value still wins". That holds only for fileChipStyle. For timestamp and turnStats, the setting decides. Please reword the comment.
  • No test mounts ChatPane or CrewChatWindow, so dropping the fold prop, its !crewmate guard, or the Copy on Select and Link Previews options would not fail any test. One assertion in ChatPane.crewmate.test.tsx would cover the guard.

@KiroCrewCaptain
KiroCrewCaptain force-pushed the fix/bot-chat-settings-parity branch from 14f9131 to cb4deec Compare November 16, 2026 11:55
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

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

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 16, 2026
@KiroCrewCaptain
KiroCrewCaptain force-pushed the fix/bot-chat-settings-parity branch from cb4deec to 292d683 Compare November 16, 2026 12:23
@KiroCrewCaptain

KiroCrewCaptain commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

self-added: yes
mechanism: ChatMessageList turn boundary uses the shared opensDisplayTurn rule

  • span=c1b4d32b6b25 Preserve auto-nudge turn boundaries when collapsing steps

fixed in 292d683: the list's turn-boundary branch uses opensDisplayTurn (groupDisplayItems.ts), the rule the Sessions chat groups by, so a nudge row opens its own turn and a fold never takes the previous cycle's answer.
Class swept: groupDisplayItems.ts and transcriptRows.ts already use opensDisplayTurn; chatStream.ts's role check is a live status reset, not grouping. No other site.
Regression: ChatMessageList.collapseAllSteps.test.tsx renders a finished two-cycle nudge session on both mounts; it fails without the fix with the turn [assistant, nudge, assistant] and passes with it.

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

Backend Tests (3.12, 7) is red on test/test_denied_commands_security_ssh_self.py::TestSshFloorNestingDepth::test_the_gate_refuses_a_nest_past_the_bound_without_an_exception. That is main's red, not this PR's: this PR changes no backend file, and the same node id fails on an untouched origin/main checkout at d2f22f2. It is tracked in #37963 and fixed by #37964; this PR waits for that fix and rebases onto it.

@KiroCrewCaptain
KiroCrewCaptain force-pushed the fix/bot-chat-settings-parity branch from 292d683 to 0d4b2b3 Compare November 16, 2026 14:22
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

Absorbed the red-main fix: rebased onto 529da1e, which carries #37964, so test_denied_commands_security_ssh_self.py (382 passed locally) no longer reds the backend shards and Coverage Gate. No file of this PR changed on main; tsc and the PR tests pass on 0d4b2b3. CI re-running.

@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 Nov 16, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

Not re-syncing for an unrelated same-directory move: main moved 3 commits (529da1e -> 7e5a48b) in website/src/components/SortableHeader.tsx, which this PR does not touch. Head 0d4b2b3 cherry-picked onto 7e5a48b applies cleanly, and on that tree tsc -p tsconfig.app.json and this PR's tests plus the SortableHeader tests pass (6 files, 67 tests). Keeping the current green and the last re-sync.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 16, 2026
@github-actions github-actions Bot added the readiness: passed Eligible automated validation passed for the current revision label Nov 16, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 16, 2026
@KiroCrewCaptain
KiroCrewCaptain force-pushed the fix/bot-chat-settings-parity branch from 0d4b2b3 to 1942138 Compare November 16, 2026 16:05
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

Rebased: main moved in website/src/pages/chat/AssistantMessage.tsx (a conflict on its prop list: main renamed blocked_links to link_blocks there), docs/feature-map/README.md and other docs since this head went green (529da1e -> c2d1e47); CI re-running. The conflict kept main's line and re-applied this PR's three renames (timestamp, turnStats, fileChipStyle). On 1942138, tsc, eslint and the 364 vitest files that touch these rows and panes pass (6204 tests).

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 16, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

The re-sync budget for this PR is spent (3/3), so the drive loop stops rebasing here. main keeps moving in docs/feature-map/README.md (other rows of the same table). Head 1942138 still applies cleanly onto main 0c19eec, and check_feature_map.py and docs-lint.sh pass on that tree; CI on this head is still running. A maintainer comment opening with Re-sync budget reset resumes automated re-syncs; auto-merge stays armed and needs a maintainer approval.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 16, 2026
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.
@KiroCrewCaptain
KiroCrewCaptain force-pushed the fix/bot-chat-settings-parity branch from 1942138 to 6d1b499 Compare November 18, 2026 07:36
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator Author

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.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision labels Nov 18, 2026
@bolichen97
bolichen97 disabled auto-merge November 18, 2026 07:48
@bolichen97
bolichen97 merged commit fdc6934 into main Nov 18, 2026
94 of 96 checks passed
@bolichen97
bolichen97 deleted the fix/bot-chat-settings-parity branch November 18, 2026 07:48
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 18, 2026
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.

Bot chats and split panes ignore Settings -> Chat (Show Pasted Text in Full, timestamps, ...)

2 participants