Skip to content

fix: stabilize command palette appearance and focus - #28

Merged
sadiksaifi merged 2 commits into
mainfrom
fix/appearance
Jul 24, 2026
Merged

sadiksaifi merged 2 commits into
mainfrom
fix/appearance

Conversation

@sadiksaifi

@sadiksaifi sadiksaifi commented Jul 24, 2026 •

Copy link
Copy Markdown
Owner

Description

Fixes #27 by giving the command palette stable foreground contrast in both Light and Dark appearances while preserving native macOS translucency and the invoking app's active state.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Other

Changes

  • Host the transient palette in a floating, nonactivating NSPanel with native HUD material.
  • Keep the invoking application active while the palette accepts keyboard input.
  • Add an appearance-aware semantic backing so text remains readable over bright and dark content.
  • Clip all material layers to one rounded surface and refresh the native window shadow after layout.
  • Make asynchronous input callbacks Swift-concurrency-safe so the test target builds cleanly with current Swift toolchains.

Testing

  • Tested on macOS version: 26.5.2
  • Tested with different input types
  • Tested in pipe chains
  • Production build succeeds
  • All 13 unit tests pass
  • Verified the invoking application remains frontmost while the palette is visible

Screenshots

The palette was visually checked in Light and Dark appearances over both bright and dark application backgrounds. The invoking window's active traffic-light state was also verified while the palette was visible.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

QA

  • In Light appearance, open a dark application and run printf 'yes\nno\n' | mac-menu. The palette should remain light with dark, legible text.
  • In Dark appearance, open a bright application and run the same command. The palette should remain dark with light text.
  • While the palette is visible, confirm the invoking window's traffic lights remain colored, type a query, and verify the result list filters without activating mac-menu as the frontmost application.
  • Inspect all four corners in both appearances. The surface should be rounded with a native shadow and no square layer visible outside it.

Closes

@sadiksaifi sadiksaifi changed the title fix: stabilize command palette contrast across appearances fix: stabilize command palette appearance and focus Jul 24, 2026
@sadiksaifi
sadiksaifi merged commit 4348b91 into main Jul 24, 2026
1 check passed
@sadiksaifi
sadiksaifi deleted the fix/appearance branch July 24, 2026 08:28
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.

[Bug] Light text on light background is very difficult to read

1 participant