Thread transfer impact
⚠️ The latest CI run did not produce a thread transfer result for 7de6e9a.
This comment will update automatically after the next completed run.
ChatView spread about 260 lines of state for the composer's system banners across two places: reconnect grace, disconnect, version mismatch, and server update. All of it ended up as one systemComposerBannerItems array.
chat/useSystemComposerBanners.tsx now builds that array and owns the retry and disable commands. EnvironmentUnavailableState moved there too. ChatView keeps the active environment and its unavailable state, which other code still reads.
| previous layer | this layer | |
|---|---|---|
| ChatView.tsx lines | 7,927 | 7,665 |
Renders were counted with the rc-init.js fiber counter on a dev server seeded from real data (median of 3 runs; base 6a6c84f vs the stack top before its rebase onto current main):
| Interaction | main: commits / renders (ChatView) | stack top: commits / renders (ChatView) |
|---|---|---|
| Type 20 chars in the composer | 22 / 678 (1) | 22 / 678 (1) |
| Switch threads | 14 / 779 (5) | 14 / 777 (5) |
| Open + close the terminal drawer | 15 / 494 (3) | 15 / 497 (3) |
| Open + close the right panel | 21 / 723 (4) | 21 / 726 (4) |
| Drag the right panel's resize handle | 13 / 139 (1) | 1 / 1 (0) |
The +3 renders are the new ChatTerminalDrawers and ChatRightPanel wrappers. The drag row is the right panel layer: the drag's final width commit used to re-render ChatView and the whole chat column, and now re-renders only ChatRightPanel.
Tests: vp test run src/reactCompilerCoverage.test.ts for ChatView and every new file (0 bailouts), tsc-rs --noEmit for apps/web, and oxlint on the changed files.
🤖 Generated with Claude Code
Review completed
Added 1 commit
⚠️ The latest CI run did not produce a thread transfer result for 7de6e9a.
This comment will update automatically after the next completed run.
Verdict: Approved at 7de6e9a
Macroscope's review found this PR approvable — This PR moves existing machine availability, reconnect, disconnect, server-update, and auto-balance banner logic from ChatView into a dedicated hook while preserving the existing conditions and actions. It is an isolated production-code reorganization with no schema, product-default, security, billing, or deployment changes.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review. 🎉
be234740-98c3-4a00-91a9-ac010d973206Reviewing files that changed from the base of the PR and between c61cf64dae5de0bba59018c60d73e15b1061b846 and 7de6e9a6fca9d5acba44242a5a102749d4878e08.
apps/web/src/components/ChatView.tsxapps/web/src/components/chat/useSystemComposerBanners.tsxLimit details: You’ve used all 10 included reviews currently available.
ChatView now delegates system composer banner construction to useSystemComposerBanners. The hook handles environment availability, reconnect and disconnect actions, server version and update states, and automatic-balance notices. ChatView determines environment availability from the active connection phase and passes environment and server state to the hook.
Changes: System composer banners
| Layer / File(s) | Summary |
|---|---|
Environment availability and recovery apps/web/src/components/ChatView.tsx, apps/web/src/components/chat/useSystemComposerBanners.tsx | The hook manages reconnect grace periods, reconnect and disconnect actions, and unavailable-environment banners. ChatView checks the active connection phase and removes its local recovery handlers. |
Update and balance banners apps/web/src/components/ChatView.tsx, apps/web/src/components/chat/useSystemComposerBanners.tsx | The hook builds server update and automatic-balance banners. ChatView passes the required environment and server state to the hook. |
Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Refactor
Possibly related issues
pingdotgg/t3code#22741 — The hook includes failed-update status and retry actions, but the underlying Vite+ shim resolution problem remains outside this change.Suggested reviewers: t3dotgg
7de6eNo actionable issue remains from this change; it is ready for normal merge checks.
Failed Failed checks: 1 warning
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | Warning | The description explains the refactor and includes detailed verification results. It does not provide the required scope and approval information, and it does not clearly identify the problem with exp… | Add the required Problem, Change, Scope and approval, and Verification sections. Include the linked issue or explicit maintainer approval, or explain why this focused refactor does not require prior approval. State the problem and expected … |
| Check name | Status | Explanation |
|---|---|---|
| Title check | Passed | The title clearly describes the main change: moving ChatView composer machine and server-update banners into useSystemComposerBanners. |
| Linked Issues check | Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | Passed | Check skipped because no linked issues were found for this pull request. |
Explanation
The description explains the refactor and includes detailed verification results. It does not provide the required scope and approval information, and it does not clearly identify the problem with expected behavior or reproduction context.
Resolution
Add the required Problem, Change, Scope and approval, and Verification sections. Include the linked issue or explicit maintainer approval, or explain why this focused refactor does not require prior approval. State the problem and expected behavior more directly.
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Comment @coderabbitai help to get the list of available commands.