Skip to content

AP-057: Add command palette (Cmd/Ctrl+K) with shared entity search hook - #652

Merged
Krisha190235 merged 1 commit into
mainfrom
navya/feature/command-palette
Sep 26, 2026
Merged

Krisha190235 merged 1 commit into
mainfrom
navya/feature/command-palette

Conversation

@navyamidha95339-arch

Copy link
Copy Markdown
Collaborator

Summary
Adds a global command palette to the Admin Panel, opened with Cmd+K / Ctrl+K from any page, for jumping between pages and searching across users, shifts, and incidents without leaving the keyboard.

Checklist

✅ Shared search hook: extracted the existing search logic from GlobalSearch.jsx into a new useEntitySearch.js hook, so GlobalSearch and CommandPalette share one implementation instead of duplicating it
✅ Incidents added to search scope: since the hook is shared, incidents now show up in both the command palette and the existing global search
✅ Jump-to-page entries: palette lists admin panel pages so admins can navigate directly by typing a page name
✅ Full keyboard navigation: ↑/↓ to move through results, Enter to select, Escape to close
✅ Mounted globally in AdminLayout.jsx, so the shortcut works on every admin page
✅ No regression in GlobalSearch: same behaviour as before apart from the added incident results
✅ Verified end-to-end locally: open → search → navigate → close

Evidence
Screenshots attached: palette open on an admin page, search results across users/shifts/incidents, and keyboard selection highlighted.
image
image
image

@Krisha190235
Krisha190235 force-pushed the navya/feature/command-palette branch from 6166de6 to 8f818df Compare September 26, 2026 01:58
@Krisha190235

Copy link
Copy Markdown
Collaborator

Rebased onto current main. Kept useEntitySearch as the single source of search logic (superseding #644's inline helpers — GlobalSearch and CommandPalette both consume it), and wired GlobalSearch + CommandPalette to useTheme so they respect dark mode (#634). Resolved the AdminLayout clash by keeping both ViewAsBanner and CommandPalette, and wrapped the GlobalSearch test in renderWithTheme. Net diff is 5 files; eslint clean, full admin suite green (19 suites / 72 tests), build passes. Force‑pushed to update in place. 🙏

@Krisha190235
Krisha190235 merged commit 40b03a0 into main Sep 26, 2026
6 checks passed
@Krisha190235
Krisha190235 deleted the navya/feature/command-palette branch September 26, 2026 01:59
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.

2 participants