feat(mobile): gate app launch with native unlock - #5721
Merged
iscekic merged 10 commits intoSep 1, 2026
Conversation
This was referenced Aug 29, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Previous Review Summaries (4 snapshots, latest commit 07105ed)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 07105ed)Status: No Issues Found | Recommendation: Merge Files Reviewed (86 files)
Previous review (commit c430162)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (11 files)
Fix these issues in Kilo Cloud Previous review (commit d6e8da1)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (14 files)
Fix these issues in Kilo Cloud Previous review (commit fe64126)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (14 files)
Reviewed by grok-4.6 · Input: 214.9K · Output: 16.8K · Cached: 876.7K Review guidance: REVIEW.md from base branch |
eshurakov
approved these changes
Sep 1, 2026
This was referenced Sep 14, 2026
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
appUnlockScreenLayoutnow guards five authenticated Stacks, so nested screens and native sheets share the same unlock state. Organization and Security Agent screens retain their privacy cover, while navigation and shared draft providers stay mounted. Route registrations, sheet detents, and modal options remain unchanged.Files
apps/mobile/src/app/(app)/_layout.tsx— Modified; +2/-0 lines. Applies the gate to authenticated screens, form sheets, and modals without moving connection, synchronization, cache, or chat providers.apps/mobile/src/app/(app)/(tabs)/(1_kiloclaw)/_layout.tsx— Modified; +2/-1 lines. Gates the KiloClaw index and chat/instance-picker sheet.apps/mobile/src/app/(app)/(tabs)/(3_profile)/organization/_layout.tsx— Modified; +5/-1 lines. Composes the unlock gate around the privacy cover for organization screens and invite-member, member-limit, and low-balance-alert sheets.apps/mobile/src/app/(app)/(tabs)/(3_profile)/security-agent/[scope]/_layout.tsx— Modified; +5/-1 lines. Composes the unlock gate around the privacy cover for Security Agent screens and dismiss/filter sheets. The command observer stays outside the wrapper.apps/mobile/src/app/(app)/pr-review/[owner]/[repo]/[number]/_layout.tsx— Modified; +2/-1 lines. Gates comment-composer, review-submit, merge, and file-navigator sheets while retaining the shared draft provider and per-user draft identity.AppUnlockScenehides scenes in every state exceptunlocked, blocks touch, and excludes hidden descendants from accessibility without unmounting their drafts. Its unlocked wrapper stays layout-only to preserve native sheet headers and scroll views as siblings at indices 0 and 1.AppUnlockFeedbacksupplies inline messages, whileAppUnlockAnnouncementscentralizes outcome announcements so hidden scenes do not request iOS speech.Files
apps/mobile/src/components/app-unlock-screen.tsx— Added; +135/-0 lines. Adds a scrollable accessibility-modal overlay with 24-point safe-area padding. Preference loading shows a labeled busy progressbar and skeleton; other hidden states show Retry with the shared busy state. Mapssetup-requiredtoagentChat.modelSelector.unavailableandbootstrap.couldNotLoadPrivacyDescription. Usescommon.couldNotSaveSettingforsave-failedandcommon.somethingWentWrongforfailed,lockout, or preference-read errors; other outcomes show no message. Preference-read errors override outcome announcements; shared announcements also cover setting failures while the setting screen stays hidden. Per-scene status text uses a polite Android live region.Shared
languageReadynow reachesAppRootProvidersandRootLayoutNav;AppUnlockProvider.promptMessageacceptsstring | nullto wait for translated prompts.AppUnlockContextValue.busyincludes a null prompt, andcoldStartPendingsurvives blocked attempts so language readiness can trigger a guarded retry. String callers remain compatible, and missing preferences still mean disabled; the storage format, five-minute background threshold, and native passcode fallback stay unchanged.Files
apps/mobile/src/app/_layout.tsx— Modified; +13/-7 lines. Moves language readiness into RootLayout and supplies RootLayoutNav with the flag and setter. Retains the English fallback, first-paint loading gate, and right-to-left reload handling.apps/mobile/src/components/app-root-providers.tsx— Modified; +51/-36 lines. Requires languageReady and mounts one AppUnlockProvider beneath AuthProvider for children, organization state, action sheets, and overlays. Supplies the translated unlock label or null, and mounts shared announcements only after language readiness. Children remain mounted while language preparation runs.apps/mobile/src/lib/app-unlock-context.tsx— Modified; +13/-7 lines. Captures the prompt for each authentication attempt and defers attempts while the prompt is null. Clears coldStartPending only after authentication guards pass; preference restoration and active returns retain pending work until then. Retries pending cold starts when the prompt changes, without bypassing mounted, active, idle, or unlock-state guards. Includes prompt readiness in busy state and context memoization.Preferences connects an unlock switch to
useAppUnlock.enabledandsetEnabled;PreferenceRowProps.busyadds a spinner and busy accessibility state.preferences.biometricUnlockandpreferences.biometricUnlockSubtitleexplain launch protection, the five-minute return rule, device setup, and passcode fallback. The switch disables changes while busy or outsideunlocked, and inlineAppUnlockFeedbackexcludes ordinary unlock outcomes; existing rows default tobusy=false.Files
apps/mobile/src/components/preferences-screen.tsx— Modified; +25/-3 lines. Adds the shield-marked unlock row before existing preferences. Busy rows replace their icon with ActivityIndicator and expose disabled/busy accessibility states. Only setting outcomes reach inline feedback.apps/mobile/src/i18n/locales/en.json— Modified; +2/-0 lines. Adds the authored “Unlock with biometrics” label and subtitle. The subtitle explains launch and background protection, device security setup, and passcode fallback; existing English text stays unchanged.Tests: 3 files changed, with 773 additions and 18 removals. Added
apps/mobile/src/components/app-unlock-screen.mounted.test.tsx(+312/-0) andapps/mobile/src/components/app-unlock-screen.test-helpers.tsx(+311/-0); modifiedapps/mobile/src/components/preferences-screen.mounted.test.tsx(+150/-18).Generated: 86 translated catalogs updated in
apps/mobile/src/i18n/locales/: 86 non-English locales, two new keys each, and 172 added entries (+258/-86 lines).Verification
Local end-to-end verification on an iOS simulator, 2026-09-01. Seven of eleven checks passed. Four have partial coverage.
This section covers the stack's three PRs together: #5715, #5719, and #5721.
No product bug was found. No product source changed. The worktree stayed clean.
Test-harness limits, not defects
simctl biometric. Native simulator enrollment, match, and failure notifications were used instead.Setup
mobile-context-unlock-a61f-s3, simulator iOS 26.5.xcrun simctl io <udid> screenshot. Full report and images:/Users/igor/Projects/.scratch/local-e2e-context/.