Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The production preview panel now uses a viewport-dependent initial width instead of the fixed 540px default, changing the opening layout on wide screens. Existing saved widths and maximum-width constraints remain in place, and targeted tests cover the new calculation. You can add or adjust custom eligibility rules. Learn more. |
|
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 configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe preview panel now uses half the viewport width as its default when that value exceeds 540px. The existing maximum-width clamp remains in place. Tests cover a 2,561px viewport and a 1,000px viewport. ChangesPreview panel width
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The panel’s new default width is consistent with the stated behavior, and no actionable merge-blocking risk is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The right panel opened at a fixed 540px in every thread without a saved width, a thin strip on large monitors that had to be dragged wider in each new thread. Carry pingdotgg/t3code#13734, which defaults it to half the viewport with 540px as the floor. The preview moved the panel sizing into usePreviewPanelInlineSize, so the patch is rebased onto that hook.
The right panel (browser, diff, files, terminal, etc.) always opened at a fixed 540px in a thread that had not been resized yet. On large monitors that is a thin strip, and because widths are remembered per thread (#11310), you had to drag it wider again in every new thread.
The panel now opens at half the viewport width, never smaller than the previous 540px. The existing max-width clamp still reserves room for the chat column, and threads that already have a saved width keep it. The pull-requests page already opened its panel at half the window, so this lines up with that.
Before / after (1920×1080 viewport, this PR's diff open in the panel)
Before: the panel opens at 540px, so diff lines wrap
After: the panel opens at 960px (half the window), so the same diff fits
Verification
vp test run apps/web/src/components/preview/PreviewPanelShell.test.ts(adds cases for the half-viewport default and the 540px floor)vp linton the touched files,apps/webtypecheckSurfaces: the width only applies to the inline desktop/web panel. The sheet mode on narrow windows and mobile are unchanged.
Made by Claude Opus 5.5 in Claude Code (via T3 Code).