Show a block screen when Screen Time access is revoked post-onboarding - #51
Merged
Merged
Conversation
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>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McqhmCMCcDYb9EqtBaLJuM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 —
RootViewonly ever gated onhasCompletedOnboarding(an@AppStoragebool that never reverts), soMainViewkept rendering as if everything still worked, even though rule enforcement silently no-ops without authorization.RootDestination.resolve(hasCompletedOnboarding:authorizationStatus:)decision function (OpenAppLock/Logic/RootDestination.swift) and extendsRootView'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.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).CopyKey/Copy.xcstringsentries for the new copy; a new UI-test launch flag (-screen-time-access-revoked) andScreenTimeAccessRequiredUITestssuite covering both the blocked and approved paths.AGENTS.md's "Build & test" section to allowxcodebuildon 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.mdImplementation plan:
Docs/Agents/Plans/2026-07-17-screen-time-access-required-overlay.mdBuilt via subagent-driven development: each of the 4 tasks got its own implementer + parallel opus
code-reviewer/security-reviewerpass, plus a final whole-branch opus review — all clean, no Critical/Important findings.Test plan
RootDestinationTests(6 cases across onboarding × authorization status combinations)ScreenTimeAccessRequiredUITests(revoked-post-onboarding shows the block screen and hides main-app elements; approved path shows main app and hides the block screen)🤖 Generated with Claude Code