S12 hand-off: open the dashboard once the passkey enrols — honour “we'll bring you to the dashboard” #348

Closed
opened 2026-08-09 04:36:47 +00:00 by ben · 1 comment
Owner

What

After the S12 passkey ceremony completes, the app promises "We'll bring you to the dashboard the moment it's done…" — but no code fulfils it. The operator's browser is abandoned on kanidm's credential-reset screen, and the app just swaps the waiting card for the static "Passkey registered" line. Open the community dashboard (the portal address) in the operator's browser once enrolment is confirmed.

Evidence — the drift

  • The shipped promise: app/src/components/founding/FoundingHandOff.vue line ~50 (the enrol-pending waiting card): "Your browser is open — create your passkey there. We'll bring you to the dashboard the moment it's done…"
  • The design contract says the same: docs/ux/wireframes/p1-founding/p1-s12-hand-off.html, data-status="enrol-pending" frame.
  • What actually happens: internal/fleetwire/enrolment.go — RegisterPasskey opens kanidm's reset screen (/ui/reset?token=…), polls HasPasskey every 2s, and on success simply returns nil. Nothing navigates the browser anywhere. The e2e drive (app/tests/e2e/private-path.live.spec.ts, "sign in with the passkey" step) has to sign in and navigate to the dashboard itself to verify it.

Proposed fix

When HasPasskey confirms (the success path of RegisterPasskey, or the orchestrator's EnrolPasskey op on the helper side), open the portal address with the same browser opener the ceremony used. The hand-off view already carries the portal address (S12 data-field="portal-address"), and the enrolment adapter already has cfg.Open.

Design ruling context (why this is the right direction, not in-app): ADR 0046 — passkey enrolment is inherently out-of-band; the browser is where the person credential must live. Opening the dashboard afterwards honours the promise without changing the credential model.

Acceptance criteria

  1. When the passkey registration is confirmed by the poll, the operator's browser is opened at the community's portal address (the same address S12 renders as data-field="portal-address").
  2. A failed/expired ceremony (ErrEnrolmentTokenExpired) does NOT open the dashboard — the fault renders with its step as today (DDR 0131/0138 contract unchanged).
  3. A cancelled ceremony (the S12 Cancel affordance, DDR 0138) does not later throw a surprise dashboard tab at the operator: if the UI retreat happened but the helper's poll subsequently sees the passkey land, decide and encode the behaviour (either suppress the open, or accept it as fine because a passkey did register) — name the choice in the code.
  4. The e2e open sink (#338, e2eOpenSinkEnv in app/helper/cmd/helper/wiring_prod.go) receives the dashboard URL as a second appended line instead of a real tab; the live spec asserts it (and may drop its manual dashboard navigation or keep it as verification — spec's choice).
  5. The enrol-pending copy stays truthful — no copy change needed if the open lands.

Open design note (small, resolve in-ticket or punt)

The wireframe caption also claims "First dashboard launch is auto-signed-in." The reset ceremony does not necessarily leave a kanidm session — the e2e drive signs in with the fresh passkey explicitly. If the opened dashboard redirects to kanidm sign-in (one passkey touch), that is acceptable and the wireframe caption should be softened in the same change; if a session does carry, nothing to do. Verify live, amend whichever side is wrong.

Provenance

Found 2026-08-08 while walking the founding flow ("what happens after the admin passkey is created?"). Related: #338 (e2e open sink), DDR 0138 (visible waiting), ADR 0046 (two credentials), drive 20260809T030602Z (proved the current behaviour live).

## What After the S12 passkey ceremony completes, the app promises "We'll bring you to the dashboard the moment it's done…" — but no code fulfils it. The operator's browser is abandoned on kanidm's credential-reset screen, and the app just swaps the waiting card for the static "Passkey registered" line. Open the community dashboard (the portal address) in the operator's browser once enrolment is confirmed. ## Evidence — the drift - **The shipped promise:** `app/src/components/founding/FoundingHandOff.vue` line ~50 (the `enrol-pending` waiting card): *"Your browser is open — create your passkey there. We'll bring you to the dashboard the moment it's done…"* - **The design contract says the same:** `docs/ux/wireframes/p1-founding/p1-s12-hand-off.html`, `data-status="enrol-pending"` frame. - **What actually happens:** `internal/fleetwire/enrolment.go` — `RegisterPasskey` opens kanidm's reset screen (`/ui/reset?token=…`), polls `HasPasskey` every 2s, and on success simply returns `nil`. Nothing navigates the browser anywhere. The e2e drive (`app/tests/e2e/private-path.live.spec.ts`, "sign in with the passkey" step) has to sign in and navigate to the dashboard itself to verify it. ## Proposed fix When `HasPasskey` confirms (the success path of `RegisterPasskey`, or the orchestrator's `EnrolPasskey` op on the helper side), open the portal address with the same browser opener the ceremony used. The hand-off view already carries the portal address (S12 `data-field="portal-address"`), and the enrolment adapter already has `cfg.Open`. Design ruling context (why this is the right direction, not in-app): ADR 0046 — passkey enrolment is inherently out-of-band; the browser is where the person credential must live. Opening the dashboard afterwards honours the promise without changing the credential model. ## Acceptance criteria 1. When the passkey registration is confirmed by the poll, the operator's browser is opened at the community's portal address (the same address S12 renders as `data-field="portal-address"`). 2. A failed/expired ceremony (`ErrEnrolmentTokenExpired`) does NOT open the dashboard — the fault renders with its step as today (DDR 0131/0138 contract unchanged). 3. A cancelled ceremony (the S12 Cancel affordance, DDR 0138) does not later throw a surprise dashboard tab at the operator: if the UI retreat happened but the helper's poll subsequently sees the passkey land, decide and encode the behaviour (either suppress the open, or accept it as fine because a passkey did register) — name the choice in the code. 4. The e2e open sink (#338, `e2eOpenSinkEnv` in `app/helper/cmd/helper/wiring_prod.go`) receives the dashboard URL as a second appended line instead of a real tab; the live spec asserts it (and may drop its manual dashboard navigation or keep it as verification — spec's choice). 5. The enrol-pending copy stays truthful — no copy change needed if the open lands. ## Open design note (small, resolve in-ticket or punt) The wireframe caption also claims *"First dashboard launch is auto-signed-in."* The reset ceremony does not necessarily leave a kanidm session — the e2e drive signs in with the fresh passkey explicitly. If the opened dashboard redirects to kanidm sign-in (one passkey touch), that is acceptable and the wireframe caption should be softened in the same change; if a session does carry, nothing to do. Verify live, amend whichever side is wrong. ## Provenance Found 2026-08-08 while walking the founding flow ("what happens after the admin passkey is created?"). Related: #338 (e2e open sink), DDR 0138 (visible waiting), ADR 0046 (two credentials), drive `20260809T030602Z` (proved the current behaviour live).
Author
Owner

Shipped in e370519 (on origin/main).

The S12 hand-off now honours "we'll bring you to the dashboard": when the helper's HasPasskey poll confirms the passkey landed, fleetwire.RegisterPasskey opens the community's portal address with the same opener the ceremony used (ADR 0046 — enrolment stays out-of-band). The address is threaded from Orchestrator.EnrolPasskey as ho.Portal.Address through the founding.Enrolment interface.

  • AC1 — confirmed passkey opens the portal address (S12 data-field="portal-address"). Proven at both seams: internal/fleetwire/enrolment_test.go (real adapter opens reset-screen then portal) and internal/founding/handoff_test.go TestStory27_PasskeyEnrolmentOpensTheDashboard.
  • AC2 — ErrEnrolmentTokenExpired never opens; only the has==true path does. Tested.
  • AC3 — a cancelled ceremony that never saw a passkey drops out via ctx.Done() and never opens; the narrow Cancel-races-passkey-landing case is ACCEPTED as honest (a passkey did register) — the choice is named in enrolment.go.
  • AC4 — the e2e open sink (#338) receives the dashboard URL as a second appended line; private-path.live.spec.ts asserts sink[last] === portal-address and keeps its manual dashboard navigation as verification.
  • AC5 — no enrol-pending copy change; it stays truthful because the open lands.
  • Open design note resolved — the reset ceremony leaves no kanidm session (the e2e drive signs in with the fresh passkey explicitly), so the S12 wireframe caption is softened from "auto-signed-in" to "asks for your new passkey (one touch)".

A dashboard-open failure is deliberately non-fatal (the credential already settled — logged, not fatal). go test ./internal/fleetwire/... ./internal/founding/... green; full pre-push Go gate passed.

Shipped in e370519 (on origin/main). The S12 hand-off now honours "we'll bring you to the dashboard": when the helper's `HasPasskey` poll confirms the passkey landed, `fleetwire.RegisterPasskey` opens the community's portal address with the same opener the ceremony used (ADR 0046 — enrolment stays out-of-band). The address is threaded from `Orchestrator.EnrolPasskey` as `ho.Portal.Address` through the `founding.Enrolment` interface. - **AC1** — confirmed passkey opens the portal address (S12 `data-field="portal-address"`). Proven at both seams: `internal/fleetwire/enrolment_test.go` (real adapter opens reset-screen then portal) and `internal/founding/handoff_test.go` `TestStory27_PasskeyEnrolmentOpensTheDashboard`. - **AC2** — `ErrEnrolmentTokenExpired` never opens; only the `has==true` path does. Tested. - **AC3** — a cancelled ceremony that never saw a passkey drops out via `ctx.Done()` and never opens; the narrow Cancel-races-passkey-landing case is ACCEPTED as honest (a passkey did register) — the choice is named in `enrolment.go`. - **AC4** — the e2e open sink (#338) receives the dashboard URL as a second appended line; `private-path.live.spec.ts` asserts `sink[last] === portal-address` and keeps its manual dashboard navigation as verification. - **AC5** — no `enrol-pending` copy change; it stays truthful because the open lands. - **Open design note resolved** — the reset ceremony leaves no kanidm session (the e2e drive signs in with the fresh passkey explicitly), so the S12 wireframe caption is softened from "auto-signed-in" to "asks for your new passkey (one touch)". A dashboard-open failure is deliberately non-fatal (the credential already settled — logged, not fatal). `go test ./internal/fleetwire/... ./internal/founding/...` green; full pre-push Go gate passed.
ben closed this issue 2026-08-09 07:11:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#348
No description provided.