refactor(web): ChatView's right panel actions live in useRightPanelActions#23064

merged1
refactor/split2-chatview-terminal
refactor/split2-chatview-right-panel
opened2d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 2d ago

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.

BeforeAfter
ChatView.tsx lines5,4205,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

All checks passed
Synced from GitHub

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.

Synced from GitHub

Review in Change Stack →

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.ts
The 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.ts
The 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.tsx
ChatView 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 nameStatusExplanationResolution
Description checkWarningThe 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 nameStatusExplanation
Title checkPassedThe title clearly and concisely identifies the main refactor: moving ChatView right-panel actions into useRightPanelActions.
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck 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

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
Synced from GitHub

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.