Re-capture boot timeline after the stall settles (0253) - #353
Merged
Conversation
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>
Contributor
🖼️ UI changes in this PRNo UI changes detected in this PR. |
Contributor
|
Preview removed for PR #353. |
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.
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 athub: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 inlocalStorageonce 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