Skip to content

fix(windows): show and activate custom style packs from the tray menu #808

Description

@appergb

Split from #759 so the non-UI-heavy correctness bug can be fixed independently from the Alt+1–9 shortcut feature.

Current behavior

  • tray_polish_mode_menu_entries() hard-codes only the four built-in polish modes.
  • build_style_tray_menu() determines the checked state via pack.base_mode, so custom packs sharing a base mode cannot be distinguished.
  • handle_style_tray_menu_event() parses a PolishMode and calls activate_builtin_style_mode(), so imported/custom packs cannot be selected from the tray.

Required behavior

  • On Windows, list every enabled style pack using a stable, collision-safe menu identifier.
  • Mark exactly the active pack by StylePack.id.
  • Selecting a tray item activates that exact pack through the existing activate_style_pack_by_id path and persists/emits the same preference updates as the settings UI.
  • Invalid/stale menu IDs are rejected safely.
  • Keep the current Windows-only scope; do not redesign the settings or tray UI.

Acceptance checks

  • Add focused unit/contract tests for built-in and imported IDs, duplicate base modes, disabled packs, and malformed/stale IDs.
  • cargo test --locked passes.
  • Existing frontend build and contract checks pass.

Parent: #759.

Metadata

Metadata

Assignees

Labels

P2Medium prioritybugSomething isn't workingplatform:windowsWindows-specific

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions