feat(provisioning): add S2.1 pass with failure alert & retry (fixes #47, #48)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
Idempotent per-gate pass: create the museion Hermes profile only when
missing (exit-1 "already exists" = success), then additively seed the
bundled writing skills from seed-manifest.txt — temp-copy+rename, present
skills never touched, orphaned temps swept, manifest entries validated
kebab-case at the trust boundary.
Failures surface a separate phase-named alert ("couldn't set up the
writing profile" / "couldn't copy the writing skills"), never re-raising
the gate: excerpt behind Technical details (stdout per #43, stderr
fallback), Retry re-runs the whole pass, Not Now defers to the next
launch's silent retry. The card presents only after the gate sheet's
dismissal completes and snapshots its failure so a successful Retry
doesn't blank it mid-animation.
Provisioning writes nothing to the profile config (no mcp_servers entry,
#44) and leaves state.json engine-gate-only. 30/30 tests green.
Co-Authored-By: Cipher <cipher@babylondreams.de>
This commit is contained in:
1 parent
67cf3d42e4
commit
c0b2cb0b93
19 files changed
+912
-9
No files matched your search
@@ -15,6 +15,22 @@ enum AppMetadata {
|
||||
struct ContentView: View {
|
||||
@Environment(AppGateState.self) private var gate
|
||||
|
||||
/// #48: provisioning failure presents only once the gate sheet has fully
|
||||
/// dismissed — keying on `gateDismissed` (set in the sheet's onDismiss,
|
||||
/// which fires at dismissal completion) rather than `!gateRaised` (which
|
||||
/// flips at dismissal start); macOS can drop a sheet presented during
|
||||
/// another sheet's dismissal animation.
|
||||
private var failurePresented: Binding<Bool> {
|
||||
Binding(
|
||||
get: { gate.provisioning.hasFailure && gate.gateDismissed },
|
||||
set: {
|
||||
if !$0 {
|
||||
gate.provisioning.deferFailure()
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
@Bindable var gate = gate
|
||||
|
||||
@@ -33,10 +49,21 @@ struct ContentView: View {
|
||||
EngineGateView(
|
||||
model: gate.gateModel,
|
||||
onEnginePass: {
|
||||
// Ticket #41: provisioning (#13) fires here in parallel — stub until #13 lands.
|
||||
// #47: provisioning runs in parallel on pass; idempotent, so re-fires
|
||||
// are no-ops. Alert UX on failure is #48.
|
||||
Task { await gate.provisioning.runPass(hermesBinary: gate.gateModel.currentBinaryPath) }
|
||||
},
|
||||
onDismiss: {
|
||||
gate.gateRaised = false
|
||||
gate.gateDismissed = true
|
||||
},
|
||||
onDismiss: { gate.gateRaised = false },
|
||||
)
|
||||
}
|
||||
.sheet(isPresented: failurePresented) {
|
||||
ProvisioningFailureCard(model: gate.provisioning) {
|
||||
Task { await gate.provisioning.runPass(hermesBinary: gate.gateModel.currentBinaryPath) }
|
||||
}
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user