refactor(web): ChatView's project clone banner lives in useProjectCloneBanner#23068

merged1
refactor/split2-chatview-attachments
refactor/split2-chatview-project-banners
opened2d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 2d ago

The clone and file-copy subscriptions, their composer banner with cancel/retry/remove, and the send block reason move into chat/useProjectCloneBanner.tsx. Verbatim move.

BeforeAfter
ChatView.tsx lines4,5214,415

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

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: 32737f87-94b9-425a-8b0b-b386ec0586a9
📥 Commits

Reviewing files that changed from the base of the PR and between e25227a81bb3e2b495bcb72c17ed063c0125295b and 7d392e036d156169d491a794306b55a0aed8c239.

📒 Files selected for processing: 1
  • apps/web/src/components/ChatView.tsx

Limit details: You’ve used all 10 included reviews currently available.

📝 Walkthrough

Project clone and file-copy banner logic moved from ChatView into the useProjectCloneBanner hook. ChatView uses the hook’s banner data and send-block reason.

Changes: Project clone banner

Layer / File(s)Summary
Extract and connect project clone banner
apps/web/src/components/chat/useProjectCloneBanner.tsx, apps/web/src/components/ChatView.tsx
The hook tracks clone and file-copy states, provides banner actions and send-block reasons, and reports non-interrupted command failures. ChatView uses the hook and removes the inline logic and related imports.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: t3dotgg

Merge Risk: ⚪ Minimal · up to 7d392

The clone and file-copy banner behavior remains connected to the current project. No actionable merge risk was identified.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description explains the code change and lists validation commands, but it omits the required Problem and Scope and approval sections. The Verification section is also incomplete because it does n…Add the required Problem, Change, Scope and approval, and Verification headings. Describe the user or maintenance problem and expected behavior. Link the related issue or maintainer approval, or explain why the focused refactor qualifies fo…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title clearly and concisely describes the main refactor: moving ChatView's project clone banner logic into useProjectCloneBanner.
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

Explanation

The description explains the code change and lists validation commands, but it omits the required Problem and Scope and approval sections. The Verification section is also incomplete because it does not provide observed results, limitations, or required UI evidence.

Resolution

Add the required Problem, Change, Scope and approval, and Verification headings. Describe the user or maintenance problem and expected behavior. Link the related issue or maintainer approval, or explain why the focused refactor qualifies for an exemption. Report the observed results for each validation command and state anything not checked. Add before and after screenshots for the UI change, plus a short recording if interaction timing or transitions require evidence.

✨ 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.

Synced from GitHub

Approvability

Verdict: Approved at e25227a

Macroscope's review found this PR approvable — This PR moves the existing project-clone banner and send-blocking logic from ChatView into a dedicated hook while preserving its callers, conditions, actions, and UI output. It is a localized structural refactor without new user-facing behavior or other high-risk changes.

No code changes detected at 7d392e0. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

Added 1 commit

  • refactor(web): ChatView's project clone banner lives in useProjectCloneBanner7d392e0
Synced from GitHub

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 7d392e0.

This comment will update automatically after the next completed run.