Skip to content

feat: keep screen awake on mobile devices during active calls - #722

Merged
birme merged 1 commit into
Eyevinn:mainfrom
k-ross:feat/screen-wake-lock
Oct 5, 2026
Merged

birme merged 1 commit into
Eyevinn:mainfrom
k-ross:feat/screen-wake-lock

Conversation

@k-ross

@k-ross k-ross commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Request a screen wake lock while the user is in at least one call so mobile devices don't sleep and drop the call. The browser releases the lock when the page is hidden, so it is re-acquired when the page becomes visible again. Browsers without the Wake Lock API are unaffected.

Request a screen wake lock while the user is in at least one call so mobile
devices don't sleep and drop the call. The browser releases the lock when the
page is hidden, so it is re-acquired when the page becomes visible again.
Browsers without the Wake Lock API are unaffected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@birme birme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — reviewed as part of daily-backlog-pr Phase 3.5 orphan-PR housekeeping (full code-reviewer pass on a clean clone; npm ci/lint/typecheck/test all green, 327 tests incl. 5 new wake-lock tests).

Correct Wake Lock API usage, graceful feature-detection, cleanup on unmount, re-acquire on visibilitychange, and a StrictMode-safe cancelled guard. No blocking issues.

One non-blocking note for a follow-up (not gating this merge):

  • src/hooks/use-wake-lock.ts:16 — under two visibilitychange events firing before the first request("screen") resolves, an earlier sentinel could leak (only the last is stored). Normal visible/hidden transitions fire once each, so impact is low; an acquiring boolean before the await would close it. A test for the request-rejects catch branch would round out error-path coverage.

@birme
birme merged commit aa64741 into Eyevinn:main Oct 5, 2026
6 checks passed
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.

2 participants