Skip to content

Fix card order not syncing across panel themes on Windows#70

Merged
aqua5230 merged 2 commits into
mainfrom
agent/windows-card-order-not-synced-across-panels
Jul 15, 2026
Merged

Fix card order not syncing across panel themes on Windows#70
aqua5230 merged 2 commits into
mainfrom
agent/windows-card-order-not-synced-across-panels

Conversation

@aqua5230

Copy link
Copy Markdown
Owner

Summary

  • Dragging a card to reorder it (e.g. swapping Claude and Codex) sends a set_card_order bridge message that's correctly persisted to shared preferences, but switch_panel() reloaded the next theme's HTML from self.latest_state, which is only refreshed by the periodic quota poll — not by the drag itself. So a newly loaded theme kept injecting whatever card_order was 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.
  • Bilingual CHANGELOG.md / CHANGELOG.zh-TW.md entries added under Unreleased.

Test plan

  • ruff check — clean
  • mypy . — clean
  • pytest -v — 700 passed, 2 skipped (pre-existing, environment-specific)
  • New parametrized test (test_card_order_persists_into_the_next_loaded_panel) drives the full path: bridge message → switch_panelon_loaded → injected state payload, across matrix/aquarium/win95, all via monkeypatch — no real preferences file touched
  • All 9 draggable panel themes already call applyCardOrder(state.cardOrder) consistently — confirmed the bug was Python-side state staleness, not a per-theme HTML issue

🤖 Generated with Claude Code

@aqua5230 aqua5230 closed this Jul 15, 2026
@aqua5230 aqua5230 reopened this Jul 15, 2026
aqua5230 added 2 commits July 16, 2026 05:29
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.
@aqua5230 aqua5230 force-pushed the agent/windows-card-order-not-synced-across-panels branch from 817114c to 9e05887 Compare July 15, 2026 21:29
@aqua5230 aqua5230 merged commit 0c0d011 into main Jul 15, 2026
5 checks passed
@aqua5230 aqua5230 deleted the agent/windows-card-order-not-synced-across-panels branch July 15, 2026 21:37
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