Repository navigation
test(desktop): prove the PTT reveal press starts its turn - #12653
Merged
Merged
Conversation
…g dropped
Replaces a tautological policy (an enum whose `startsTurn` was hard-coded true, so
no test could fail) with a seam both shipping PTT entry points execute:
startPress(barVisible:reveal:start:) — reveals when hidden, then always starts
handleKeyShortcutDown passes start: { handleShortcutDown() }; the modifier
double-tap lock passes start: { enterLockedListening() }. The tests inject both
closures and assert the recorded order, so they fail if either handler returns
before its start effect or orders start before reveal:
hidden bar press -> [reveal, start]
visible bar press -> [start]
hidden bar double tap -> [reveal, enterLockedListening]
Failure-Class: none
kodjima33
added a commit
that referenced
this pull request
Sep 3, 2026
…12657) Follow-up to #12646/#12653. The reveal-policy enum had been inserted between `ModifierOnlyPTTActivationGate`'s documentation and the struct itself, so the gate's docs read as the policy's. Each type now carries its own comment. No behaviour change. `swift test --filter PushToTalkShortcutActivationTests` — 11 tests, 0 failures. Failure-Class: none
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.
Follow-up to #12646. Replaces a tautological policy (
startsTurnwas hard-codedtrue) with a seam both shipping PTT entry points run through, and asserts the reveal-then-start ordering that the fix depends on.These fail against the pre-fix code, where the handler returned before
handleShortcutDown().Verification:
swift test --filter PushToTalkShortcutActivationTests— 11 tests, 0 failures.Failure-Class: none