GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(mobile): keep the screen awake while dictating by cole-robertson · Pull Request #11902 · pingdotgg/t3code

Conversation

@cole-robertson

@cole-robertson cole-robertson commented Sep 15, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

What Changed

Hold an expo-keep-awake lock while voice input is preparing, recording, or transcribing, and release it when the controller returns to idle or error. One effect in useVoiceInputController, keyed on the existing voiceInputBlocksSubmission state, plus the expo-keep-awake dependency in apps/mobile.

Why

Starting a dictation and then holding the phone without touching the screen lets iOS auto-lock fire. Locking backgrounds the app, the controller cancels preparation, and the take is discarded. In Low Power Mode the lock timer drops to 30 seconds, which is well inside the recording limit, so this happens on most longer voice notes.

expo-keep-awake only disables the idle timer while the lock is held. It does not add a background mode or change audio session behavior, so pressing the side button still locks the phone as before. This is intentionally narrower than #10140, which keeps the recording alive across backgrounding.

Validation: mobile tsc --noEmit, vp fmt --check, the voice-input test files, and vp lint on the changed file (warning count unchanged from main). I have not run this on a device, so the before/after video is missing. Happy to add one if a maintainer wants it before review.

UI Changes

None. No visible controls change.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (not applicable)
  • I included a video for animation/interaction changes (not applicable)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • The screen now stays awake while a voice recording is in progress, helping prevent auto-lock from interrupting an active recording.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cole-robertson @claude
fix(mobile): keep the screen awake while dictating
c313a0c
Auto-lock backgrounds the app and discards an in-progress recording. Low Power
Mode shortens the lock timer to 30 seconds, so longer takes are lost. Hold an
expo-keep-awake lock while voice input is preparing, recording, or transcribing.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 15, 2026
macroscopeapp[bot]
macroscopeapp Bot reviewed Sep 15, 2026
View reviewed changes
Comment thread apps/mobile/src/features/voice-input/useVoiceInputController.ts Outdated
// Keep-awake is best effort. Recording proceeds without it.
});
return () => {
void deactivateKeepAwake(VOICE_KEEP_AWAKE_TAG);

@macroscopeapp macroscopeapp Bot Sep 15, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟡 Medium voice-input/useVoiceInputController.ts:170

The cleanup produces an unhandled promise rejection when deactivateKeepAwake rejects on Android after the original Activity is dead or deactivated. Handle the rejection here so focus or unmount cleanup remains best-effort.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/features/voice-input/useVoiceInputController.ts around line 170:

The cleanup produces an unhandled promise rejection when `deactivateKeepAwake` rejects on Android after the original Activity is dead or deactivated. Handle the rejection here so focus or unmount cleanup remains best-effort.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cole-robertson cole-robertson Sep 15, 2026

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in the follow-up commit: the release now swallows the rejection the same way activation does.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction

@macroscopeapp macroscopeapp Bot Sep 15, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sorry, I'm unable to act on this request because you do not have permissions within this repository.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@macroscopeapp

macroscopeapp Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — This is a focused mobile bug fix that adds a keep-awake dependency and scopes the lock to the existing voice-input busy states, with no schema, security, billing, deployment, or static-analysis changes. An unresolved Medium-severity cleanup finding remains noted for the potential rejected deactivation promise.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cole-robertson @claude
fix(mobile): swallow keep-awake release errors
ea2d37d
deactivateKeepAwake rejects on Android once the Activity is gone, which turned
focus and unmount cleanup into an unhandled rejection.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: bf12fb33-dc00-40d8-8c3b-438d1e9845e3

📥 Commits

Reviewing files that changed from the base of the PR and between c313a0c and bc2c954.

📒 Files selected for processing (1)
  • apps/mobile/src/features/voice-input/useVoiceInputController.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The mobile app adds expo-keep-awake. The voice input controller activates keep-awake while recording is busy and deactivates it during cleanup. The controller reuses the computed busy state in its return value.

Changes

Voice input keep-awake

Layer / File(s) Summary
Keep-awake lifecycle for voice input
apps/mobile/package.json, apps/mobile/src/features/voice-input/useVoiceInputController.ts
The mobile app adds expo-keep-awake. The controller computes isBusy, activates keep-awake with the voice-input tag while busy, deactivates it during cleanup, handles rejected keep-awake calls, and returns the computed value.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to bc2c9

The keep-awake lifecycle change has no confirmed current-head issue requiring changes before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: keeping the mobile screen awake during dictation.
Description check ✅ Passed The description includes the required What Changed, Why, UI Changes, and Checklist sections. It explains the implementation, scope, validation, and why screenshots and video do not apply.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cole-robertson @claude
fix(mobile): explain keep-awake catches inline
bc2c954
Co-Authored-By: Claude Fable 5.1 <[email protected]>
@juliusmarminge

juliusmarminge commented Sep 17, 2026

Copy link
Copy Markdown
Member

Superseded by #12227 (merged to main) — same mobile keep-awake-during-dictation fix. Closing this PR as superseded.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge

juliusmarminge commented Sep 17, 2026

Copy link
Copy Markdown
Member

Closing as superseded by #12227.

cole-robertson reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@cole-robertson @juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.