Skip to content

feat: add keyboard shortcuts for rapid admin dashboard navigation (#640)#669

Closed
lb1192176991-lab wants to merge 1 commit into
ritesh-1918:gssocfrom
lb1192176991-lab:feat/keyboard-shortcuts-640
Closed

feat: add keyboard shortcuts for rapid admin dashboard navigation (#640)#669
lb1192176991-lab wants to merge 1 commit into
ritesh-1918:gssocfrom
lb1192176991-lab:feat/keyboard-shortcuts-640

Conversation

@lb1192176991-lab
Copy link
Copy Markdown

What

Adds interactive keyboard shortcuts for rapid admin dashboard navigation. Press G then a second key to navigate between admin pages without clicking.

New files:

  • hooks/useKeyboardShortcuts.js — Custom hook that listens for two-key sequences (G+D, G+T, G+A, etc.) and navigates to the corresponding admin route. Buffer-based approach (2s timeout) so keys dont need to be pressed simultaneously. Also supports Ctrl+/ to toggle the help modal and Escape to close it.
  • components/shared/ShortcutsHelpModal.jsx — Reusable modal showing all available shortcuts with styled kbd elements. Animated with framer-motion.

Modified files:

  • admin/layout/AdminLayout.jsx — Wired the keyboard shortcuts hook and help modal into the admin layout.

Shortcuts:

  • G + D → Dashboard
  • G + T → Tickets
  • G + A → Analytics
  • G + U → Users
  • G + P → Profile
  • G + S → SLA Dashboard
  • Ctrl + / → Toggle help
  • Escape → Close help

Why

Team leads and admins managing large volumes of tickets need to navigate the dashboard rapidly. Keyboard shortcuts eliminate mouse-based navigation for common routes, matching the efficiency expectations of enterprise support tools (like Zendesk, Jira, or Linear).

Testing

  • Manually verified all two-key sequences navigate to correct routes
  • Verified Ctrl+/ toggles the help modal
  • Verified Escape closes the modal
  • Verified shortcuts are disabled when typing in INPUT/TEXTAREA/SELECT fields
  • Verified buffer clears after 2 seconds of inactivity (stale sequences dont trigger accidental navigation)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@lb1192176991-lab is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9cd1dd3d-2b2d-4bc5-9370-8897c47b2a1a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c1e637f4a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

* Escape → Close help modal / go back
*/

import { useEffect, useCallback, useRef, useState } from 'react';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the unused hook import

This new import brings in useState but the hook never references it. The repo’s ESLint config treats no-unused-vars as an error and npm run lint is configured with --max-warnings 0, so once dependencies are installed any CI/pre-commit path that runs lint will fail on this file before the app can be accepted.

Useful? React with 👍 / 👎.

@lb1192176991-lab
Copy link
Copy Markdown
Author

Superseded by PR #674 which includes the shortcuts help overlay and is more complete.

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.

1 participant