feat(web-ui): allow right panel drag beyond 1200px to dynamic max - #2434
Open
1688mengdie wants to merge 1 commit into
Open
feat(web-ui): allow right panel drag beyond 1200px to dynamic max#24341688mengdie wants to merge 1 commit into
1688mengdie wants to merge 1 commit into
Conversation
The right panel resizer was hard-capped at RIGHT_PANEL_CONFIG.MAX_WIDTH
(1200px). On wide windows a dragged right panel snapped back to 1200px and
could never widen past one page. Let the drag reach the dynamic upper bound
(container - resizer - MIN_CENTER_WIDTH) while always preserving a 400px
chat column.
- calculateValidRightWidth now clamps to the pure dynamic max, dropping the
MAX_WIDTH cap.
- Remove the SessionScene aux-pane CSS max-width:1200px cap and de-cap
updateRightPanelWidth (clamp only to the compact minimum) so a wide manual
drag is no longer pulled back to 1200px on validate/restore.
- Start each drag from the DOM's real width to avoid a bounce back, and
report the dynamic max via aria-valuemax.
- Clamp visibilitychange and panel-expand restore paths to the dynamic max so
a shrunken window can't transiently squash the chat pane below its minimum.
- Include calculateValidRightWidth in the visibilitychange effect dependency
array (it is a useCallback([]) with a stable reference) to satisfy
react-hooks/exhaustive-deps.
A 400px minimum chat column is preserved and default open/restore paths still
cap at MAX_WIDTH.
Test: pnpm --dir src/web-ui run lint (clean; react-hooks/exhaustive-deps 0)
pnpm --dir src/web-ui run type-check (green)
AI: lightly tested
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.
Summary feat(web-ui): allow right panel drag beyond 1200px to dynamic max The right panel resizer was hard-capped at RIGHT_PANEL_CONFIG.MAX_WIDTH (1200px). On wide windows a dragged right panel snapped back to 1200px and could never widen past one page. Let the drag reach the dynamic upper bound (container - resizer - MIN_CENTER_WIDTH) while always preserving a 400px chat column. - calculateValidRightWidth now clamps to the pure dynamic max, dropping the MAX_WIDTH cap. - Remove the SessionScene aux-pane CSS max-width:1200px cap and de-cap updateRightPanelWidth (clamp only to the compact minimum) so a wide manual drag is no longer pulled back to 1200px on validate/restore. - Start each drag from the DOM's real width to avoid a bounce back, and report the dynamic max via aria-valuemax. - Clamp visibilitychange and panel-expand restore paths to the dynamic max so a shrunken window can't transiently squash the chat pane below its minimum. - Include calculateValidRightWidth in the visibilitychange effect dependency array (it is a useCallback([]) with a stable reference) to satisfy react-hooks/exhaustive-deps. A 400px minimum chat column is preserved and default open/restore paths still cap at MAX_WIDTH. ### Test -
pnpm --dir src/web-ui run lint(clean; react-hooks/exhaustive-deps 0) -pnpm --dir src/web-ui run type-check(green) - Lightly tested (AI assisted); the main feature (right panel maximize drag) was dev-tested by the owner. ### UI / behavior UI behavior change (right panel drag). No screenshot is attached because this environment has no running desktop instance to do an interactive drag. Low-risk manual verification path: 1. Runpnpm run desktop:devand open a wide window (>=1604px). 2. Drag the right panel resizer to the left and observe it widen past 1200px (no snap-back) toward the available width. 3. Confirm the chat column stays >=400px. 4. On a narrow container, confirm the dynamic upper bound (container - resizer - 400) still applies and the default open/restore still caps at 1200px. Closes #2433