Skip to content

Add Keyboard Shortcuts to Agent Inbox #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

The-CodeINN
Copy link

@The-CodeINN The-CodeINN commented Apr 18, 2025

Summary

This PR adds keyboard shortcuts to the Agent Inbox application, inspired by Superhuman's keyboard-driven workflow. Users can now navigate and interact with threads using keyboard shortcuts, making the application more efficient and accessible.

Changes

  • Created a new src/hooks/use-keyboard-shortcuts.tsx hook that manages keyboard events across the application
  • Added keyboard shortcut system that avoids triggering shortcuts when typing in input fields
  • Implemented the following keyboard shortcuts:
    • e - Close thread and return to thread list
    • / - Navigate between threads
    • r - Focus on the human response input field
    • u - Undo changes in all inputs

Implementation Details

  • Added a custom hook system that properly handles shortcut registration and event management
  • Integrated with the existing navigation and thread viewing systems
  • Implemented visual indicators for thread selection when using keyboard navigation
  • Created an undo system that tracks original input values for reset functionality
  • Made shortcuts context-aware, only activating in appropriate views

Testing

  • Tested keyboard navigation between threads
  • Verified that the 'e' key properly returns to inbox from thread view
  • Confirmed that 'r' key focuses the response input field when available
  • Validated that 'u' key resets all inputs to their original values
  • Ensured shortcuts don't interfere with regular typing in input fields

Related Issues

Fixes #65

Copy link

vercel bot commented Apr 18, 2025

@The-CodeINN is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@The-CodeINN The-CodeINN changed the title Hotkey-shortcut Add Keyboard Shortcuts to Agent Inbox Apr 18, 2025
Copy link

vercel bot commented Apr 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-inbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 5:14pm

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.

[Feature request]: Add hotkeys for shortcuts
1 participant