Skip to content

perf: web dashboard period prefetch + menubar serve client - #959

Merged
iamtoruk merged 1 commit into
mainfrom
perf/web-prefetch
Aug 10, 2026
Merged

perf: web dashboard period prefetch + menubar serve client#959
iamtoruk merged 1 commit into
mainfrom
perf/web-prefetch

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

Completes the resident-serve adoption across surfaces after the desktop app (#956/#957): the web dashboard prefetches every period tab at startup and revalidates stale payloads behind the serve instead of on the click; the macOS menubar holds its own codeburn serve --stdio child through a new ServeConnection actor with the same warm-only routing, spawn fallback, death budget, and shutdown semantics as the app client. A 0.9.19 CLI has no serve command, so mixed-version installs degrade to today's spawn behavior automatically.

swift test 156/156, tsc clean both sides, verified live: both the app's and the menubar's serve children resident and answering on this machine.

Two more surfaces adopt the resident-serve pattern the desktop app got:

- Web dashboard: every period tab is prefetched sequentially right after
  startup, so the first click on 7d/30d/Month answers from the payload
  cache instead of paying a full parse; stale-while-revalidate rebuilds
  behind a served payload past 75% of the TTL so expiry never lands its
  multi-second parse on a user's click. Lifetime prefetches last.
- Menubar: ServeConnection (Swift actor) holds one codeburn serve --stdio
  child; status payload fetches route through it once warm, with the same
  contract as the app client — cold start and every failure keep the
  spawn path, three child deaths disable serve for the run, requests
  time out by killing the child, app termination shuts it down, and a
  pre-serve CLI (0.9.19) simply dies into permanent spawn fallback, so
  mixed-version installs degrade gracefully.

swift build clean, swift test 156/156, CLI tsc clean; verified live with
both the Electron app's and the menubar's serve children resident and
answering.
@iamtoruk
iamtoruk merged commit 77e809a into main Aug 10, 2026
5 checks passed
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