Skip to content

Save GUI values inbetween sessions#954

Merged
Josef-Haupt merged 4 commits into
mainfrom
persistant-gui-values
Jul 14, 2026
Merged

Save GUI values inbetween sessions#954
Josef-Haupt merged 4 commits into
mainfrom
persistant-gui-values

Conversation

@Josef-Haupt

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 14, 2026 08:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces persistent, per-tab GUI state stored in state.json so that most user-adjustable controls restore their last-used values across application restarts, along with a settings-tab “reset to defaults” action.

Changes:

  • Added a TabState abstraction to persist/restore Gradio component values per tab, including validation against bounds/choices.
  • Extended settings.py with a nested "tab-settings" store and atomic state writes.
  • Updated GUI tabs to build components through TabState.persist() and added tests covering persistence/validation/reset behavior.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/gui/test_state.py New tests for per-tab persistence, validation rules, and reset behavior.
birdnet_analyzer/settings.py Adds tab-scoped settings storage, corrupted-state fallback, and atomic state writes.
birdnet_analyzer/lang/en.json Adds localized strings for the reset UI.
birdnet_analyzer/gui/state.py New persistence layer (TabState) plus reset support.
birdnet_analyzer/gui/utils.py Wires persistence into shared GUI builders and adds reset button in settings UI.
birdnet_analyzer/gui/train.py Persists training tab controls and ensures initial UI state reflects persisted values.
birdnet_analyzer/gui/species.py Persists species tab filename input and passes TabState into shared builders.
birdnet_analyzer/gui/single_file.py Persists single-file tab settings and passes TabState into shared builders.
birdnet_analyzer/gui/segments.py Persists segments tab controls.
birdnet_analyzer/gui/search.py Persists embeddings-search controls (crop mode, overlap, etc.).
birdnet_analyzer/gui/review.py Persists review tab autoplay option.
birdnet_analyzer/gui/multi_file.py Persists multi-file tab output options and computing settings.
birdnet_analyzer/gui/evaluation.py Persists evaluation tab controls, including metrics toggles.
birdnet_analyzer/gui/embeddings.py Persists embeddings tab preprocessing/computing controls.

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

Comment thread tests/gui/test_state.py
Comment thread birdnet_analyzer/gui/evaluation.py
@Josef-Haupt
Josef-Haupt merged commit 83f4a46 into main Jul 14, 2026
9 of 13 checks passed
@Josef-Haupt
Josef-Haupt deleted the persistant-gui-values branch July 14, 2026 09:14
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