refactor(web): ChatView's snooze, settle, and checkout actions live in useThreadLifecycle#23065
Snooze and settle (clock, wake timer, status line), the local checkout branch mismatch and its switch, stopping background work, child-thread and goal banners, opening related threads, and standalone slash commands move into chat/useThreadLifecycle.tsx. The hook selects its own commands and router. Verbatim move.
| Before | After | |
|---|---|---|
ChatView.tsx lines | 5,249 | 4,881 |
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
- Skipped
- SkippedRelease SmokeGitHub
- SuccessfulBuild and TypecheckGitHub
- SuccessfulTest WebGitHub
- SuccessfulTestGitHub
- SuccessfulTest Server 2GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 5GitHub
- SuccessfulLintGitHub
- SuccessfulChangesGitHub
- SuccessfulCheckGitHub
- Skipped
- SkippedRustGitHub
- SkippedRelease SmokeGitHub
- SuccessfulTest WebGitHub
- SuccessfulBuild and TypecheckGitHub
- SuccessfulTestGitHub
- SuccessfulTest Server 2GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulTest Server 7GitHub
- SuccessfulChangesGitHub
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 5GitHub
- SuccessfulLintGitHub
- FailedCheckGitHub
- SuccessfulLabel PR 23065GitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulPrepare PR size configGitHub
- SuccessfulNative fingerprint diffGitHub
- SkippedRustGitHub
- SkippedRelease SmokeGitHub
- Skipped
- CancelledTest WebGitHub
- CancelledTestGitHub
- CancelledBuild and TypecheckGitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 5GitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 2GitHub
- SuccessfulChangesGitHub
- CancelledLintGitHub
- SkippedEAS PreviewGitHub
- Skipped
- Skipped
- Skipped
- SuccessfulLabel PR sizeGitHub
- CancelledLabel PR sizeGitHub
- Skipped
- SuccessfulLabel PR 23065GitHub
- Cancelled
- CancelledBuild and TypecheckGitHub
- CancelledRelease SmokeGitHub
- CancelledTest WebGitHub
- CancelledTestGitHub
- CancelledRustGitHub
- FailedCheckGitHub
- SuccessfulNative fingerprint diffGitHub
- CancelledLabel PR 23065GitHub
- SkippedDeploy web previewGitHub
- SkippedDeploy web previewGitHub
- SkippedEAS PreviewGitHub
- CancelledTest Server 8GitHub
- CancelledTest Server 6GitHub
- CancelledTest Server 7GitHub
- CancelledTest Server 4GitHub
- CancelledChangesGitHub
- CancelledTest Server 1GitHub
- CancelledTest Server 3GitHub
- CancelledTest Server 5GitHub
- CancelledTest Server 2GitHub
- CancelledLintGitHub
- CancelledNative fingerprint diffGitHub
- Skipped
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
Approvability
Verdict: Approved at 5d20716
Macroscope's review found this PR approvable — This PR extracts existing ChatView lifecycle behavior into a dedicated hook without changing the supported actions, data contracts, defaults, or deployment behavior. The sizable new file is primarily relocated code, with the original call sites wired to the hook's equivalent outputs.
No code changes detected at 8d9cba7. 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:
93401616-3036-4b2b-81e7-f5b584345878
📥 Commits
Reviewing files that changed from the base of the PR and between 5d20716730454c7eaf856610e095f3a2677da20b and 8d9cba7c1581557dd11674d6b4bba366543be7aa.
📒 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 thread lifecycle state and actions to
useThreadLifecycle. The hook manages lifecycle operations, related-thread navigation, banners, standalone commands, and status rendering.Changes: Thread lifecycle
Layer / File(s) Summary Lifecycle state and actions
apps/web/src/components/chat/useThreadLifecycle.tsxThe new hook manages snoozing, settlement, pinning, branch mismatch recovery, background work, related-thread navigation, standalone commands, banners, and status rendering. ChatView integration
apps/web/src/components/ChatView.tsxChatView invokes the hook, removes its inline lifecycle implementation and unused imports, and continues to use useNavigateanduseLocationfor navigation data.Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Refactor
Possibly related issues
- pingdotgg/t3code#4589: The PR moves the Settle action into
useThreadLifecycle, but the supplied summary does not establish whether it fixes the reported client-view convergence issue.
Suggested reviewers:
t3dotgg,maria-rcks- pingdotgg/t3code#4589: The PR moves the Settle action into
Merge Risk: ⚪ Minimal · up to 8d9cb
This refactor moves thread lifecycle behavior into a dedicated hook without any intended behavior change. No concrete risk was found, and the reported type-check, lint and test runs support merging.
Pre-merge checks: Passed 3 · Failed 1
Failed Failed checks: 1 warning
Check name Status Explanation Resolution Description check Warning The description explains the code change and lists focused verification results, but it omits the required Problem section and Scope and approval section. Add a Problem section that states the underlying problem and expected behavior. Add a Scope and approval section with the triaged issue or maintainer approval, or explain why this focused refactor qualifies for an exemption. Passed Passed checks: 3 passed
Check name Status Explanation Title check Passed The title is concise and accurately identifies the main refactor: moving ChatView snooze, settle, and checkout actions into useThreadLifecycle. 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.
✨ 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 snooze, settle, and checkout actions live in useThreadLifecycle8d9cba7
Thread transfer impact
⚠️ The latest CI run did not produce a thread transfer result for 8d9cba7.
This comment will update automatically after the next completed run.