Skip to content

test(desktop): prove the PTT reveal press starts its turn - #12653

Merged
kodjima33 merged 1 commit into
mainfrom
kodjima33/ptt-second-monitor
Sep 3, 2026
Merged

kodjima33 merged 1 commit into
mainfrom
kodjima33/ptt-second-monitor

Conversation

@kodjima33

@kodjima33 kodjima33 commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #12646. Replaces a tautological policy (startsTurn was hard-coded true) with a seam both shipping PTT entry points run through, and asserts the reveal-then-start ordering that the fix depends on.

hidden bar press      -> [reveal, start]
visible bar press     -> [start]
hidden bar double tap -> [reveal, enterLockedListening]

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

Review in cubic

…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
kodjima33 merged commit b4297d7 into main Sep 3, 2026
@kodjima33
kodjima33 deleted the kodjima33/ptt-second-monitor branch September 3, 2026 05:06
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
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.

1 participant