Agentic UI: Preview Panel Grows to Fill Space When Resizing App Window#3850
Open
shaunandrews wants to merge 3 commits into
Open
Agentic UI: Preview Panel Grows to Fill Space When Resizing App Window#3850shaunandrews wants to merge 3 commits into
shaunandrews wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR aims to improve the way window and panel resizing works in the new Studio Agentic UI, which is currently hidden behind a feature flag.
Currently in
trunkthe preview panel's width remains fixed as the window is resized, while the chat panel's width fills the available space. This is awkward; when the preview is open, I expect it to change its size as the window is resized, with the chat remaining stationary. Otherwise, resizing the preview requires two steps: resizing the window, then resizing the preview panel.In this PR, resizing the window keeps the chat panel's width stationary, and allows the preview panel (if open) to fill the available space. The preview nows stores
studio-ui-preview-content-widthwhich maps to:total available width - remembered content/chat width = preview/browser widthThere's also logic in
resizable-panels.ts (81)to prevent the preview and chat panels from getting too small.Proposed Changes
usePointerDragprimitive (primary-button filtering, rAF throttling, cursor/user-selectmanagement, teardown on unmount/external-cancel) and moves the sidebar's resize hook onto it — removing duplicated drag plumbing with no change to sidebar behavior.getPreviewSplitLayout) that owns the min-width floors. CSS becomes a pure consumer instead of running a second, divergent clamp. Persists the user's content width and migrates the legacy preview-width preference.File changes
layout-dashboard (line 73) changes preview rendering to a function so PreviewSplitFrame can tell SitePreview whether it is collapsed during open/close.
Testing Instructions