Skip to content

Show a block screen when Screen Time access is revoked post-onboarding - #51

Merged
brendan-ch merged 8 commits into
mainfrom
feat/screen-time-permission-revoked-overlay
Jul 17, 2026
Merged

Show a block screen when Screen Time access is revoked post-onboarding#51
brendan-ch merged 8 commits into
mainfrom
feat/screen-time-permission-revoked-overlay

Conversation

@brendan-ch

Copy link
Copy Markdown
Owner

Summary

Today, if a user completes onboarding (granting Screen Time access) and later revokes it from the system Settings app, the app does nothing to reflect it — RootView only ever gated on hasCompletedOnboarding (an @AppStorage bool that never reverts), so MainView kept rendering as if everything still worked, even though rule enforcement silently no-ops without authorization.

  • Adds a new pure RootDestination.resolve(hasCompletedOnboarding:authorizationStatus:) decision function (OpenAppLock/Logic/RootDestination.swift) and extends RootView's gate to a 3-way switch (onboarding / screen-time-access-required / main), reusing the app's existing scenePhase-driven authorization refresh — no new detection plumbing needed.
  • Adds ScreenTimeAccessRequiredView: a full-screen block explaining why the app can't function without Screen Time access, with a single "Open Settings" button (no in-app retry — Settings is the only real path back).
  • New CopyKey/Copy.xcstrings entries for the new copy; a new UI-test launch flag (-screen-time-access-revoked) and ScreenTimeAccessRequiredUITests suite covering both the blocked and approved paths.
  • Unrelated-but-bundled: updates AGENTS.md's "Build & test" section to allow xcodebuild on the command line as a fallback when the Xcode MCP isn't active in a session (it's session-scoped and unreachable from subagents), with the exact scheme/destination pattern and a pointer to the global headless/collision-avoidance simulator rule.

Design spec: Docs/Agents/Specs/SCREEN_TIME_ACCESS_REQUIRED_OVERLAY.md
Implementation plan: Docs/Agents/Plans/2026-07-17-screen-time-access-required-overlay.md

Built via subagent-driven development: each of the 4 tasks got its own implementer + parallel opus code-reviewer/security-reviewer pass, plus a final whole-branch opus review — all clean, no Critical/Important findings.

Test plan

  • Unit tests: RootDestinationTests (6 cases across onboarding × authorization status combinations)
  • UI tests: ScreenTimeAccessRequiredUITests (revoked-post-onboarding shows the block screen and hides main-app elements; approved path shows main app and hides the block screen)
  • Full suite: 402 tests, 0 failures
  • Manual on-device/simulator validation: launch with onboarding completed, revoke Screen Time access via Settings, foreground the app, confirm the block screen appears and "Open Settings" opens the correct page — this needs an interactive simulator/device session and is left for @brendan-ch to confirm

🤖 Generated with Claude Code

brendan-ch and others added 8 commits July 17, 2026 11:54
Scopes the fix for the app doing nothing when Screen Time permission is
revoked post-onboarding: gate RootView on a new pure RootDestination
resolver and show a full-screen block with a link to Settings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The Xcode MCP is session-scoped and unreachable from Agent-tool subagents,
which made it a bottleneck for subagent-driven implementation. Document
xcodebuild as an accepted command-line fallback (with the exact scheme/
destination pattern) and point at the global mobile-simulators rule for
headless, collision-free simulator selection. Also adds the implementation
plan for the screen-time access-required overlay.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… auth status

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CopyCatalogTests.everyValueUsesSmartTypography() caught a straight
apostrophe in the new screenTimeAccess.description string, introduced in
the plan's draft copy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@brendan-ch brendan-ch self-assigned this Jul 17, 2026
@brendan-ch
brendan-ch marked this pull request as ready for review July 17, 2026 18:22
@brendan-ch
brendan-ch merged commit 4c30c11 into main Jul 17, 2026
0 of 2 checks passed
@brendan-ch
brendan-ch deleted the feat/screen-time-permission-revoked-overlay branch July 17, 2026 18:22
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