Add wide preview control to Desktop - #59838
Conversation
Related: #40494 (feature request), #40511 (open PR that loosens the static width caps 38rem->72rem). This PR pursues the same goal (wider Desktop preview rail) via a different mechanism — an interactive |
|
Yep, looks like it has the same intention. |
3f47777 to
bffba1c
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused Desktop control and for adding all Desktop locale entries. The current 38rem cap remains on main (apps/desktop/src/app/chat/right-rail/preview.tsx:39), so the underlying request is still valid.
Problems
widePreviewWidth()reserves only 160px for chat (apps/desktop/src/app/chat/right-rail/preview-pane.tsx:128in this PR). Current Desktop defines--chat-min-width: 28rem(apps/desktop/src/styles.css:386), and the normal preview sizing formula also subtracts sidebar and file-browser tracks (apps/desktop/src/app/chat/right-rail/preview.tsx:43-47).- The programmatic width override is installed directly as a PaneShell grid track (
apps/desktop/src/components/pane-shell/pane-shell.tsx:226-228); the Pane's min/max bounds are applied only by pointer dragging (apps/desktop/src/components/pane-shell/pane-shell.tsx:440-451). At the test's 1600px viewport, the asserted 1440px preview can therefore leave less than the chat minimum.
Suggested changes
- Bound the preset by the same available-width calculation that protects chat, or make PaneShell clamp programmatic overrides too.
- Add coverage with the sidebar and file browser open, asserting the chat minimum remains available.
Automated hermes-sweeper review.
| const WIDE_PREVIEW_CHAT_RESERVE_PX = 160 | ||
| const WIDE_PREVIEW_MIN_WIDTH_PX = 720 | ||
|
|
||
| function widePreviewWidth() { |
There was a problem hiding this comment.
This 160px reserve bypasses the existing --chat-min-width: 28rem contract and ignores sidebar/file-browser tracks. setPaneWidthOverride() becomes the grid track directly; PaneShell only clamps min/max during pointer dragging. Please bound this preset by the actual available rail width so maximizing cannot collapse the chat column.
Summary
90vwinstead of the old38remcap).Maximize preview width/Restore preview width; the maximize preset now targets 90% of the viewport while leaving a small chat column visible.Why
Desktop capped the preview rail at
38rem, and even the first wide-preview preset could still feel constrained on large screens. Website/browser QA needs a Codex-style wide working surface where the preview can occupy most of the window while the chat remains available for steering.Validation
Ran from the repo root:
Notes:
apps/desktop/src/app/settings/model-settings.tsxaboutsetConfighook deps.