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
* fix: sync onboarding hotkey mode immediately
The setup wizard saved activation mode changes through @AppStorage, but the global hotkey listener could already be running with the default push-to-talk configuration. That left first-time users in a confusing state where double-tap was saved in preferences while the live event tap still behaved as press-to-talk until the app restarted.
Add AppState.syncHotKeyConfiguration() as the shared path for applying persisted hotkey settings to the active HotKeyManager. Onboarding now refreshes the live listener when activation mode, hotkey, or double-tap threshold changes, and completeOnboarding() applies the current configuration again before marking setup complete. Settings now uses the same sync path, including max recording duration so the safety timeout remains aligned.
Tests extend the hotkey mock to record configuration updates and cover both direct sync and onboarding completion sync. Local verification: swift test was attempted; the sandboxed run could not write SwiftPM caches, the escalated debug run was blocked by the existing SwiftUI #Preview macro/PreviewsMacros command-line toolchain issue, and the release test run was blocked by local XCTest availability. Manual app testing confirmed the setup wizard hotkey mode issue is fixed.
* fix: address hotkey sync review feedback
The PR review called out a few places where the hotkey listener sync path could drift or create avoidable noise. This follow-up keeps the live listener updates focused while preserving the immediate onboarding behavior the original fix introduced.
Centralize the hotkey safety timeout calculation so startup, permission-grant startup, and explicit syncs all use the same max-recording-duration slack. Demote the sync log to debug, sync double-tap threshold sliders only when editing commits, and document that onboarding's live onChange handlers cover only the fields shown in that step.
Also reset the hotkey key-state when onboarding completes, and extend AppState tests to cover the default sync tuple plus the completion reset. Caveat: the first sandboxed swift test run could not write SwiftPM/Clang caches; the escalated run completed successfully.
Verification: swift test (171 tests, 0 failures).
* fix: guard onboarding hotkey reset while recording
Completing onboarding syncs the latest hotkey configuration and then clears stale key state, but resetting key state while a recording is active can cancel the push-to-talk safety timer. That creates a narrow path where a held-key release could be ignored and the safety backstop would be unavailable until the audio engine max-duration callback fires.
Keep the configuration sync on completion, but only reset hotkey key state when AppState is not recording. Add onboarding coverage that locks in the active-recording behavior so the hotkey reset path cannot regress silently.
Verification: swift test --filter AppStateOnboardingTests; swift test.
---------
Co-authored-by: d1scolor <d1scolor@users.noreply.github.com>
0 commit comments