Skip to content

fix: quicktools ctrl+c not working properly - #2737

Merged
deadlyjack merged 2 commits into
mainfrom
fix/quicktools
Aug 14, 2026
Merged

fix: quicktools ctrl+c not working properly#2737
deadlyjack merged 2 commits into
mainfrom
fix/quicktools

Conversation

@deadlyjack

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR changes quick-tools modifier input handling so command-modified text is captured outside CodeMirror while preserving selections during Android replacement events.

  • Passes full replacement-range context through the CodeMirror input handler.
  • Resolves the target EditorView from the focused DOM element.
  • Adds modifier-capture policy and coverage for copy, cut, read-only, multi-selection, and Android split replacements.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/cm/quickToolsModifierInput.ts Extends the input-handler contract with replacement ranges and recognizes Android selection-deletion events without adding reconciliation transactions.
src/handlers/quickTools.js Routes command-modifier input through a capture element, resolves CodeMirror targets from DOM ownership, and preserves read-only and editable focus behavior.
src/handlers/quickToolsState.js Adds a pure policy helper distinguishing Shift-only editor input from command modifiers that require external capture.
tests/unit/quickToolsModifierInput.test.ts Covers selected-range detection, Android split replacements, DOM reconciliation, transaction count, and unmodified input.
tests/unit/quickToolsReadOnly.test.ts Updates read-only input-handler expectations for the new range-aware context.
tests/unit/quickToolsState.test.js Covers modifier-capture decisions for CodeMirror and non-CodeMirror targets.

Sequence Diagram

sequenceDiagram
  participant User
  participant QT as Quick Tools
  participant Capture as Capture Input
  participant CM as CodeMirror
  User->>QT: Enable Ctrl/Alt/Meta
  QT->>Capture: Focus hidden input
  User->>Capture: Enter shortcut character
  Capture->>QT: Emit captured input
  QT->>CM: Run command on resolved EditorView
  CM-->>QT: Preserve or update editor state
  QT->>CM: Restore editable focus
Loading

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@deadlyjack
deadlyjack added this pull request to the merge queue Aug 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 14, 2026
# Conflicts:
#	src/cm/quickToolsModifierInput.ts
#	src/handlers/quickTools.js
@deadlyjack

Copy link
Copy Markdown
Member Author

@greptileai review

@deadlyjack
deadlyjack added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit 50b3703 Aug 14, 2026
10 of 11 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Aug 14, 2026
@deadlyjack
deadlyjack deleted the fix/quicktools branch August 14, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants