feat(commandPalette): add cmd+k palette for navigation and preferences#384
Open
feat(commandPalette): add cmd+k palette for navigation and preferences#384
Conversation
📊 Build Bundle StatsThe latest build generated the following assets: |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a cmd+k / ctrl+k command palette to the authenticated app experience, enabling keyboard-driven navigation and preference toggles (theme, hide balances, sign out), plus a proposal-by-ID jump.
Changes:
- Introduces a
cmdk-powered command palette UI with navigation + preferences groups and proposal ID lookup. - Adds persisted enable/disable setting for the command palette and surfaces it in Settings (Appearance).
- Mounts the palette in the authenticated layout and adds supporting i18n resources and dependency updates.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/governance-app-frontend/src/routes/_auth/settings/index.tsx | Adds the Command Palette toggle card to the Appearance section. |
| src/governance-app-frontend/src/routes/_auth.tsx | Mounts the CommandPalette in the authenticated layout. |
| src/governance-app-frontend/src/i18n/en/userAccount.json | Adds Settings copy for the command palette toggle card. |
| src/governance-app-frontend/src/i18n/en/commandPalette.json | Adds new translations for the command palette UI. |
| src/governance-app-frontend/src/i18n/config.ts | Registers commandPalette translations in i18n resources. |
| src/governance-app-frontend/src/features/userAccount/components/CommandPaletteCard.tsx | New Settings card to enable/disable the palette and show the shortcut hint. |
| src/governance-app-frontend/src/common/hooks/useCommandPaletteShortcut.ts | New global cmd+k / ctrl+k shortcut hook. |
| src/governance-app-frontend/src/common/hooks/useCommandPaletteSettings.ts | New localStorage-backed setting for enabling/disabling the palette. |
| src/governance-app-frontend/src/common/constants/extra.ts | Adds a localStorage key constant for the palette setting. |
| src/governance-app-frontend/src/common/components/CommandPalette.tsx | Implements the palette behavior, groups, and actions (navigate, theme, balances, logout, proposal lookup). |
| src/governance-app-frontend/src/common/components/Command.tsx | Adds reusable cmdk + dialog wrapper components. |
| src/governance-app-frontend/src/app/App.tsx | Comments out derivationOrigin in II login options (unrelated to palette). |
| src/governance-app-frontend/package.json | Adds cmdk dependency. |
| package-lock.json | Locks cmdk dependency resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+35
to
+45
| <Dialog {...props}> | ||
| <DialogContent | ||
| className={cn('overflow-hidden p-0', className)} | ||
| showCloseButton={showCloseButton} | ||
| > | ||
| {(title || description) && ( | ||
| <div className="sr-only"> | ||
| {title && <h2>{title}</h2>} | ||
| {description && <p>{description}</p>} | ||
| </div> | ||
| )} |
| }; | ||
|
|
||
| const storeValue = (enabled: boolean): void => { | ||
| localStorage.setItem(COMMAND_PALETTE_SETTINGS_KEY, String(enabled)); |
|
✅ No security or compliance issues detected. Reviewed everything up to 22ae22a. Security Overview
Detected Code Changes
|
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.
Motivation
Power users want to navigate the app and toggle preferences without using the mouse. A cmd+k / ctrl+k palette consolidates common destinations and preference toggles into one searchable menu, allowing you to jump directly to a proposal by ID.
Screen.Recording.2026-05-10.at.11.29.08.mov
Changes
cmdk-based command palette with two groups: Navigate (driven by the samegetNavigationItemsused in the sidebar, ensuring order remains consistent) and Preferences (theme, hide balances, sign out).useCommandPaletteShortcutfor the cmd+k / ctrl+k binding, controlled by its own setting to keep it separate from the existing single-key shortcut toggle.CommandPaletteCardto the Appearance section of Settings, enabled by default._authlayout, making it available only after login.