Gateless launch S1: async engine check, rail pill, auto-fire — the full flip #151

Closed
opened 2026-11-03 15:52:14 +01:00 by AlexKucera · 0 comments
Owner

Build ticket for the gateless-launch flip — one slice, the whole interlocking change. Decisions: map #148 (esp. #150's resolution); UX contract: #149's resolution comment (variant A).

Context

Every launch opens straight into the workspace. The engine check (hermes acp --check) runs async at app start; provisioning (×3 profiles) and the daily backup auto-fire the moment it passes. Engine state stays visible without ever interrupting: a rail-bottom pill (only while checking or failed) plus mentor-pane header states. The blocking gate sheet, the placeholder logo screen, and the ProvisioningFailureCard sheet all die.

Acceptance criteria

Machinery

  • AppGateState.startLaunchCheck(): wires gateModel.onPass (provisioning runPass(hermesBinary:) then backup.runPass(), the exact chain from today's ContentView.onEnginePass) and awaits beginAutomaticCheck(). Called from ContentView.task. No-ops under hosted tests (XCTestConfigurationFilePath — the panes' guard pattern) and on repeat calls (hasStarted preserves #41's one-check-per-launch, first-window-only rule).
  • EngineGateModel and its phase machine stay as-is — the pill's state source (checking → pulse, fail → orange, pass/idle → hidden).
  • ContentView renders WorkspaceView unconditionally. The posts scan starts at first frame, concurrent with the engine check — nothing library-side waits on the gate. Placeholder logo, gate sheet, failurePresented binding, and both sheet modifiers die.
  • AppGateState: gateRaised and gateDismissed deleted.
  • state.json semantics unchanged (wholesale replace per completed check, Re-check included; About keeps reading it).

Pill + card (geometry and states per #149's resolution — the binding contract)

  • 44×44 rail slot above Archive in the rail's bottom group. Checking: 8pt pulsing accent dot, no text. Failed: exclamationmark.triangle.fill on accent-12% wash. Healthy: nothing renders, slot collapses, rail spacing closes.
  • Fail auto-expands the anchored card: 340pt wide, bottom-leading at x = railWidth + 12, bottom 14, surface bg, accent-0.5 border, radius 12, shadow; floats, never blocks, never pushes layout. Chevron collapses; slot click re-opens.
  • Engine-fail card content = #40 copy with the gateless subtitle: title "Museion needs its engine"; subtitle "The Hermes engine wasn't found or didn't answer. Passes and Sessions need it — the editor keeps working."; the two install steps (curl command + Copy, "Come back here and click Re-check."); Installation guide link; Re-check (accent, disabled while checking, label "Checking…"); Technical details disclosure (stderr excerpt + "Probed: <path>").
  • Provisioning failure rides the same card: title "Setup failed", phase rawValue + failing profile name mono, body "Museion couldn't finish setting up the writing profiles. Nothing is lost — the setup is safe to run again.", Retry inline (re-runs provisioning), Technical details. ProvisioningFailureCard deleted.

Mentor pane

  • Header mono-10 states beside "Mentor Session": "checking the engine…" muted (mini spinner) / "engine missing" orange with help / "setup failed" orange / base version hermes <base> once ready (base, not the gate's derived version). Session chip renders only once ready; status text wins layout priority.
  • binaryPath seeding keyed on nil→value arrival (.task(id:) or equivalent) so panes spawn the engine the moment the check lands.

Records

  • PRD G1 line amended per #150's resolution (async check every launch, nothing blocks, pill surfaces failure).
  • DOX pass: Museion/AGENTS.md engine-gate section rewritten for the gateless posture, CHANGELOG entry, devlog.

Tests

  • EngineGateTests probe/model tests stay untouched and green (they construct models directly).
  • New: startLaunchCheck pins (auto-fire chain fires per passing check, hosted-test no-op, repeat no-op) and pill visibility mapping (idle/pass → hidden, checking → pulse, fail → orange + expanded).

References

  • Decisions: #148 (map), #150 (architecture resolution), #149 (UX verdict — contract facts)
  • Supersedes the blocking-sheet half of #38's variant A (its no-silent-degradation AC survives, carried by the pill)
  • Preserves #41's sequencing rules (async check, once per app-launch, first window only) without the sheet
  • Closes #139 when landed

[Generated by AI]

Build ticket for the gateless-launch flip — one slice, the whole interlocking change. Decisions: map #148 (esp. #150's resolution); UX contract: #149's resolution comment (variant A). ## Context Every launch opens straight into the workspace. The engine check (`hermes acp --check`) runs async at app start; provisioning (×3 profiles) and the daily backup auto-fire the moment it passes. Engine state stays visible without ever interrupting: a rail-bottom pill (only while checking or failed) plus mentor-pane header states. The blocking gate sheet, the placeholder logo screen, and the `ProvisioningFailureCard` sheet all die. ## Acceptance criteria **Machinery** - `AppGateState.startLaunchCheck()`: wires `gateModel.onPass` (provisioning `runPass(hermesBinary:)` then `backup.runPass()`, the exact chain from today's `ContentView.onEnginePass`) and awaits `beginAutomaticCheck()`. Called from `ContentView.task`. No-ops under hosted tests (`XCTestConfigurationFilePath` — the panes' guard pattern) and on repeat calls (`hasStarted` preserves #41's one-check-per-launch, first-window-only rule). - `EngineGateModel` and its phase machine stay as-is — the pill's state source (checking → pulse, fail → orange, pass/idle → hidden). - `ContentView` renders `WorkspaceView` unconditionally. The posts scan starts at first frame, concurrent with the engine check — nothing library-side waits on the gate. Placeholder logo, gate sheet, `failurePresented` binding, and both sheet modifiers die. - `AppGateState`: `gateRaised` and `gateDismissed` deleted. - `state.json` semantics unchanged (wholesale replace per completed check, Re-check included; About keeps reading it). **Pill + card (geometry and states per #149's resolution — the binding contract)** - 44×44 rail slot above Archive in the rail's bottom group. Checking: 8pt pulsing accent dot, no text. Failed: `exclamationmark.triangle.fill` on accent-12% wash. Healthy: nothing renders, slot collapses, rail spacing closes. - Fail auto-expands the anchored card: 340pt wide, bottom-leading at `x = railWidth + 12`, bottom 14, surface bg, accent-0.5 border, radius 12, shadow; floats, never blocks, never pushes layout. Chevron collapses; slot click re-opens. - Engine-fail card content = #40 copy with the gateless subtitle: title "Museion needs its engine"; subtitle "The Hermes engine wasn't found or didn't answer. Passes and Sessions need it — the editor keeps working."; the two install steps (curl command + Copy, "Come back here and click Re-check."); Installation guide link; Re-check (accent, disabled while checking, label "Checking…"); Technical details disclosure (stderr excerpt + "Probed: `<path>`"). - Provisioning failure rides the same card: title "Setup failed", phase rawValue + failing profile name mono, body "Museion couldn't finish setting up the writing profiles. Nothing is lost — the setup is safe to run again.", Retry inline (re-runs provisioning), Technical details. `ProvisioningFailureCard` deleted. **Mentor pane** - Header mono-10 states beside "Mentor Session": "checking the engine…" muted (mini spinner) / "engine missing" orange with help / "setup failed" orange / base version `hermes <base>` once ready (base, not the gate's derived version). Session chip renders only once ready; status text wins layout priority. - binaryPath seeding keyed on nil→value arrival (`.task(id:)` or equivalent) so panes spawn the engine the moment the check lands. **Records** - PRD G1 line amended per #150's resolution (async check every launch, nothing blocks, pill surfaces failure). - DOX pass: `Museion/AGENTS.md` engine-gate section rewritten for the gateless posture, CHANGELOG entry, devlog. **Tests** - `EngineGateTests` probe/model tests stay untouched and green (they construct models directly). - New: `startLaunchCheck` pins (auto-fire chain fires per passing check, hosted-test no-op, repeat no-op) and pill visibility mapping (idle/pass → hidden, checking → pulse, fail → orange + expanded). ## References - Decisions: #148 (map), #150 (architecture resolution), #149 (UX verdict — contract facts) - Supersedes the blocking-sheet half of #38's variant A (its no-silent-degradation AC survives, carried by the pill) - Preserves #41's sequencing rules (async check, once per app-launch, first window only) without the sheet - Closes #139 when landed [Generated by AI]
AlexKucera added the ready-for-agent label 2026-11-03 15:52:14 +01:00
AlexKucera added a new dependency 2026-11-03 15:52:26 +01:00
Sign in to join this conversation.