Files
open-design/apps/desktop/tests
811ad9d118 Show boot stage progress on the desktop splash screen (#4223)
* Show boot stage progress on the desktop splash screen

The splash video plays ~1.7s and then freezes on its final frame while
the packaged cold boot (daemon, web sidecar, Next.js standalone server,
web mount) can take many seconds on slow machines, reading as a hang.

Add a muted status line under the logo with continuously pulsing dots
and stage labels that advance through the real boot phases:

- Starting Open Design (baked into the splash HTML)
- Starting the local engine (daemon sidecar spawn)
- Preparing the interface (web sidecar spawn)
- Opening your workspace (hidden main window loading + mount gate)

Stage transitions follow the repo animation philosophy (140ms ease-out
exit, 200ms ease-out enter). The packaged entry forwards phases through
a new optional onPhase hook on startPackagedSidecars; the runtime
re-asserts the final stage at its reveal gate so the tools-dev splash
path is covered too. setSplashStage is safe on destroyed windows and
idempotent per label.

https://claude.ai/code/session_01MHt6dRc7GMAcu9Npo5Bgdx

* Guard splash stage updates against the page-load race

The first boot-stage update (the daemon phase) is fired from the
packaged entry immediately after the splash window is created, which
can be before the splash data-URL has finished loading and defined
window.__odSplashSetStage. The previous setSplashStage ran the update
unconditionally, so on a fast-spawning cold boot the renderer had no
setter yet and the 'Starting the local engine' label was silently
dropped — on exactly the slow-PC path this feature targets.

Track per-splash load readiness: registerSplashStageTracking arms a
did-finish-load listener before loadURL, and stage updates that arrive
before load are stashed (latest wins) and replayed once the page
reports it has loaded. Updates after load apply immediately as before.

setSplashStage / registerSplashStageTracking now take a narrow
SplashStageSurface so the replay logic is unit-testable without a live
Electron renderer; BrowserWindow satisfies it structurally.

Red spec: tests/main/splash-stage-replay.test.ts — fails when the
deferral is removed (update fires before load), green with the guard.

https://claude.ai/code/session_01MHt6dRc7GMAcu9Npo5Bgdx

* desktop(splash): granular boot stages with step counter and progress bar

The first-run cold boot on a slow machine sat on the brand splash with only
four coarse status labels and no sense of how far along it was, so the wait
read as a possible hang.

Make the boot progress finer-grained and quantified:
- Expand the splash stage set from 4 to 7, marking both the "starting X" and
  "X ready" edges of the two long native waits (local engine online, web
  interface online) plus a final "Almost ready" step, so the status visibly
  advances right after each long wait clears.
- Show a "N/total" step counter and a thin progress bar under the logo that
  fills as stages advance; the bar is monotonic so an idempotent re-asserted
  stage cannot make it jump backwards.
- Emit the daemon-ready / web-ready edges from the packaged sidecar bring-up
  via the onPhase hook so the new stages map to real boot transitions, and
  assert the final "finishing" stage once the web bundle reports it mounted.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: 박세원 <s-w.park@samsung.com>
2026-06-17 14:31:30 +08:00
..