Skip to content

Feature/keyboard shortcuts#647

Open
Daksh7785 wants to merge 23 commits into
ritesh-1918:gssocfrom
Daksh7785:feature/keyboard-shortcuts
Open

Feature/keyboard shortcuts#647
Daksh7785 wants to merge 23 commits into
ritesh-1918:gssocfrom
Daksh7785:feature/keyboard-shortcuts

Conversation

@Daksh7785
Copy link
Copy Markdown

✨ feat: Interactive Keyboard Shortcuts for Rapid Admin Dashboard Navigation

Closes #640


🎯 Overview

This PR implements global keyboard shortcuts for the HELPDESK.AI dashboard, enabling support team leads, admins, and users to navigate rapidly between major modules without touching the mouse — inspired by Gmail-style hotkey sequences.


🛠️ What's Changed

1. Frontend/src/hooks/useKeyboardShortcuts.js (New File)

  • Custom React hook that registers a global keydown listener on window
  • Implements Gmail-style sequential key detection (G → key within 1 second)
  • Role-aware routing — redirects to the correct path based on the logged-in user's role (admin, super_admin, master_admin, or standard user)
  • Typing protection — shortcuts are automatically suppressed when the user is focused inside any <input>, <textarea>, or contentEditable element to prevent accidental navigation
  • Cleans up event listeners on component unmount

2. Frontend/src/App.jsx (Modified)

  • Imports and calls useKeyboardShortcuts() inside AppLayout
  • Hook is active globally across all authenticated routes (user, admin, master admin portals)

3. Frontend/src/user/pages/Help.jsx (Modified)

  • Adds a "Keyboard Shortcuts" sidebar card with a trigger button
  • Adds a premium modal overlay listing all available shortcuts with styled <kbd> keycap indicators
  • Modal is dismissible via the × button or the "Got it" button

⌨️ Available Shortcuts

Shortcut Action Role Routing
GD Go to Dashboard Admin → /admin/dashboard · User → /dashboard
GT Go to Tickets Admin → /admin/tickets · User → /my-tickets
GH Go to Help All roles → /help
Ctrl + F / ⌘ F Focus Search Input Focuses & selects the nearest search field

✅ Testing

  • Build passes with zero errors (vite build — 3660 modules transformed)
  • G + D navigates correctly for admin and user roles
  • G + T navigates correctly for admin and user roles
  • G + H navigates to /help for all roles
  • Ctrl + F focuses the visible search input without triggering browser native search
  • Shortcuts are not triggered while typing inside form inputs or textareas
  • Shortcuts modal renders and dismisses correctly on the Help page

ritesh-1918 and others added 22 commits May 23, 2026 15:46
…h optimized for mobile viewport, supporting dynamic role redirection, accept/divert claiming, RAG overrides, CSAT stars, user clearance directories, and real-time settings sync
…epair profile logout, rename neural processing to AI triage
…s table, fix FlatList perf warning in AdminTicketDetailScreen
feat(monitoring): Set up Prometheus metrics and Grafana Dashboard for AI Inference Latency
feat(security): Implement transparent AES-256 GCM PII encryption for database tickets
feat(security): Implement AI-powered Spam and Phishing Detection for tickets and OCR
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

@Daksh7785 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 29, 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: 83c8befa-77b0-4146-acb0-9216d40d2cb8

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.

@Daksh7785 Daksh7785 closed this May 29, 2026
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