fix(web): ChatView browser test no longer times out on CI#28834
ChatView.browser.test.tsx ("a new draft does not load its reserved thread before the server lists it", added in #27522) has been timing out at 15s on the Test Web job, including on main.
The test mounts AppRoot, and the draft route lazily loads ChatView.tsx. Nothing else in the browser project imports that file, so the test always pays its first transform: the React Compiler over ~4k lines. That takes 6-11s on its own, inside the test's timeout. A resource timeline during router.load() showed the single /src/components/ChatView.tsx request taking 11s while every other module loaded in milliseconds.
The fix imports ChatView at the top of the test file, so the transform runs while the file is collected, outside testTimeout.
Verification (not a visual change, so timings instead of screenshots):
| before | after | |
|---|---|---|
| local, test alone | 12.7-14.5s (timed out under instrumentation) | 1.1-3.0s |
CI, green main runs | ~5.5s, timeouts on busy runners | — |
vp run check:changed passes.
Opus 5.5 via Claude Code.
🤖 Generated with Claude Code
Checks
Added 1 commit
- fix(web): ChatView browser test no longer times out on CI41a5b93
Approvability
Verdict: Approved at 41a5b93
Macroscope's review found this PR approvable — The change is confined to ignored paths and is described as moving ChatView’s initial transform outside a browser test’s timeout. No material product or operational impact is indicated.
Notes:
- No code objects were reviewed. Approvability was decided on eligibility alone.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: t3/chatview-test-timeout
- File: .coderabbit.config.ts
- Commit: 41a5b93
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Team
- Run ID:
b85edddb-6ca7-4793-8494-a6a66d04ea5b
Commits
Reviewing files that changed from the base of the PR and between 976a23161d3eeb2738a66993a40e7dd9aa98229a and 41a5b938b45caa3d4ba3ee7c685ca8fa88abebb9.
Files selected for processing: 1
apps/web/src/components/ChatView.browser.test.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
The browser test now imports
ChatViewduring module loading. This runs its lazy-route transform outside the test timeout.Changes: ChatView browser test
Layer / File(s) Summary Move transform outside test timeout
apps/web/src/components/ChatView.browser.test.tsxThe test adds a side-effect import of ChatViewso its lazy-route transform runs during module loading.Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Bug fix
Possibly related issues
- pingdotgg/t3code#28013: This issue reports the same browser test timing out on CI. The import change moves the
ChatViewtransform outside the test timeout.
Possibly related PRs
- pingdotgg/t3code#28033: This PR uses the same timing strategy by importing
ThreadRouteViewduring file collection.
Suggested reviewers:
macroscopeapp,t3dotgg- pingdotgg/t3code#28013: This issue reports the same browser test timing out on CI. The import change moves the
Merge Risk: Minimal · up to 41a5b
No actionable regression was found in this test-timeout change.
Pre-merge checks: 3 · 1
Failed checks: 1 warning
Check name Status Explanation Resolution Description check The description covers the problem (the test times out at 15s because the lazy ChatView.tsx transform runs inside the timeout), the change (a top-level import so the transform runs during collection),… Add a Scope and approval section. Link the triaged bug issue or the maintainer-approved discussion, with the approval comment. If no issue exists, explain why this qualifies as a very small, focused fix of an obvious bug. Also state the CI … Passed checks: 3 passed
Check name Status Explanation Title check The title "fix(web): ChatView browser test no longer times out on CI" names the main change. The PR imports ChatView at the top of ChatView.browser.test.tsx so its first React Compiler transform runs … Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Title check
Explanation
The title "fix(web): ChatView browser test no longer times out on CI" names the main change. The PR imports ChatView at the top of ChatView.browser.test.tsx so its first React Compiler transform runs during file collection, outside the test timeout. The title is specific, follows conventional commit style, and matches the raw summary and objectives.
Full details: Description check
Explanation
The description covers the problem (the test times out at 15s because the lazy ChatView.tsx transform runs inside the timeout), the change (a top-level import so the transform runs during collection), and verification (local before/after timings and a passing check:changed run). It omits the required Scope and approval section: it does not link a triaged issue or maintainer-approved discussion, and it does not explain a small-fix exemption. It also gives no CI evidence after the change, and the template asks for that in verification. The Verification section gives measured timings, which meets the 'tests pass alone is insufficient' bar.
Resolution
Add a Scope and approval section. Link the triaged bug issue or the maintainer-approved discussion, with the approval comment. If no issue exists, explain why this qualifies as a very small, focused fix of an obvious bug. Also state the CI result after this change, or state that it could not be checked. The Problem, Change, and Verification sections are otherwise adequate.
Finishing Touches
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