Skip to content

feat(web-ui): allow right panel drag beyond 1200px to dynamic max - #2434

Open
1688mengdie wants to merge 1 commit into
GCWing:mainfrom
1688mengdie:feat/right-panel-max-drag
Open

feat(web-ui): allow right panel drag beyond 1200px to dynamic max#2434
1688mengdie wants to merge 1 commit into
GCWing:mainfrom
1688mengdie:feat/right-panel-max-drag

Conversation

@1688mengdie

Copy link
Copy Markdown

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. Run pnpm run desktop:dev and 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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: allow right panel drag beyond 1200px to dynamic max

1 participant