You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(chat): add a configurable shortcut for quoting selected text - #4664
Add Mod+Shift+9 for the existing selected-text Quote action in Chat. The active binding appears in the button's tooltip and the existing shortcut settings.
Reuse the existing selection validation, quote formatting, length limit and composer insertion. No message is sent.
Leave keys alone in text fields and Terminal mode, or when no eligible visible Chat selection exists.
Verification
42 shortcut and quote tests passed; typecheck and production build passed with the repository's unchanged frozen lockfile.
Real compiled app against an isolated herdr session and native Pi with a persisted public-example conversation. Trusted mouse selection and keyboard input appended the same quote as the existing button, preserving the original draft. No Chat submit or external provider request occurred during the interactions.
Trusted composer and Terminal key presses left the draft unchanged and were not prevented. The shortcut was visible in existing Settings.
Real-app interaction
Result
Mouse-selected Chat text → Mod+Shift+9
Original draft retained, one formatted quote appended; selection cleared.
Same selection → existing Quote button
Exact same draft/quote bytes as the hotkey.
Mod+Shift+9 while editing the composer
Draft unchanged; defaultPrevented: false.
Mod+Shift+9 in Terminal, then return to Chat
Draft unchanged; defaultPrevented: false.
Chat submit frames during these interactions
0.
Screenshots below show the real app with public test text. No customer transcript, credentials or machine metadata is included. No mocked Quote UI or screenshot harness is committed.
Evidence
Selected text and the existing Quote action:
Draft preserved after the keyboard Quote action:
Discoverable binding in existing shortcut settings:
Terminal remains a separate, non-quoting key context:
Auto incremental reviews are disabled on this repository.
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.
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
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
Added a configurable keyboard shortcut to quote selected chat text into the current message. The default is Mod+Shift+9, and the Quote button tooltip displays the configured shortcut.
Quoting text does not send the message. The shortcut is ignored in text fields and Terminal mode.
This change adds a configurable Mod+Shift+9 shortcut for quoting selected chat text. The shortcut appears in the Quote button title and triggers the existing quote action when the event and selection offer pass validation.
Changes: Chat quote shortcut
Layer / File(s)
Summary
Register and test the shortcut src/lib/shortcuts.ts, src/lib/shortcuts.test.ts
Adds the default quote-chat binding and excludes it from app-level shortcut dispatch. Tests cover platform matching, display, conflicts, disabling, and rebinding.
Handle the shortcut in chat replies src/components/ReplyComments.tsx, changelog.d/chat-quote-shortcut.md
Displays the configured shortcut in the Quote button title. The keydown handler invokes the existing quote action only when its event and offer checks pass. The changelog describes the shortcut and contexts where it does not act.
devswha/ovis#2577: Changes selection validation and quote formatting used by the shortcut’s existing Quote action.
devswha/ovis#2574: Introduces the chat-reply Quote action that this shortcut invokes.
devswha/ovis#1922: Removes the chat-reply Quote action that this shortcut invokes.
Suggested reviewers:devswha
Merge Risk: Minimal · previous review 63495
This adds a configurable Mod+Shift+9 shortcut that invokes the existing Chat quote action without sending a message. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a configurable keyboard shortcut for quoting selected text in Chat. It matches the changeset, which adds a Mod+Shift+9 binding for the existing Quote action. It is spe…
Description check
The description covers the change, the behavior, and extensive validation. It explains the shortcut, the reuse of existing selection and insertion logic, the non-send behavior, and the exclusions for …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a configurable keyboard shortcut for quoting selected text in Chat. It matches the changeset, which adds a Mod+Shift+9 binding for the existing Quote action. It is specific and follows conventional commit style.
Full details: Description check
Explanation
The description covers the change, the behavior, and extensive validation. It explains the shortcut, the reuse of existing selection and insertion logic, the non-send behavior, and the exclusions for text fields and Terminal mode. The Validation section lists the tests and build run, plus real-app checks. It does not name the repository's standard checks (bun run check fast or full), and it does not link an issue as the template asks for features. It also does not state whether contract tests apply, though no HTTP/WS change is described.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Reviewing files that changed from the base of the PR and between d122cc0 and 6349593.
Files selected for processing: 4
changelog.d/chat-quote-shortcut.md
src/components/ReplyComments.tsx
src/lib/shortcuts.test.ts
src/lib/shortcuts.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Merged through pr-merge at head 081c24988. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.
External feature PR; maintainer go in the Dori session 2026-11-26; reviews: omo gate + Codex adversarial (gpt-6.2-sol-fast xhigh), one each; maintainer edits: added quote-chat to the Settings sanitizer allowlist so it can be rebound or turned off, kept an existing custom binding on Mod+Shift+9 ahead of the new default (Quote then shows as unbound in Settings and the tooltip), moved the shared label's ja/ko/zh translations to base, dropped the wrong terminal warning for Quote; merged latest main. Earlier CI failures (winvm-runner timing test, ui-access-regression timeout, chat-fallback telemetry ENOENT) are outside this change.
Thanks @odfalik, this is merged. A few maintainer edits on top of your branch:
quote-chat was missing from the Settings allowlist, so rebinding or turning off Quote in Settings had no effect. It is in now, with a test through the Settings path.
If someone already bound another action to Mod+Shift+9, that binding keeps working and Quote shows as unbound in Settings and the tooltip, instead of advertising a chord that does something else.
The shared label's ja/ko/zh translations moved to the base dictionaries (the i18n ownership test), and Settings no longer warns that a Quote binding stops reaching the terminal.
The chat fallback browser lab now answers /api/telemetry with a 404, since the shortcut module loads the usage counters there.
…4886)
Fork pull requests run **Fast checks** on GitHub's `ubuntu-24.04` image
(they never reach the self-hosted pool). There it takes 9 to 10 minutes,
so about half the runs hit the 10-minute `timeout-minutes` and were
cancelled, and the merge gate then refused the PR (#4664 three times).
This raises that one job's limit from 10 to 15 minutes:
- `.github/workflows/ci.yml`: `fast` job.
- `.github/workflows/release-validate.yml`: its `Fast checks
(GitHub-hosted)` copy, which `scripts/release-validate-workflow.test.ts`
requires to match ci.yml's.
No other job, runner routing, trigger, permission or secret changes.
Fork PRs stay on GitHub-hosted runners.
Verification: `bun run check fast` passed locally (workflow syntax via
actionlint, typecheck, build, unit tests 29194 pass / 0 fail); the
workflow tests (`release-validate-workflow`, `light-runner-workflow`,
`pages-gate`, `release-ci-reuse`) pass.
Workflow change (timeout only) approved by the maintainer.
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
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.
Summary
Verification
defaultPrevented: false.defaultPrevented: false.Evidence
Selected text and the existing Quote action:
Draft preserved after the keyboard Quote action:
Discoverable binding in existing shortcut settings:
Terminal remains a separate, non-quoting key context: