Skip to content

Persist note details visibility preference#904

Merged
multiplex55 merged 2 commits intomasterfrom
codex/add-setting-for-notes-details-visibility
Feb 21, 2026
Merged

Persist note details visibility preference#904
multiplex55 merged 2 commits intomasterfrom
codex/add-setting-for-notes-details-visibility

Conversation

@multiplex55
Copy link
Owner

Motivation

  • Remember whether note metadata/details are shown so new and existing users get consistent behavior across sessions.
  • Expose the preference in the settings editor so users can change the default without editing files.
  • Ensure note panels open with the configured default and persist user toggles to settings so the last runtime choice is retained.

Description

  • Added a persisted note_show_details: bool to Settings with #[serde(default = "default_note_show_details")] and wired default_note_show_details() into impl Default for Settings so the missing field defaults to false (details hidden). (file: src/settings.rs)
  • Extended SettingsEditor with a note_show_details field, hydrated it in from_settings(...), included it in to_settings(...), and added a checkbox labeled "Show note details by default" under the existing "Note settings" section. (file: src/settings_editor.rs)
  • Propagated runtime state by adding note_show_details to LauncherApp, threading it through update_paths(...), initializing it from loaded settings, and using it when creating note panels via NotePanel::from_note_with_details(note, self.note_show_details). (file: src/gui/mod.rs)
  • Implemented a from_note_with_details(...) constructor and a set_show_metadata(...) helper on NotePanel and added write-through persistence on toggles so clicking Hide/Show Details updates Settings.note_show_details on disk only when the state actually changes and surfaces load/save errors via app.set_error(...). (file: src/gui/note_panel.rs)
  • Added unit tests: serialization/default tests for note_show_details and note-panel tests for constructor behavior, toggle persistence (writes only on change), and existing metadata visibility gating. (files: src/settings.rs, src/gui/note_panel.rs)
  • Touched plugin/application glue to include the new setting in plugin-editor flows so the value is persisted/applied when changing settings. (file: src/plugin_editor.rs)

Testing

  • Verified code formatting with cargo fmt -- --check, which succeeded.
  • Added and attempted to run unit tests for note_show_details and note panel behavior, but cargo test in this environment failed due to an external system dependency (the alsa system library / pkg-config is missing which triggers alsa-sys build failures), so the new tests could not be executed end-to-end here.
  • The repository changes include the new tests and they should pass in a normal developer environment with system build dependencies installed (or in CI that provides them).

Codex Task

@multiplex55 multiplex55 merged commit ee1b185 into master Feb 21, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/add-setting-for-notes-details-visibility branch February 23, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant