Repository navigation
feat(grouper): remember collapsed state across restarts - #1216
Open
berkay8987 wants to merge 1 commit into
Open
berkay8987 wants to merge 1 commit into
berkay8987 wants to merge 1 commit into
Conversation
The grouper always started collapsed, so every restart (including config or stylesheet reloads with watching off) hid widgets the user had expanded. The state is now saved to grouper_state.json in the app data folder, keyed by screen and widget name, and restored on first show. A missing or unreadable file falls back to collapsed. Closes amnweb#1081 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1081.
The grouper always started collapsed, so every restart (including config/stylesheet changes with watching off) hid widgets that had been expanded. This saves the collapsed state and restores it on start, like the systray does since #1019.
grouper_state.jsonunder%LOCALAPPDATA%\Yasb, keyed byscreen_name:widget_name, so each monitor keeps its own state.screen_nameandwidget_namearen't set yet during construction, and saved on every toggle (button click ortoggle_collapsecallback).collapse_options.enableddescribe the new behavior.Testing
tests/widgets/test_grouper.py: default collapsed, expanded and re-collapsed state survive a restart, state is per screen, a corrupt file falls back to collapsed, and nothing is saved without a collapse button.ruff format,ruff checkandpyright(strict) are clean; the full suite passes (2144 passed, 1 skipped).AI usage
Claude Code was used to help write and review this change. I have reviewed every line and tested it.
🤖 Generated with Claude Code