Skip to content

Fix deleted modifier-only primary shortcuts staying active#503

Open
Yaomeng1749 wants to merge 4 commits into
altic-dev:mainfrom
Yaomeng1749:codex/fix-498-primary-shortcut-reset
Open

Fix deleted modifier-only primary shortcuts staying active#503
Yaomeng1749 wants to merge 4 commits into
altic-dev:mainfrom
Yaomeng1749:codex/fix-498-primary-shortcut-reset

Conversation

@Yaomeng1749

@Yaomeng1749 Yaomeng1749 commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Fixes #498.

Clears stale Primary Dictation hotkey press state when the primary shortcut list changes. This prevents a deleted modifier-only primary shortcut from keeping a pending hold/tap path active until app restart.

Changes

  • Track removed primary shortcuts in updatePrimaryShortcuts(_:).
  • Clear/cancel matching primary dictation runtime state for removed primary shortcuts.
  • Keep event tap teardown as a force-clear path.
  • Add a regression test for deleting a modifier-only primary shortcut while its hold start is pending.

Testing

Local:

swiftformat --config .swiftformat Sources/Fluid/Services/GlobalHotkeyManager.swift Tests/FluidDictationIntegrationTests/HotkeyShortcutTests.swift
swiftformat --lint --config .swiftformat Sources/Fluid/Services/GlobalHotkeyManager.swift Tests/FluidDictationIntegrationTests/HotkeyShortcutTests.swift
git diff --check
xcrun swiftc -parse Sources/Fluid/Services/GlobalHotkeyManager.swift Tests/FluidDictationIntegrationTests/HotkeyShortcutTests.swift
swiftlint --strict --config .swiftlint.yml

GitHub Actions, same head c2caabd26d8c2a50daa6f061e78449aa233d8d5e:

Upstream Actions are awaiting maintainer approval for the public-fork workflow.

@Yaomeng1749

Yaomeng1749 commented Jul 1, 2026

Copy link
Copy Markdown
Author

Final verification for c2caabd26d8c2a50daa6f061e78449aa233d8d5e:

  • Added a regression test for deleting a modifier-only Primary Dictation shortcut while its hold start is pending.
  • Local Xcode 26.6: swiftlint --strict --config .swiftlint.yml passed with 0 violations.
  • Fork CI on the same head passed: https://github.com/Yaomeng1749/FluidVoice/actions/runs/28551228981
  • CI covered SwiftLint, dependency resolution, build, and tests.
  • Upstream Actions are still waiting for maintainer approval for the public-fork workflow.

@Yaomeng1749 Yaomeng1749 marked this pull request as ready for review July 1, 2026 21:41
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.

[BUG] Deleted modifier-only primary shortcut remains active until app restart

1 participant