Skip to content

feat: redirect keystrokes on chat-page to composer - #14320

Open
fynnelsner wants to merge 2 commits into
LibreChat-AI:devfrom
fynnelsner:patch-1
Open

fynnelsner wants to merge 2 commits into
LibreChat-AI:devfrom
fynnelsner:patch-1

Conversation

@fynnelsner

Copy link
Copy Markdown

Summary

This PR improves the chat-page UX by redirecting keystrokes to the composer/text input area. Users can now start typing immediately without needing to manually tab or click into the input field first. This makes the chat interface feel more responsive and convenient, especially for keyboard-heavy users.

Change Type

  • New feature (non-breaking change which adds functionality)

Testing

  1. Open any chat page.
  2. Without clicking or tabbing into the text input, start typing.
  3. Verify the typed text appears in the composer input field.
  4. Confirm existing shortcuts and focus behavior still work as expected (e.g., Tab navigation, existing input focus states).

Test Configuration:

  • Browser: Firefox 127
  • OS: Ubuntu 24.04 LTS

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

This allows users to just start typing text into the chat window without having to 'tab' or click into the text input area, improving UX, as it's more convenient this way
@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

https://github.com/danny-avila/LibreChat/blob/34ea1550d62b6a1220e97449b18f3ded6c44568b/client/src/components/Chat/Input/ChatForm.tsx#L105-L106
P2 Badge Preserve focus on role=button controls

This interactive-element guard only excludes native button/a elements and menu/listbox roles, but several chat-page controls are focusable TooltipAnchor divs with role="button" (for example HeaderOptions' parameters button). When a keyboard user tabs to one of those controls and presses Space or another printable key, this window handler treats it as page typing and moves focus into the composer, so the focused control is interrupted instead of retaining keyboard interaction. Include [role="button"] (and similar focusable widgets) in this guard before redirecting keystrokes.

ℹ️ 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".

@codegraph-librechat codegraph-librechat Bot added 🗺️ Agent Chat UI codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Chat Features codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Chat Frontend codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) labels Oct 1, 2026
@codegraph-librechat codegraph-librechat Bot added 🗺️ Core Chat UX codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Frontend UI codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) labels Oct 9, 2026
@github-actions
github-actions Bot changed the base branch from main to dev October 15, 2026 22:13
@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for the contribution! LibreChat merges all changes into dev first — main only moves at release time — so this pull request's base branch was switched from main to dev automatically.

Nothing is needed from you; your commits, reviews and discussion are unchanged. If the diff now shows files you did not touch, rebase onto dev:

git remote add upstream https://github.com/LibreChat-AI/LibreChat.git
git fetch upstream dev
git rebase upstream/dev
git push --force-with-lease

Maintainers: apply the target: main label and restore the base branch if this one genuinely belongs on main.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Agent Chat UI codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Chat Features codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Chat Frontend codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Core Chat UX codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Frontend UI codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants