Skip to content

Skip notification permission prompt for screenshot runs#13

Merged
c0d3rb4b4 merged 1 commit into
mainfrom
codex/add-code-to-close-notification-popup
Feb 24, 2026
Merged

Skip notification permission prompt for screenshot runs#13
c0d3rb4b4 merged 1 commit into
mainfrom
codex/add-code-to-close-notification-popup

Conversation

@c0d3rb4b4
Copy link
Copy Markdown
Owner

Motivation

  • Screenshot and automated store-capture runs can be blocked by the iOS notification permission modal, so the permission prompt should be avoidable in non-interactive runs.

Description

  • Add an opt-in env flag EXPO_PUBLIC_SKIP_NOTIFICATION_PERMISSION_PROMPT and a helper to read it from process.env in apps/mobile/src/utils/env.ts.
  • Wire apps/mobile/src/services/notifications.ts to expose shouldSkipNotificationPermissionPrompt() and return early from ensureNotificationPermissionAsync() when the flag is enabled so the app does not request permissions during runs that set the flag.
  • Add a focused unit test apps/mobile/tests/notifications-permission.test.ts covering envFlagEnabled true-like and false-like values.

Testing

  • Ran pnpm -C apps/mobile test notifications-permission, and the tests passed (2 tests, 2 passed).
  • Ran pnpm -C apps/mobile lint, and lint completed with no issues.
  • All changes were committed and pushed in a single PR; manual verification instructions are included in the PR description for enabling EXPO_PUBLIC_SKIP_NOTIFICATION_PERMISSION_PROMPT=true during screenshot runs.

Codex Task

Copy link
Copy Markdown

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

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: 01a022813a

ℹ️ 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".

}

export function readEnvFlag(name: string) {
return envFlagEnabled(process.env[name]);
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 Read Expo public env var with static property access

readEnvFlag uses process.env[name], but shouldSkipNotificationPermissionPrompt depends on this value to bypass requestPermissionsAsync; in Expo bundles, EXPO_PUBLIC_* values are only injected for direct/static process.env.EXPO_PUBLIC_... accesses, so this computed lookup resolves to undefined at runtime and the skip flag never takes effect during screenshot automation.

Useful? React with 👍 / 👎.

@c0d3rb4b4 c0d3rb4b4 merged commit 98021c9 into main Feb 24, 2026
1 check passed
@c0d3rb4b4 c0d3rb4b4 deleted the codex/add-code-to-close-notification-popup branch February 26, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant