Skip to content

fix(app): do not prompt location on HomePage open - #12190

Merged
undivisible merged 1 commit into
mainfrom
fix/android-gps-homepage-location-prompt
Aug 25, 2026
Merged

fix(app): do not prompt location on HomePage open#12190
undivisible merged 1 commit into
mainfrom
fix/android-gps-homepage-location-prompt

Conversation

@undivisible

@undivisible undivisible commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #12179 / Git-on-my-level 5411651527.

HomePage streamDeviceRecording(device==null) was still prompting for location when permission was denied. A fresh-install deny-twice could lock the user in deniedForever.

Now the no-device / HomePage path is check-only (promptIfDenied: false). Record and device start still prompt when denied.

Failure-Class: none

Test plan

  • 13 location unit tests (flutter test test/unit/conversation_location_capture_test.dart)
  • Deny location on homepage does not request permission

Review in cubic


Note

Low Risk
UX-only gating of location prompts on home entry; record/device flows keep existing prompt behavior and fail-open skip when denied.

Overview
HomePage entry no longer shows the OS location permission dialog when permission is still denied. Opening home via streamDeviceRecording(device == null) now calls conversation location capture in check-only mode (promptIfDenied: false).

ConversationLocationCapture.captureAndUpload accepts promptIfDenied (default true). If permission is denied and prompting is off, it skips requestPermission and returns without uploading. Recording and device connect still pass promptIfDenied: true so users who skipped onboarding location can be prompted at record start. deniedForever is never re-prompted on either path.

Unit and provider tests cover the homepage path, granted-permission uploads without prompts, and deniedForever on check-only.

Reviewed by Cursor Bugbot for commit aa7bce6. Configure here.

HomePage calls streamDeviceRecording with no device on every entry.
That used to prompt for location when permission was denied, so a
fresh-install deny-twice could lock the user in deniedForever.

Gate requestPermission behind promptIfDenied; the no-device path
stays check-only. Record and device start still prompt when denied.

Failure-Class: none

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa7bce6598

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

unawaited(_conversationLocationCapture.captureAndUpload());
// HomePage calls this with device == null on every entry — check-only so
// a fresh install cannot hit deniedForever before the user records.
unawaited(_conversationLocationCapture.captureAndUpload(promptIfDenied: device != null));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Decouple homepage entry from device presence

When HomePage opens while DeviceProvider.connectedDevice is non-null (app/lib/pages/home/page.dart:502 passes that value), this expression evaluates to true and captureAndUpload requests location permission when it is denied. The flow this fix targets therefore still prompts connected-wearable users, and repeated denials can still move them to deniedForever; pass explicit homepage/check-only intent instead of inferring invocation purpose from device != null.

AGENTS.md reference: AGENTS.md:L47-L47

Useful? React with 👍 / 👎.

@undivisible
undivisible merged commit 133a373 into main Aug 25, 2026
34 of 35 checks passed
@undivisible
undivisible deleted the fix/android-gps-homepage-location-prompt branch August 25, 2026 15:23
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