Skip to content

Re-capture boot timeline after the stall settles (0253) - #353

Merged
crs48 merged 2 commits into
mainfrom
claude/0253-settled-boot-recapture
Jun 30, 2026
Merged

Re-capture boot timeline after the stall settles (0253)#353
crs48 merged 2 commits into
mainfrom
claude/0253-settled-boot-recapture

Conversation

@crs48

@crs48 crs48 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Why

The user's localStorage['xnet:boot:last'] from PR #352 proved boot is fast (sqlite:open 292ms, identity 17ms, store 23ms, hub:connected at 635ms) — but all three recorded boots were 0.6–2.2s, i.e. none was a stalled boot. The persist fires at hub:connected (~0.6s), before the ~18s stall, which lives in the post-connect landing-read/first-paint tail. On a doc route (the user opens straight to a document, not the home route) no later phase marks, so a stalled boot still left a fast-looking snapshot.

What

persistBootTimeline() self-schedules one delayed re-capture (reason:'settled', +20s). A synchronous main-thread block only delays the timer; it can't cancel it — so the furthest-reached timeline always lands in localStorage once the stall clears.

After a stall, JSON.parse(localStorage.getItem('xnet:boot:last')) will now show the settled timeline. Either a segment reads ~18000 (names it), or every segment is small — which itself confirms the stall is in the uninstrumented post-ready data path, not boot/SQLite.

Tests

apps/web boot-timeline 17/17 (new fake-timer test for the settled re-capture); typecheck + lint clean. apps/web only → no changeset.

🤖 Generated with Claude Code

xNet Test and others added 2 commits June 30, 2026 13:11
The persisted boot timeline fired at hub:connected (~0.6s) — BEFORE the ~18s
stall, which lives in the post-connect landing-read/first-paint tail. On a doc
route no later phase marks, so a stalled boot still left a fast-looking snapshot
(the 3 captured boots were all 0.6-2.2s; the stalled one was never recorded).

persistBootTimeline() now self-schedules ONE delayed re-capture (reason
'settled', +20s) so the furthest-reached timeline lands in localStorage once the
stall clears — a synchronous main-thread block only delays the timer, it cannot
cancel it. After a stall: localStorage['xnet:boot:last'] now shows the settled
timeline naming the 18s segment (or all-small, which itself confirms the stall
is in the uninstrumented post-ready data path, not boot/SQLite).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: xNet Test <test@xnet.dev>
@crs48
crs48 temporarily deployed to pr-353 June 30, 2026 20:12 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

No UI changes detected in this PR.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #353.

github-actions Bot added a commit that referenced this pull request Jun 30, 2026
@crs48
crs48 merged commit 3a4e914 into main Jun 30, 2026
17 checks passed
@crs48
crs48 deleted the claude/0253-settled-boot-recapture branch June 30, 2026 20:29
github-actions Bot added a commit that referenced this pull request Jun 30, 2026
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