AP-057: Add command palette (Cmd/Ctrl+K) with shared entity search hook - #652
Merged
Merged
Conversation
Krisha190235
force-pushed
the
navya/feature/command-palette
branch
from
September 26, 2026 01:58
6166de6 to
8f818df
Compare
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. 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.