PTT stuck-key release: drop a hold longer than N minutes (do not break calls) #136

Closed
opened 2026-09-17 16:26:16 -04:00 by jared · 1 comment
Owner

Elbow-on-the-keyboard case: a PTT hold that never ends leaves the mic open.

Scope

  • In useCallHotkeys (both DOM and desktop-global paths): if a PTT hold exceeds N minutes (default 5, not a setting), release exactly like a keyup (pttActive=false, mute), and toast "Push to talk released after 5 min". A new keydown re-engages normally.
  • Must not touch non-PTT mode, deafen, or the mic button; must not fire while the key is genuinely held and released/re-pressed (timer resets on release). Unit-test the timer helper; manual test with the desktop global path too.
Elbow-on-the-keyboard case: a PTT hold that never ends leaves the mic open. ### Scope - In `useCallHotkeys` (both DOM and desktop-global paths): if a PTT hold exceeds N minutes (default 5, not a setting), release exactly like a keyup (`pttActive=false`, mute), and toast "Push to talk released after 5 min". A new keydown re-engages normally. - Must not touch non-PTT mode, deafen, or the mic button; must not fire while the key is genuinely held and released/re-pressed (timer resets on release). Unit-test the timer helper; manual test with the desktop global path too.
jared added this to the Features 2026-Q4 milestone 2026-09-17 16:26:16 -04:00
jared added the enhancementpriority: lowarea: calls labels 2026-09-17 16:26:16 -04:00
jared self-assigned this 2026-09-17 16:26:16 -04:00
Author
Owner

Done in f23b215e. createPttHoldWatchdog (unit-tested with fake timers) is armed on press and disarmed on release in both the DOM path and the desktop-global hotkey path; at 5 minutes (fixed, not a setting) it releases exactly like a keyup — pttActive off, mic muted — and toasts "Push to talk released after 5 minutes — press the key again to keep talking." Keydown auto-repeat no longer restarts anything; a genuine release + re-press restarts the clock; non-PTT mode, deafen and the mic button are untouched.

Verified headless with Playwright's fake clock: held → still transmitting at +4 min → released + toast at +5 min (SFU track muted) → a fresh press re-engages. The desktop-global path shares the same watchdog object, but a real Windows run is still worth a look (cinny-desktop #20 list).

Done in `f23b215e`. `createPttHoldWatchdog` (unit-tested with fake timers) is armed on press and disarmed on release in **both** the DOM path and the desktop-global hotkey path; at 5 minutes (fixed, not a setting) it releases exactly like a keyup — `pttActive` off, mic muted — and toasts "Push to talk released after 5 minutes — press the key again to keep talking." Keydown auto-repeat no longer restarts anything; a genuine release + re-press restarts the clock; non-PTT mode, deafen and the mic button are untouched. Verified headless with Playwright's fake clock: held → still transmitting at +4 min → released + toast at +5 min (SFU track `muted`) → a fresh press re-engages. The desktop-global path shares the same watchdog object, but a real Windows run is still worth a look (cinny-desktop #20 list).
jared closed this issue 2026-09-19 17:18:33 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#136