Skip to content

feat(desktop): draggable sidebar resize + responsive conversation panel width#1688

Merged
esengine merged 1 commit into
esengine:mainfrom
CVEngineer66:feat/sidebar-resize
May 24, 2026
Merged

feat(desktop): draggable sidebar resize + responsive conversation panel width#1688
esengine merged 1 commit into
esengine:mainfrom
CVEngineer66:feat/sidebar-resize

Conversation

@CVEngineer66

Copy link
Copy Markdown
Contributor

Summary

Adds draggable resize handles between sidebar/main and main/context-panel,
and makes the conversation thread width dynamically respond to sidebar sizes.

Changes

  • useResizable.ts (new) — Mouse-drag hook that updates sidebar widths,
    persists custom sizes to localStorage, respects min/max constraints.
  • App.tsx — Wire useResizable, render resize handles, compute
    --thread-max-width from available window space minus sidebar widths.
  • styles.css — Resize handle styles (.resize-handle), position relative
    on .app, remove hardcoded --thread-max-width in favor of dynamic value.

Behavior

Sidebar state Before After
Both open (default) 740px ~796px (1440px window)
Both open, sidebar dragged narrower 740px Up to 1120px
One sidebar collapsed 740px 960px
Both collapsed 1120px 1120px

Dragging a sidebar right edge adjusts its width (160px–40% of window).
Sizes persist in localStorage across restarts.

Verification

  • desktop build + typecheck pass
  • Dragging left/right sidebar edges works
  • Width persists after app restart

@esengine esengine merged commit be4e619 into esengine:main May 24, 2026
4 checks passed
@esengine

Copy link
Copy Markdown
Owner

Thanks — merged. Drag state lives in refs so mousemove doesn't thrash React, localStorage round-trip handles the persist, and the inline --thread-max-width correctly overrides the attribute-selector defaults. Nice touch on the stale preset: "pro" test cleanup too.

Two follow-up polish items (no rush): the thread max doesn't recompute on window resize (would need a resize listener to re-trigger the render), and the per-frame setState during drag could fold into requestAnimationFrame if it ever feels janky on a busy thread.

esengine pushed a commit that referenced this pull request May 24, 2026
…moved, persisted usage stats, plan dispatch gate

Headline themes:
- Desktop: bundle the CLI-hosted React dashboard, retire Tauri+Preact duplicate (#1418)
- Config: drop preset abstraction; flash/pro are direct model selections (#1657, #1630)
- Stats: persist cumulative usage to session meta + auto-restore on startup (#1667, #1680, #1643, #1628)
- Plans: editMode="plan" enforced at the ToolRegistry dispatch gate (#1681); step advance fix (#1629)
- Context: fold once at turn start, drop pre-flight + byte-ceiling (#1642, #1646); collapsible compacted card (#1649)
- Subagents: per-skill flash/pro override + Settings UI (#1632)
- Desktop polish: sidebar drag-resize (#1688), responsive collapse (#1585), copy/edit overlay + msg-history nav (#1645), Esc closes modal not turn (#1685), QQ tab isolation (#1672), DiffCard for edits (#1662), theme-aware highlighting (#1655), system events toggle (#1654/#1650), macOS TCC inheritance (#1614), dashboard.enabled (#1612)
- Dashboard polish: persistent session URL (#1586, #1589, #1599), theme-aware highlighting (#1664), IME confirm-enter guard (#1689), code-fence lang fix (#1677), vendor chunk split (#1587), markdown table h-scroll (#1562)
- TUI: Alt+S input stash/recall; static history isolated from input rerenders (#1635); legacy mouse drop (#1637, #1648); multi-edit gated in review (#1647)
- Diff: SplitDiff column border holds under CJK (#1686)
- MCP: workspace roots passed to servers (#1625); codeCommand honors mcpServers (#1603)
- Config plumbing: (baseUrl, apiKey) resolved as a tuple (#1658); stale model id self-heal (#1663)

See CHANGELOG for the full list.
@CVEngineer66 CVEngineer66 deleted the feat/sidebar-resize branch June 9, 2026 13:20
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.

2 participants