Skip to content

perf(boot): reveal Home sooner and replay launch reads natively - #346

Merged
glpecile merged 4 commits into
mainfrom
perf/instant-boot
Oct 27, 2026
Merged

glpecile merged 4 commits into
mainfrom
perf/instant-boot

Conversation

@glpecile

@glpecile glpecile commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Cold start held the splash while hidden tabs rendered and Effect's barrel loaded. This reveals Home first, imports Effect modules directly, and replays eligible provider reads natively before JavaScript starts.

  • Defer Diary, Settings, Search, and the closed Home actions sheet until the splash reveals. A focused tab renders immediately; web prerenders all tabs.
  • Start the native splash fade in the app's mounting commit. Complete the reveal even if the fade is cancelled, and mount notification tap navigation beside the navigator.
  • Record up to 20 successful launch reads during the first 10 seconds and register them in Nitro Fetch's encrypted startup queue. Only allowlisted provider reads replay, once per request and within 60 seconds. Simkl all-items remains gated on activities.
  • Stop replay after a mutation or credential change. Credential cleanup also handles late request responses and native registrations already in flight, so disconnected credentials cannot be registered again.
  • Enforce Effect subpath imports with lint.

Validation: 1,557 tests pass, lint and typecheck pass, git diff --check passes, and the web static export succeeds. The credential-race regression failed before the repair and passes afterward, using Nitro Fetch's real JavaScript registration with its native storage boundary mocked. Delegated correctness and complexity reviews approved; UI and animation reviews approved.

Current iPhone 17 Pro simulator QA used Metro rooted in this worktree. Cold launch reached Home; Diary, Settings, and Search rendered after tab presses. A read through the shared HTTP wrapper returned status 200 with nitroPrefetched: true after another cold launch. The debugger recorded no console warnings or errors during the smoke check.

Earlier development measurements reported splash handoff falling from about 4.0 seconds to 1.2 seconds. Those timings were not remeasured during this shipping review.

Limits: Android, interactive web, physical hardware, actual notification taps, and release-build timing were not tested in this review. Fresh query caches can leave startup replay unused; native background launches also fire the registered reads.

JavaScript-only changes hot reload. No bun ios:clean or bun android:clean is needed.

glpecile and others added 3 commits October 27, 2026 19:43
The effect barrel evaluated every Effect module at launch (~280 ms in a
dev build). Subpath imports load only the modules in use, and a lint
rule rejects the bare barrel import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NativeTabs renders every tab with Home, which held the boot splash
about 3 s in dev builds. Tabs other than Home now wait for focus or the
reveal, and Home's closed actions sheet waits for the reveal too. The
splash overlay mounts while fonts load and hands off in the commit that
mounts the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reads from the first seconds of a launch are registered with Nitro
Fetch's prefetchOnAppStart, keyed by a hash of the whole request. The
next cold start fires them before JS loads, and each session's first
identical read claims the response.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
shinobu 399eabb Oct 27 2026, 11:44 PM

@glpecile

Copy link
Copy Markdown
Owner Author

Review findings from GPT-6, posted on behalf of Gian.

The correctness review found that a successful old-token read could finish after disconnect and register the removed credential again. Fixed by ending replay on credential changes, refusing late recordings, and removing registrations that finish after replay ends. The focused regression failed before the fix and now passes. The correctness reviewer approved the updated full diff; complexity, UI, and animation reviews found no actionable issues.

The final scope also includes the existing local follow-ups for mutation invalidation, cancelled splash completion, and notification navigation mounting beside the navigator. Validation passed: 1,557 tests, lint, typecheck, whitespace check, and web static export. iPhone simulator cold launch and all tab screens passed; a shared-wrapper read returned HTTP 200 with nitroPrefetched: true on a later cold launch.

Android, interactive web, physical devices, actual notification taps, and release timing remain unverified. Changes are JavaScript-only and hot reload.

@glpecile
glpecile merged commit 326f61f into main Oct 27, 2026
5 checks passed
@glpecile
glpecile deleted the perf/instant-boot branch October 27, 2026 23:44
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