You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(chat): move the turn and work rows out of ChatView.tsx - #4889
Move-only split of the top of src/components/ChatView.tsx (2,636 lines). The small components above the ChatView body move unchanged into two files; the ChatView body itself (about 1,350 lines), ChatFallback and the terminal fallback stay where they are.
New file
Moved
ChatWork.tsx
the tool and work rows: WorkBlockView, WorkRow, ToolInputView, ToolOutputText, TodoList, PatchView, EditDiff, the image thumbnails (ImageGallery, LineImages, ...), PendingWorkHead, turnWork, and the four row contexts they read (ChatPaneContext, ChatHistoryContext, ImageViewerContext, ToolPathRootContext)
ChatWork.tsx imports nothing from the other two, ChatTurn.tsx imports only ChatWork.tsx, and ChatView.tsx imports both: no import cycle. The existing ChatTurn.test.ts now sits next to the file it tests.
Lines that are not moves
export on the moved names that ChatView.tsx or ChatTurn.tsx use (Turn and PendingWorkHead were already used by the body; the contexts are provided by ChatView and read by the rows).
Imports split per file.
Tests and notes that name the old file: Turn is imported from ChatTurn.tsx in four tests, PART_FILES.chat in src/lib/i18n.test.ts and the chat dictionary headers list the new files, Visualization.test.tsx's "only a chat answer's Markdown asks for references" check names ChatTurn.tsx, THIRD_PARTY_NOTICES.md (the user message fold credit follows UserMessage), docs/chat-skill-activity.md.
Verification
git diff --color-moved --color-moved-ws=allow-indentation-change origin/main...HEAD: a line-multiset comparison of removed and added lines leaves only the export keywords and the imports.
bun run check fast: green (typecheck, build, 29,194 unit tests).
In the CI runner image (herdr-ci-runner:local), the chat browser scripts: 27/27 passed on the first attempt (no retries): every chat script bun scripts/browser-checks.ts maps to these files (chat-fallback-browser-qa, chat-virtual-browser-qa, copilot-chat-browser-qa, chat-selection-copy-regression, chat-history-browser-qa, chat-gjc-streaming-browser-qa, devin-chat-browser-regression, grok-chat-browser-qa, chat-tool-paths-demo-regression, agy-chat-browser-qa, chat-quote-selection-end-regression, chat-outcome-note-browser-qa, chat-local-send-follow-demo-regression, chat-working-line-demo-regression, chat-selection-turn-end-demo-regression, chat-select-quote-demo-regression, chat-request-details-demo-regression, chat-visualization-browser-qa, chat-greeting-demo-regression, chat-no-rewind-demo-regression, chat-reading-position-demo-regression, chat-math-demo-regression, omo-chat-browser-qa, chat-markdown-images-browser-qa, chat-svg-figures-demo-regression, chat-list-markers-demo-regression, chat-scroll-padding-regression).
Move-only split of the top of ChatView.tsx (2,636 lines): the tool and work rows
(ToolInputView, WorkRow, WorkBlockView and their helpers, with the four row contexts)
move unchanged into ChatWork.tsx, and the turn rows (Turn, OutcomeRow, OutcomeChip,
UserMessage, CopyButton and their helpers) into ChatTurn.tsx. The ChatView body,
ChatFallback and the terminal fallback stay.
Not moves: the moved names ChatView or ChatTurn use gain export, the imports are
split per file, and the tests and notes that name the old file now name the new one
(Turn's test imports, the chat i18n part list, the Visualization caller check,
THIRD_PARTY_NOTICES, docs/chat-skill-activity.md).
Move-only PR: every removed line of the top of ChatView.tsx reappears unchanged in ChatWork.tsx or ChatTurn.tsx (checked with git diff --color-moved --color-moved-ws=allow-indentation-change and a removed/added line-multiset comparison: only export keywords, the per-file imports and the file names in tests/notes differ, all listed in the description). The ChatView body is untouched. No behavior, wording, style or contract change, so under the move-only rule it merges on the omo gate and CI without a CodeRabbit review.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Refactor
Chat conversations continue to show user and agent messages, images, skill activity, goals, work progress, tool results, and previews.
Message actions—including copying answers or text, dismissing recorded results, and available follow-up actions—remain part of the conversation experience.
Work details and tool outputs retain their expandable, searchable, and status displays.
Chat work and turn rendering move from ChatView.tsx into ChatWork.tsx and ChatTurn.tsx. ChatView.tsx retains the conversation view and uses the extracted components. Tests, documentation, notices, and localization coverage references are updated.
Changes: Chat rendering
Layer / File(s)
Summary
Tool and work rendering src/components/ChatWork.tsx
Adds tool input and output rendering, image galleries, todo groups, work rows, and work-block rendering.
Adds rendering for user and agent turns, outcomes, task results, notices, and goal waits. Tests import Turn from ChatTurn.tsx and update the visualization assertion.
View wiring and references src/components/ChatView.tsx, src/lib/i18n/*, docs/chat-skill-activity.md, THIRD_PARTY_NOTICES.md
ChatView.tsx imports the extracted components and removes inline rendering code. Documentation, notices, and localization coverage references are updated.
This refactor moves chat turn and work rendering into separate files without changing behavior. No merge-blocking risk was found, and the reported checks and moved-code comparison support that.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the primary change: moving the turn and work rows out of ChatView.tsx. The raw summary confirms ChatWork.tsx and ChatTurn.tsx were added and ChatView.tsx lost about 960 lines of inline…
Description check
The description follows the template's Change and Validation sections. The Change section explains the problem and resulting behavior: a move-only split of ChatView.tsx, with a table of moved symbols,…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the primary change: moving the turn and work rows out of ChatView.tsx. The raw summary confirms ChatWork.tsx and ChatTurn.tsx were added and ChatView.tsx lost about 960 lines of inline components. The title uses the conventional refactor(chat) prefix and is 63 characters long.
Full details: Description check
Explanation
The description follows the template's Change and Validation sections. The Change section explains the problem and resulting behavior: a move-only split of ChatView.tsx, with a table of moved symbols, the import structure, and the non-move edits. The Validation section lists the commands run (bun run check fast) with results and the browser script outcomes. The template asks for a linked issue for features only, and this is a refactor, so none is required. The description does not name the exact checks skipped, and it does not state whether contract tests were relevant, which is a minor gap.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 12e9a21 and b49ff47.
Files selected for processing: 14
THIRD_PARTY_NOTICES.md
docs/chat-skill-activity.md
src/components/ChatTurn.test.ts
src/components/ChatTurn.tsx
src/components/ChatView.copy.test.tsx
src/components/ChatView.goalWait.test.tsx
src/components/ChatView.stopped.test.tsx
src/components/ChatView.tsx
src/components/ChatWork.tsx
src/components/Visualization.test.tsx
src/lib/i18n.test.ts
src/lib/i18n/chat.ja.ts
src/lib/i18n/chat.ko.ts
src/lib/i18n/chat.zh.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
Merged through pr-merge at head 51cd215e8. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.
main had moved since the checks of acf6c27cb: pr-merge --update merged it in (5df29318b), and every required check was green at this head.
It waited in the merge queue behind #4886, whose change overlaps it, before it was updated.
Move-only split (description lists every non-move line). Reviews: omo gate CLEAR at acf6c27 (dori review); CodeRabbit skipped under the move-only rule, on the owner's word for lane refactor-top3 (Fable refactor review: all recommendations go). Runner-image chat browser 27/27 first attempt.
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
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.
What
Move-only split of the top of
src/components/ChatView.tsx(2,636 lines). The small components above theChatViewbody move unchanged into two files; theChatViewbody itself (about 1,350 lines),ChatFallbackand the terminal fallback stay where they are.ChatWork.tsxWorkBlockView,WorkRow,ToolInputView,ToolOutputText,TodoList,PatchView,EditDiff, the image thumbnails (ImageGallery,LineImages, ...),PendingWorkHead,turnWork, and the four row contexts they read (ChatPaneContext,ChatHistoryContext,ImageViewerContext,ToolPathRootContext)ChatTurn.tsxTurn,UserMessage,OutcomeRow,OutcomeChip,TaskResultRow,TeammateMessageRow,GoalWaitRow,FailedRequests,CopyButton,userTextChatWork.tsximports nothing from the other two,ChatTurn.tsximports onlyChatWork.tsx, andChatView.tsximports both: no import cycle. The existingChatTurn.test.tsnow sits next to the file it tests.Lines that are not moves
exporton the moved names thatChatView.tsxorChatTurn.tsxuse (TurnandPendingWorkHeadwere already used by the body; the contexts are provided byChatViewand read by the rows).Turnis imported fromChatTurn.tsxin four tests,PART_FILES.chatinsrc/lib/i18n.test.tsand the chat dictionary headers list the new files,Visualization.test.tsx's "only a chat answer's Markdown asks for references" check namesChatTurn.tsx,THIRD_PARTY_NOTICES.md(the user message fold credit followsUserMessage),docs/chat-skill-activity.md.Verification
git diff --color-moved --color-moved-ws=allow-indentation-change origin/main...HEAD: a line-multiset comparison of removed and added lines leaves only theexportkeywords and the imports.bun run check fast: green (typecheck, build, 29,194 unit tests).herdr-ci-runner:local), the chat browser scripts: 27/27 passed on the first attempt (no retries): every chat scriptbun scripts/browser-checks.tsmaps to these files (chat-fallback-browser-qa, chat-virtual-browser-qa, copilot-chat-browser-qa, chat-selection-copy-regression, chat-history-browser-qa, chat-gjc-streaming-browser-qa, devin-chat-browser-regression, grok-chat-browser-qa, chat-tool-paths-demo-regression, agy-chat-browser-qa, chat-quote-selection-end-regression, chat-outcome-note-browser-qa, chat-local-send-follow-demo-regression, chat-working-line-demo-regression, chat-selection-turn-end-demo-regression, chat-select-quote-demo-regression, chat-request-details-demo-regression, chat-visualization-browser-qa, chat-greeting-demo-regression, chat-no-rewind-demo-regression, chat-reading-position-demo-regression, chat-math-demo-regression, omo-chat-browser-qa, chat-markdown-images-browser-qa, chat-svg-figures-demo-regression, chat-list-markers-demo-regression, chat-scroll-padding-regression).