Skip to content

fix(browser): persist browser pane width across restarts#26

Merged
amirlehmam merged 1 commit into
amirlehmam:masterfrom
schroldgames:fix/browser-pane-width-persist
Jun 8, 2026
Merged

fix(browser): persist browser pane width across restarts#26
amirlehmam merged 1 commit into
amirlehmam:masterfrom
schroldgames:fix/browser-pane-width-persist

Conversation

@schroldgames

Copy link
Copy Markdown
Contributor

Summary

  • Browser pane width reset to 420px on every restart — browserWidth was plain React state never written to the workspace or session
  • Adds browserWidth?: number to WorkspaceInfo and saves it on drag end (mouseup) via updateWorkspaceMetadata
  • Included in the auto-save (30s) and named session save paths so it survives both restart types
  • Display width is derived at render time (isResizingBrowser ? browserWidth : (activeWorkspace?.browserWidth ?? browserWidth)) — no useEffect timing race on startup

Files changed

File Change
src/shared/types.ts Add browserWidth?: number to WorkspaceInfo
src/renderer/store/workspace-slice.ts Include browserWidth in replaceAllWorkspaces
src/renderer/App.tsx Save on drag end, include in auto-save, derive displayBrowserWidth at render time

Test plan

  • Drag the browser pane to a non-default width, restart wmux — confirm width is restored
  • Confirm width restores correctly on first render with no visible flash/jump
  • Drag still works normally (250px min, windowWidth - 400px max)
  • Named session save/load preserves the width

🤖 Generated with Claude Code

Save browserWidth to WorkspaceInfo on drag-end and include it in both
the auto-save and named-session save paths. Derive the displayed width
directly from the active workspace at render time (not via useEffect sync)
so it restores correctly on first startup without timing races.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@schroldgames schroldgames force-pushed the fix/browser-pane-width-persist branch from e5fa7de to 7123b0f Compare June 6, 2026 23:09
@amirlehmam amirlehmam merged commit fab9897 into amirlehmam:master Jun 8, 2026
@amirlehmam

Copy link
Copy Markdown
Owner

Merged and shipped in v0.8.3. Thanks @schroldgames — browser width now persists across both auto-save and named sessions.

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