Repository navigation
fix(chat): collapse answered questions and running terminals - #1827
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Answered question cards can remain expanded when the existing pending history row transitions to answered because the collapse hook reads its default only on mount. Ongoing terminal cards also default to expanded, causing command input and output to occupy the chat timeline.
Solution
Collapse chat question history when an interaction transitions into the answered state, while preserving manual expansion and existing simulator behavior. Make terminal command cards collapsed by default for running, backgrounded, and settled commands; users can still expand a row manually, and settled transitions continue to collapse it.
Potential risks
Ongoing terminal output is no longer visible until its row is expanded, though lifecycle status and the stop control remain available in the header. Explicit per-event collapse state and simulator presentation are preserved. The full repository typecheck remains affected by unrelated existing errors described below.
Verification
pnpm exec vitest run --config config/vitest.config.ts src/engines/ChatPanel/events/interactive_events/ask-question/__tests__/AskQuestionEvent.collapse.test.ts src/engines/ChatPanel/events/interactive_events/ask-question/__tests__/extractAnsweredData.test.ts src/engines/ChatPanel/blocks/TerminalBlock/collapsePolicy.test.ts— passed, 3 files / 18 testspnpm exec eslint src/engines/ChatPanel/events/interactive_events/ask-question/index.tsx src/engines/ChatPanel/events/interactive_events/ask-question/__tests__/AskQuestionEvent.collapse.test.ts src/engines/ChatPanel/blocks/TerminalBlock/index.tsx src/engines/ChatPanel/blocks/TerminalBlock/collapsePolicy.test.ts— passedgit diff --check— passed for the in-scope changesNODE_OPTIONS=--max-old-space-size=8192 pnpm typecheck— not clean because of unrelated existing errors insrc/components/SearchInput/SearchInput.test.tsandChatGroupMeta.hasBodyreferences in the pre-existing chat-group changes