Fix card order not syncing across panel themes on Windows#70
Merged
aqua5230 merged 2 commits intoJul 15, 2026
Conversation
Dragging a card to reorder it saves the new order via the set_card_order bridge message, but switch_panel() reloaded the next theme's HTML from self.latest_state, which was only refreshed by the periodic quota poll — not by the drag itself. So the newly loaded theme kept injecting whatever card_order was cached at the last poll, and the reordering only "stuck" in the theme it was performed in. switch_panel() now re-reads the persisted order from shared preferences before loading the next theme, so any theme reflects the same order immediately.
817114c to
9e05887
Compare
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
set_card_orderbridge message that's correctly persisted to shared preferences, butswitch_panel()reloaded the next theme's HTML fromself.latest_state, which is only refreshed by the periodic quota poll — not by the drag itself. So a newly loaded theme kept injecting whatevercard_orderwas cached at the last poll, and the reorder only "stuck" in the theme it was performed in; every other theme needed the drag repeated.switch_panel()now re-reads the persisted order from shared preferences before loading the next theme's HTML, so any theme reflects the same order immediately — no more re-dragging per theme.CHANGELOG.md/CHANGELOG.zh-TW.mdentries added under Unreleased.Test plan
ruff check— cleanmypy .— cleanpytest -v— 700 passed, 2 skipped (pre-existing, environment-specific)test_card_order_persists_into_the_next_loaded_panel) drives the full path: bridge message →switch_panel→on_loaded→ injected state payload, across matrix/aquarium/win95, all viamonkeypatch— no real preferences file touchedapplyCardOrder(state.cardOrder)consistently — confirmed the bug was Python-side state staleness, not a per-theme HTML issue🤖 Generated with Claude Code