refactor(web): ChatView's right panel actions live in useRightPanelActions#23064
Opening, closing, toggling, and arranging right-panel surfaces (browser, diff, files, pull requests, device, terminal tabs), plus the preview-action bus subscription, move into chat/useRightPanelActions.ts. Verbatim move.
| Before | After | |
|---|---|---|
ChatView.tsx lines | 5,420 | 5,249 |
Tests: tsc-rs --noEmit for apps/web, oxlint on the changed files, vp test run src/components/ChatView.logic.test.ts, and the React Compiler coverage test for every changed file (0 bailouts). ChatView stays in the coverage test's slow set.
Part of the ChatView split (7,258 → 3,975 lines across the stack).
Opus 5.5, Claude Code.
🤖 Generated with Claude Code
Checks
- SuccessfulCodeRabbitGitHub
Review completed
- Skipped
- Skipped
- Skipped
- SuccessfulRemove preview downloadGitHub
- SuccessfulCheckGitHub
- SkippedRustGitHub
- SkippedRelease SmokeGitHub
- Skipped
- SuccessfulTestGitHub
- SuccessfulBuild and TypecheckGitHub
- SuccessfulTest WebGitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 2GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulTest Server 5GitHub
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulLintGitHub
- SuccessfulChangesGitHub
- SuccessfulCheckGitHub
- SkippedRustGitHub
- SkippedRelease SmokeGitHub
- Skipped
- SuccessfulBuild and TypecheckGitHub
- SuccessfulTest WebGitHub
- SuccessfulTestGitHub
- SuccessfulTest Server 5GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulLintGitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 2GitHub
- SuccessfulChangesGitHub
- SuccessfulTest Server 6GitHub
- FailedCheckGitHub
- SuccessfulLabel PR 23064GitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulPrepare PR size configGitHub
- SuccessfulNative fingerprint diffGitHub
- SkippedRelease SmokeGitHub
- Skipped
- SkippedRustGitHub
- CancelledTest WebGitHub
- CancelledTestGitHub
- CancelledBuild and TypecheckGitHub
- Skipped
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 2GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulChangesGitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulTest Server 5GitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulLintGitHub
- Skipped
- SkippedEAS PreviewGitHub
- SuccessfulLabel PR 23064GitHub
- CancelledLabel PR 23064GitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- Skipped
- CancelledLabel PR sizeGitHub
- CancelledTest WebGitHub
- CancelledBuild and TypecheckGitHub
- Cancelled
- CancelledTestGitHub
- CancelledRelease SmokeGitHub
- CancelledRustGitHub
- FailedCheckGitHub
- Skipped
- SuccessfulNative fingerprint diffGitHub
- SkippedDeploy web previewGitHub
- SkippedEAS PreviewGitHub
- SkippedDeploy web previewGitHub
- CancelledTest Server 2GitHub
- CancelledTest Server 5GitHub
- CancelledTest Server 1GitHub
- CancelledTest Server 7GitHub
- CancelledTest Server 8GitHub
- CancelledChangesGitHub
- CancelledTest Server 4GitHub
- CancelledTest Server 6GitHub
- CancelledTest Server 3GitHub
- CancelledNative fingerprint diffGitHub
- CancelledLintGitHub
- Skipped
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
Approvability
Verdict: Approved at 3bfb317
Macroscope's review found this PR approvable — This PR relocates ChatView’s existing right-panel actions into a dedicated hook without introducing new user-facing behavior or changing stored data, APIs, defaults, or deployment behavior. The extracted production logic retains the same guards, store operations, callbacks, and preview subscription.
No code changes detected at ba60a74. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
c4f6188d-6c96-43d3-9887-a56885922565
📥 Commits
Reviewing files that changed from the base of the PR and between 3bfb317c3cf5074a4c808e6bd6f27bdded0bb521 and ba60a748159e2c49b7e57d3a247a008ac48ba52b.
📒 Files selected for processing: 1
apps/web/src/components/ChatView.tsx
Limit details: You’ve used all 10 included reviews currently available.
📝 Walkthrough
ChatView now delegates right-panel actions to
useRightPanelActions. The hook provides surface-opening, preview, panel, clipboard, and turn-diff handlers. ChatView passes the required state and callbacks to the hook and retains a separate effect for maximize requests.Changes: Right-panel actions
Layer / File(s) Summary Action contract and surface opening
apps/web/src/components/chat/useRightPanelActions.tsThe hook defines its input contract and adds browser, diff, file, pull-request, and device surface actions. Panel lifecycle and supporting actions
apps/web/src/components/chat/useRightPanelActions.tsThe hook adds preview and panel controls, surface reordering, clipboard handling, turn-diff opening, and its returned action API. ChatView integration
apps/web/src/components/ChatView.tsxChatView removes inline right-panel handlers and obsolete imports, retains a maximize-request effect, and wires the extracted actions. Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Suggested reviewers:
t3dotgg
Merge Risk: ⚪ Minimal · up to ba60a
The inspected right-panel actions remain wired as before; no issue requiring a fix before merge was identified.
Pre-merge checks: Passed 3 · Failed 1
Failed Failed checks: 1 warning
Check name Status Explanation Resolution Description check Warning The description explains the refactor and lists validation commands, but it omits the required Problem and Scope and approval sections. It also does not provide detailed observed verification results. Add the required Problem, Change, Scope and approval, and Verification sections. Describe the problem and expected behavior, provide the related issue or explicit maintainer approval, and report the observed results for each focused check. … Passed Passed checks: 3 passed
Check name Status Explanation Title check Passed The title clearly and concisely identifies the main refactor: moving ChatView right-panel actions into useRightPanelActions. 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.
Full details: Description check
Resolution
Add the required Problem, Change, Scope and approval, and Verification sections. Describe the problem and expected behavior, provide the related issue or explicit maintainer approval, and report the observed results for each focused check. State whether UI screenshots are not applicable to this behavior-only refactor.
✨ Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
- Commit to this branch
- Create a new PR
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 1
- Charged: $0.25
- View usage details
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.
Added 1 commit
- refactor(web): ChatView's right panel actions live in useRightPanelActionsba60a74
Thread transfer impact
⚠️ The latest CI run did not produce a thread transfer result for ba60a74.
This comment will update automatically after the next completed run.