feat(desktop): decouple first paint from Runtime Host readiness #5494
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 454 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.366
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5494"
general
weight: 0.35
M4n5ter
Summary
Runtime Host readiness used to be a startup precondition: boot awaited connect → handoff → managed update before creating the main window, and a separate
StartupProgressWindowcarried all progress and attention UI. A stuck handoff (thestaging→retry_requiredloop in #5476) therefore blocked the entire app behind a modal window whose only remaining action was cancel.This PR makes first paint independent of Host readiness, per the direction agreed in #5488:
main.tscreates the main window and registers all IPC first;startLocalRuntimeHostManagerstill launches immediately, but in a fire-and-forget continuation.attentionviews — the only states that need a user decision — surface inside the main window through a newruntimeHostHandoffpreload bridge andRuntimeHostHandoffOverlay. Progress views stay silent; there is no separate window.useOnboardingSnapshothydrates asynchronously behind the existing preload skeleton.cachedentries while authority is unavailable, and sends go through the durable outbox, which delivers once a ready target appears.Removals in the same change:
StartupProgressWindow+startup-presentation.ts,prefetchOnboardingSnapshot+initialOnboardingSnapshotplumbing, stale attention fields leaking intoprogresshandoff views (the view is now a discriminated union — also the source of #5476's misleadingreasondisplay), and the pre-dev.9 file-lock compatibility half-layer.Fixes #5488
Breaking change
Runtime Host builds older than dev.9 are no longer a supported update source. The legacy dir-lock / inherited-fd operator lease interop (
withLegacyFileUpdateLockLease,withRuntimeHostManagedServiceLegacyOperatorLeases, and theprocess-lifetime-lock-v1capability probe in the update path) is removed. Current process-lifetime locking, stale.supervisedmarker recovery, and the.lockdirectory wait are unchanged.Verification
npm run build:workspace-deps;npm --workspace @maka/desktop run build:mainandbuild:renderer— passnode --test --test-concurrency=4on the affected desktop suite — 117/117; onboarding snapshot suite 35/35; cli + runtime-host suites 63/63npm --workspace @maka/desktop run typecheck:stories,build-storybook,smoke:storybook— pass (380 stories / 409 theme renders, including 3 new overlay stories)npm run format,npm run lint— cleanThe surface this replaces — BEFORE rendered from
main'srenderStartupProgressHtmlwith the same attention view, AFTER is the new overlay story:Light:
!handoff light comparison
Dark:
!handoff dark comparison
AI use
Select exactly one:
Tool(s) and scope: Devin — root-cause investigation, implementation, tests, stories, verification, and this PR description.
Checklist
Does this PR entail a change in behavior?