GeezerVison is showing github.com — fix(web): floating portrait previews no longer crash beside the details card by Gigioxx · Pull Request #14968 · pingdotgg/t3code
Conversation
Fixes #14959
With a portrait preview floating beside the inline thread details card, a chat canvas around 1176 to 1247 px wide crashes the renderer with React error #185. The card was placed from a chat lane that had already been solved with the card as an obstacle. Clearing the card moved the preview and narrowed the lane, which widened the card, which made clearing it impossible, which restored the lane. The two states flipped on every layout effect until React gave up.
resolveChatCanvasLayout now also returns cardChat, the lane computed without the card. ThreadDetailsCard uses it for both the drawn placement and the reported obstacle, so placing the card can no longer move the lane it is placed beside. The card rect is still used to clamp the preview.
Verification
- Reproduced in an isolated Playwright Chromium against a worktree dev server seeded with a copy of real data: 1456x800 window (1200 px chat canvas), inline details card open, iOS device floated over chat. Unfixed code shows "Maximum update depth exceeded". With the fix, the player settles at x 952 to 1192 and the card at 1204 to 1444, no crash. The device float needs a live device session, so for this manual check only I disabled the auto-close for missing sessions in
ChatView (not part of this PR).
- New test in
chatCanvasLayout.test.ts iterates the two layout functions for the 1200x600 portrait case from the issue. It fails on main (state alternates between card 876 and 948) and passes with the fix.
vp test run apps/web/src/components/chat/chatCanvasLayout.test.ts: 17 passed. apps/web typecheck, lint and fmt clean.
- Not checked: desktop app and a real simulator stream.
| Before |
After |
 |
 |
Made by Claude Opus 5.5 in Claude Code (via T3 Code).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
MONKE2525E reacted with thumbs up emoji
Approvability
Verdict: Approved at 248279b
Macroscope's review found this PR approvable — This is a contained web layout bug fix that breaks the details-card/preview geometry feedback loop responsible for the renderer crash. Existing paths remain unchanged when no floating preview and card are present, and a regression test covers repeated layout stabilization.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d059089c-efac-40fc-b54e-0637216abf4e
📥 Commits
Reviewing files that changed from the base of the PR and between 8ed276c and 248279b.
📒 Files selected for processing (3)
apps/web/src/components/chat/ThreadDetailsCard.tsx
apps/web/src/components/chat/chatCanvasLayout.test.ts
apps/web/src/components/chat/chatCanvasLayout.ts
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
Walkthrough
The layout resolver now provides a separate chat lane for details-card placement when a preview and details card are present. Both placement calculations use that lane. A regression test checks that repeated layout passes stabilize.
Changes
Details card layout
| Layer / File(s) |
Summary |
Resolve a card-specific chat lane apps/web/src/components/chat/chatCanvasLayout.ts |
The resolver returns a cardChat lane. When a preview and details card are present, it derives the lane by resolving the layout without the details card. |
Use and validate cardChat placement apps/web/src/components/chat/ThreadDetailsCard.tsx, apps/web/src/components/chat/chatCanvasLayout.test.ts |
Both placement calculations use cardChat. The settling test feeds each card placement into the next layout pass and checks that card and frame state stabilize. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to 24827
The portrait-preview layout fix appears ready to merge after normal checks; no actionable merge-blocking risk is identified.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name |
Status |
Explanation |
| Title check |
✅ Passed |
The title clearly describes the main change: preventing floating portrait previews from crashing beside the details card. |
| Description check |
✅ Passed |
The description explains the problem, the fix, and detailed verification results, and links issue #14959. It does not explicitly address scope and approval, but the linked issue and focused bug fix pr… |
| Linked Issues check |
✅ Passed |
Issue #14959 requires stable placement for a floating portrait preview and inline details card, with a fixed-point regression test. resolveChatCanvasLayout returns cardChat, resolved without the c… |
| Out of Scope Changes check |
✅ Passed |
The reported changes are limited to chatCanvasLayout.ts, ThreadDetailsCard.tsx, and the layout regression test. The new lane and its test directly address issue #14959. No unrelated change is repo… |
| Docstring Coverage |
✅ Passed |
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 3, 2026
Note Grok responding on behalf of Julius.
Closing as superseded. #14959 was fixed on main by #14992 (429c625a8515). Thanks for the earlier fix attempt, @Gigioxx.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|