Skip to content

Fix frame size not persisting across restarts#41

Open
elvistranhere wants to merge 1 commit intolcoutodemos:mainfrom
elvistranhere:fix/persist-frame-size-v2
Open

Fix frame size not persisting across restarts#41
elvistranhere wants to merge 1 commit intolcoutodemos:mainfrom
elvistranhere:fix/persist-frame-size-v2

Conversation

@elvistranhere
Copy link
Copy Markdown
Contributor

Summary

  • The "Full width" toggle in settings was saved to localStorage correctly when toggled, but on app launch it was unconditionally overwritten to false before the store initialized
  • One-line fix: remove the expandedUI: false override in theme.ts so the saved preference is respected on restart

What changed

src/renderer/theme.ts:

-// Always start in compact UI mode on launch.
-const saved = { ...loadSettings(), expandedUI: false }
+const saved = loadSettings()

Test plan

  • Toggle "Full width" on in settings
  • Restart the app
  • Verify full width mode is still active
  • Toggle "Full width" off, restart, verify it stays off
  • Verify theme mode and sound settings still persist correctly (no regression)
  • npm run build passes with zero errors

Fixes #30

The expandedUI (full width) setting was saved to localStorage correctly
when toggled, but on app launch it was unconditionally overwritten to
false before the store initialized. Remove the override so the saved
preference is respected.

Fixes lcoutodemos#30
Copilot AI review requested due to automatic review settings March 21, 2026 16:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes UI width preference persistence by ensuring the saved expandedUI setting from localStorage is no longer overwritten during theme store initialization, addressing issue #30.

Changes:

  • Stop forcing expandedUI: false at startup so the stored “Full width” preference is respected after restart.
  • Rely solely on loadSettings() for initial theme store values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@elvistranhere
Copy link
Copy Markdown
Contributor Author

@copilot review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Frame size doesn't persist restarts

2 participants