Skip to content

feat: add app settings store (theme, UI state, prefs)#34

Merged
mulhamna merged 2 commits into
developfrom
feat/app-settings-store
Jul 10, 2026
Merged

feat: add app settings store (theme, UI state, prefs)#34
mulhamna merged 2 commits into
developfrom
feat/app-settings-store

Conversation

@mulhamna

Copy link
Copy Markdown
Member

Summary

  • Connections were the only persisted state, so app preferences reset every launch (theme, sidebar collapse).
  • Adds a settings store and wires theme + collapsed-groups persistence.

Changes

  • crates/connstore/src/settings.rs: SettingsStore serializing AppSettings (theme, update_check, last_update_check, ui_state, editor prefs) to settings.json in the same config dir as connections.json. Mirrors ConnStore's load/flush; no secret backend (nothing sensitive).
  • app/src/main.rs: load at startup (same RDBS_STORE_DIR / mock overrides), apply saved theme before first paint, restore collapsed sidebar groups, persist on theme toggle and group collapse.
  • Filter text stays session-only (restoring needs the picker FilterField to expose a settable text property; noted in a ponytail comment).

Test plan

  • cargo test -p rdbs-connstore (round-trip, defaults-when-absent, partial-json).
  • make lint / workspace tests green.
  • Manual: set dark theme + collapse a group, quit, relaunch → restored; inspect settings.json.

mulhamna added 2 commits July 11, 2026 01:27
Connections were the only persisted state, so app preferences (theme,
update-check toggle, sidebar/filter UI state, editor prefs) reset on every
launch. Add a SettingsStore that serializes AppSettings to settings.json in
the same config dir as connections.json, mirroring ConnStore's load/flush
shape but without a secret backend since nothing here is sensitive.
Load SettingsStore at startup next to ConnStore (same RDBS_STORE_DIR / mock
overrides), apply the saved theme before first paint, and restore the
sidebar groups the user had collapsed. The theme toggle and group-collapse
handlers now write their new state back to settings.json.

Filter text stays session-only for now — restoring it needs the picker
FilterField to expose a settable text property; noted in a ponytail comment.
@mulhamna mulhamna merged commit be03685 into develop Jul 10, 2026
4 checks passed
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.

1 participant