Repository navigation
Shortcuts: remove dead paste-last and Hands-Free shortcut code - #2033
Merged
Merged
Conversation
1.1.70 made dictation one key with a behavior picker, but the old paste-last shortcut and separate Hands-Free binding stayed in the tree. Remove the paste-last action, its event-tap routing, callback and stored binding, plus the unused Hands-Free binding writer and the DictationShortcutMode title/summary/writer. The legacy mode read stays, renamed legacyDictationShortcutMode, for the one-key migration. Kept on purpose: DictationShortcutMode.handsFree (models tap-kept and Tap to toggle takes; raw value is the shortcut_mode telemetry tag), .dictationHandsFree routing, and PasteLastDictationFeedback (the island's "Paste again" chip still uses it).
Owner
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
1.1.70 made dictation one key (Right Option) with a behavior picker and removed the separate Hands-Free and paste-last shortcuts from the UI, but their code stayed: an action no binding could produce, event-tap routing for it, stored bindings nothing read, and writers nothing called. That's confusing for the next reader and an easy place for an agent to "fix" the wrong thing.
Product Impact
dictation(no behavior change)dictation reliabilityWhat changed
Removed (unreachable):
PhysicalShortcutAction.pasteLastDictationand its debounce bucket.configuredBindings()never registered it.ContextCaptureEngine: the keyDown and flagsChanged arms, thehandlePhysicalShortcutarms,handlePhysicalPasteLastDictationPress, andonPasteLastDictation. Also its assignment inTranscriptedApp.PhysicalDictationTriggerPreferences:defaultPasteLastDictationBinding,pasteLastDictationBinding,savePasteLastDictation, their storage keys, andsaveHandsFree.handsFreeBindinganddefaultHandsFreeBindingare now private and used only by the migration.DictationShortcutMode:title,summary,CaseIterableandIdentifiable;HotkeyPreferences.setDictationShortcutModeanddefaultDictationShortcutMode.Kept on purpose (live):
DictationShortcutMode.handsFree. It models a take that keeps listening: Tap to toggle, or a Hold or tap take kept by a tap. About a dozen Speech/UI policies branch on it. Its raw valuehands_freeis theshortcut_modetelemetry tag and is in the Sentry allowlist. It isn't renamed, because that would touch about 15 files with no behavior gain; its doc comment now explains it..dictationHandsFreerouting andHandsFreeModifierComboTracker, used by Tap to toggle.PasteLastDictationFeedbackandNotchIslandController.onPasteLastDictation. The island's "Paste again" chip still uses them.legacyDictationShortcutMode(), used only bymigrateToOneDictationKeyIfNeeded. A missing or unknown value still maps to.handsFree, so upgraders migrate exactly as before.Telemetry: the only value that can no longer be emitted is hotkey_id
paste_last_dictation_physical_trigger, which was already unreachable.shortcut_mode,dictation_hands_freeand theDictationTriggerraw values are unchanged.Follow-ups:
check-file-size.py --shrinkcan now lower the baselines forContextCaptureEngine.swiftandTranscriptedApp.swift.How I checked it
The work ran as a workflow: a read-only reachability map, then removal in two sequential passes, then two adversarial reviewers (live behavior; contracts and upgrades). Both reviewers found no regressions.
bash check.sh: Deterministic proof PASSbash build.sh --no-openbash run-tests.sh: 42,105 passed, 0 failedcheck-source-pins.py --changed-onlyand--count-baseline(198 pins, none new),check-module-boundaries,check-telemetry-keys,check-test-shape,check-build-source-lists,concurrency-censusChecks I could not run, and why:
🤖 Generated with Claude Code