Skip to content

feat: Spotlight-like command palette#57

Open
vuon9 wants to merge 16 commits intomainfrom
feature/spotlight-command-palette
Open

feat: Spotlight-like command palette#57
vuon9 wants to merge 16 commits intomainfrom
feature/spotlight-command-palette

Conversation

@vuon9
Copy link
Owner

@vuon9 vuon9 commented Mar 3, 2026

Summary

This PR implements a Spotlight-like command palette that floats above all windows, including fullscreen apps on macOS.

Features

  • Global Hotkey: Cmd+Ctrl+M (macOS) or Ctrl+Alt+M (Windows/Linux) opens the floating palette from anywhere
  • macOS CollectionBehaviors:
    • CanJoinAllSpaces - appears on all virtual desktops
    • FullScreenAuxiliary - overlays fullscreen apps
    • Transient - temporary window behavior
  • 27 Commands: Code formatters, converters, tools, data generators
  • Fuzzy Search: Smart matching with scoring algorithm
  • Recent Commands: Persists last 10 commands to localStorage
  • Keyboard Navigation: Arrow keys, Enter, Escape
  • Accessibility: ARIA attributes (role, aria-selected), focus management
  • Carbon Design System: Uses Carbon tokens throughout

Technical Implementation

Backend (Go)

  • service/spotlight.go - Spotlight window service
  • main.go - Window creation with macOS behaviors, event handlers
  • Event system for communication between spotlight and main windows

Frontend (React)

  • SpotlightPalette component with fuzzy search
  • Separate entry point (spotlight.jsx) for spotlight window
  • Vite multi-entry configuration
  • All new files follow Carbon Design System patterns

Testing

  • Unit tests for spotlight service
  • Manual testing guide at docs/spotlight-testing.md

Testing

  1. Build: task build
  2. Run: task run
  3. Press Cmd+Ctrl+M to open spotlight
  4. Type to search, arrow keys to navigate, Enter to select

Related

Closes #50

Commits

  • feat(spotlight): add spotlight window service
  • feat(spotlight): create spotlight window with macOS collection behaviors
  • feat(spotlight): add spotlight window frontend components
  • build(vite): configure spotlight entry point
  • feat(spotlight): add navigation handling between spotlight and main window
  • feat(spotlight): add macOS collection behaviors for spotlight window
  • docs: add spotlight documentation and testing guide
  • fix(spotlight): correct event name mismatch

vuon9 added 16 commits March 3, 2026 16:15
- Fix compilation error in css_selector_test.go (html package shadowing)
- Fix test expectations: change literal \n to actual newlines
- Fix CSS descendant selector to respect ancestor relationships
- Fix XML attribute matching to handle any attribute order
- Fix nested XML extraction test to properly count elements
- Add support for element.class selectors (e.g., div.header)
- Add support for double quotes in XPath expressions

All tests now passing.
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.

spotlight-like command palette

1 participant