Skip to content

feat(ui): raise Settings window and filter provider order to configured - #38

Merged
victorhqc merged 1 commit into
mainfrom
fix/settings-quirks
Jul 25, 2026
Merged

feat(ui): raise Settings window and filter provider order to configured#38
victorhqc merged 1 commit into
mainfrom
fix/settings-quirks

Conversation

@victorhqc

Copy link
Copy Markdown
Owner

Summary

Fixes two Settings-window papercuts: re-clicking "Settings…" now raises the already-open window instead of leaving it behind the frontmost app, and the Appearance tab's "Provider order" list shows only providers that are actually configured.

Why

Two user-facing bugs (ui 16). The Settings window could get lost behind other apps when re-opened, and the provider order list included every registered provider regardless of whether the user had set it up.

What changed

  • Settings window activation. Replaced SettingsLink with a custom button modifier that calls openSettings(), activates Filbert, and explicitly raises the Settings NSWindow. The window lookup uses structural traits (styleMask.contains(.titled) and not NSPanel) instead of localized title text, so it works across locales.
  • Configured-only provider order. Added configuredProvidersOrdered to QuotaViewModel, filtered by the same state predicate used in refreshDerived(). The Appearance tab now renders this filtered list and shows an empty-state hint when no providers are configured.
  • Drag-drop index mapping. The move helper resolves visible indices against the full ordered list, so saved positions of unconfigured providers are preserved when they re-appear later.
  • Tests. Unit tests for configuredProvidersOrdered across mixed configured/unconfigured registries.
  • Spec. New spec (ui 16) covering both issues.
  • Writing-code skill docs. Minor clarification around AC marker usage.

Notes for review

  • The window-raise behavior is not unit-testable without a host app — covered by manual verification per the spec ACs.
  • Drag-drop on a filtered list moves by provider ID, not visible index, so hidden providers stay put. Worth a quick manual check after review.

Introduce `openAndRaiseSettings` to bring the Settings window forward on
every click instead of only on first open. Filter the Appearance tab's
"Provider order" list to show only configured providers, matching the
popover's visible set, and show a hint when nothing is configured. Add
unit tests for the new view-model computed property.
@victorhqc
victorhqc merged commit 782b8a6 into main Jul 25, 2026
1 check passed
@victorhqc
victorhqc deleted the fix/settings-quirks branch July 25, 2026 11:23
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