feat(desktop): loosen right-rail preview width caps (38rem → 72rem) - #40551
liuhao1024 wants to merge 1 commit into
Conversation
Widen the preview pane and markdown content area so that wide content (code listings, tables, Mermaid gantt/sequence diagrams) can use the full horizontal space available on large monitors instead of wrapping at the previous 38rem cap. - PREVIEW_RAIL_MAX_WIDTH: 38rem → 72rem - INTRINSIC clamp upper bound: 32rem → 64rem - MarkdownPreview container: max-w-3xl (48rem) → max-w-[64rem] The default opening width is unchanged — the wider cap only takes effect when the user drags the divider outward. Closes NousResearch#40494
alpindiay
left a comment
There was a problem hiding this comment.
Code Review: PR #40551 -- Loosen right-rail preview width caps
Summary: Simple CSS constant change: PREVIEW_RAIL_MAX_WIDTH 38rem->72rem, intrinsic clamp upper bound 32rem->64rem, and markdown content max-w-3xl (48rem)->max-w-[64rem].
Findings:
[PASS] No security issues. Pure CSS/Tailwind constant changes.
[PASS] No logic errors. The relationship between outer rail max (72rem), intrinsic clamp upper (64rem), and inner content max (64rem) is coherent -- the intrinsic clamp provides a viewport-responsive range and the outer max is a hard guardrail.
[NOTE] No tests, but this is a visual-only constant change so not a blocker. PR title says '38rem -> 72rem' but the preview-file.tsx diff changes max-w-3xl (48rem) to max-w-[64rem] -- title slightly mischaracterizes that file.
[NOTE] max-w-[64rem] uses arbitrary value syntax. Consider a standard Tailwind token (e.g. max-w-7xl or adding a design token) for consistency.
Verdict: LGTM. Low-risk, straightforward change. Approve.
Summary
Loosen the right-rail preview pane width caps so that wide content (code listings, tables, Mermaid diagrams) can use the full horizontal space available on large monitors.
Problem
The preview pane has tight upper bounds (
max 38rem, intrinsic32rem). On wide monitors (27" / 16:10), content wraps or scrolls horizontally even when the user drags the divider all the way out. This is especially visible with:ganttandsequenceDiagramblocks (after Markdown file preview does not render Mermaid diagrams in Desktop #38654 / [Bug]: Mermaid diagrams not rendered in chat assistant responses #40493 fixes)Changes
PREVIEW_RAIL_MAX_WIDTH38rem72rempreview.tsxINTRINSICclamp upper32rem64rempreview.tsxmax-w-3xl(48rem)max-w-[64rem]preview-file.tsxThe default opening width is unchanged — the wider cap only takes effect when the user drags the divider outward.
Related
Closes #40494
Checklist