mail: the member mailbox surface — /mail portal boot + claim/status vertical (#229 split, Part 2) #318

Closed
opened 2026-08-06 21:48:19 +00:00 by ben · 3 comments
Owner

Parent

Split from #229; Part 2 of the #318 split — Ben ruled 2026-08-07 on the agent's split question (option a): land the member portal now, the operator readiness gate re-filed as its own slice. Part 1 is now its own ticket.

The design contract stands: flow docs/ux/flows/mail.mermaid, confirmed wireframes docs/ux/wireframes/mail/ (M1/M2/M2x), ADRs 0115/0116, DDR 0117. The relevant user stories are #229's member-side claim stories.

What to build

MAIL-M1 / M2 / M2x — the member mailbox surface. Net-new member-portal boot: a /mail entry + routing + SPA fallback (/haere-mai join-surface as the precedent, dashboard/src/entry/join.ts), a MailSurface with the three screens, and a session-authenticated /api/mail claim/status vertical over internal/mailsvc (Claim/Address/Data already exist).

Scope notes carried from the agent's mapping:

  • openapi spec change + generated-client regen + controlapi wiring.
  • The forward-auth member-identity path — unlike join's URL-token auth. This is the one genuinely new seam.
  • M3 (webmail) / M4 (mail-client setup) stay external doors — linked, never drawn. This ticket builds no inbox; reading and writing mail is Stalwart's surface.

Self-contained, low architectural risk, fully offline-testable.

Acceptance

The Given/When/Then criteria for M1/M2/M2x live in #229's spec body — they transfer verbatim. Vitest for the screens.

## Parent Split from #229; **Part 2 of the #318 split** — Ben ruled 2026-08-07 on the agent's split question (option **a**): land the member portal now, the operator readiness gate re-filed as its own slice. Part 1 is now its own ticket. The design contract stands: flow `docs/ux/flows/mail.mermaid`, confirmed wireframes `docs/ux/wireframes/mail/` (M1/M2/M2x), ADRs 0115/0116, DDR 0117. The relevant user stories are #229's member-side claim stories. ## What to build **MAIL-M1 / M2 / M2x — the member mailbox surface.** Net-new member-portal boot: a `/mail` entry + routing + SPA fallback (`/haere-mai` join-surface as the precedent, `dashboard/src/entry/join.ts`), a `MailSurface` with the three screens, and a **session-authenticated** `/api/mail` claim/status vertical over `internal/mailsvc` (`Claim`/`Address`/`Data` already exist). Scope notes carried from the agent's mapping: - openapi spec change + generated-client regen + `controlapi` wiring. - The forward-auth **member-identity** path — unlike join's URL-token auth. This is the one genuinely new seam. - M3 (webmail) / M4 (mail-client setup) stay **external doors** — linked, never drawn. This ticket builds no inbox; reading and writing mail is Stalwart's surface. Self-contained, low architectural risk, fully offline-testable. ## Acceptance The Given/When/Then criteria for M1/M2/M2x live in #229's spec body — they transfer verbatim. Vitest for the screens.
Author
Owner

Blocked on a split/design ruling (ready-for-human). A Mattermost ask was posted to Ben's thread (resuming the open #318 question) and is unanswered; the thread stays open, so a late reply will be picked up by the next iteration's ask.

After mapping both halves against the landed backend core (b13fb81), this ticket reads as two large, independently-landable slices rather than one vertical slice — and Part 1 carries an unanswered gate-model design question. I don't want to guess either.

Part 1 — operator readiness gate (MAIL-S1 / S1x)

Wiring internal/mailreadiness's three named standing states (records-not-verified / can-receive-cant-send / active) into the P4 deploy gate. Today provision.Outcome / provision.ServiceHealth (internal/provision/health.go:84-123) carry only a binary Healthy bool plus failed-service faults — there is no home for a named standing state, and the functional mail check already wired at b13fb81 (mailHealthCheck, Stalwart /healthz, servicehealth.go:69) is a plain pass/fail clan.HealthCheck. S1's "readiness pauses the deploy until the health gate resolves" is a new gate step distinct from that functional check. So Part 1 needs: a provision gate-model extension, the S1 (records + preflight poll) and S1x (named standing state) dashboard screens, the chrome standing-indicator-stack + Services-tab surfacing (self-clearing on green), and a seam test per provision_brand_health_test.go.

Part 2 — member mailbox surface (MAIL-M1 / M2 / M2x)

Net-new /mail portal boot (mirrors dashboard/src/entry/join.ts) + MailSurface + 3 screens, plus a session-authenticated /api/mail claim/status vertical over internal/mailsvc (Claim/Address/Data already exist) — an openapi spec change + generated-client regen + controlapi wiring + the forward-auth member-identity path (unlike join's URL-token auth). Self-contained, low architectural risk, fully offline-testable.

Together ~25–30 new/changed files spanning Go gate internals + a new API auth path + the Vue frontend + tests — beyond one green-and-pushed iteration.

Decisions needed

  1. Split: (a) land Part 2 (member portal) now and re-file Part 1 (operator gate) as a child (my recommendation — Part 2 is clean and self-contained; the gate-model change deserves its own slice); (b) land Part 1 first, re-file Part 2; (c) keep as one ticket and attempt the whole thing; (d) other.
  2. Gate-model shape (Part 1): should provision.ServiceHealth gain a named-standing-state field to carry records-not-verified / can-receive-cant-send, or should the named states live outside the health gate (e.g. a separate readiness record surfaced alongside)? This likely wants a design DDR.

To re-arm: rule on the split (and, if Part 1 is next, the gate-model shape), then swap ready-for-human → ready-for-agent.

**Blocked on a split/design ruling (ready-for-human).** A Mattermost ask was posted to Ben's thread (resuming the open #318 question) and is unanswered; the thread stays open, so a late reply will be picked up by the next iteration's ask. After mapping both halves against the landed backend core (`b13fb81`), this ticket reads as **two large, independently-landable slices** rather than one vertical slice — and Part 1 carries an unanswered gate-model design question. I don't want to guess either. ### Part 1 — operator readiness gate (MAIL-S1 / S1x) Wiring `internal/mailreadiness`'s three **named standing states** (`records-not-verified` / `can-receive-cant-send` / active) into the P4 deploy gate. Today `provision.Outcome` / `provision.ServiceHealth` (`internal/provision/health.go:84-123`) carry only a **binary `Healthy` bool** plus failed-service faults — there is **no home for a named standing state**, and the functional mail check already wired at `b13fb81` (`mailHealthCheck`, Stalwart `/healthz`, `servicehealth.go:69`) is a plain pass/fail `clan.HealthCheck`. S1's "readiness pauses the deploy until the health gate resolves" is a **new gate step distinct from that functional check**. So Part 1 needs: a provision gate-model extension, the S1 (records + preflight poll) and S1x (named standing state) dashboard screens, the chrome standing-indicator-stack + Services-tab surfacing (self-clearing on green), and a seam test per `provision_brand_health_test.go`. ### Part 2 — member mailbox surface (MAIL-M1 / M2 / M2x) Net-new `/mail` portal boot (mirrors `dashboard/src/entry/join.ts`) + `MailSurface` + 3 screens, plus a **session-authenticated** `/api/mail` claim/status vertical over `internal/mailsvc` (`Claim`/`Address`/`Data` already exist) — an openapi spec change + generated-client regen + `controlapi` wiring + the forward-auth member-identity path (unlike join's URL-token auth). Self-contained, low architectural risk, fully offline-testable. Together ~25–30 new/changed files spanning Go gate internals + a new API auth path + the Vue frontend + tests — beyond one green-and-pushed iteration. ### Decisions needed 1. **Split:** (a) land **Part 2 (member portal)** now and re-file **Part 1 (operator gate)** as a child *(my recommendation — Part 2 is clean and self-contained; the gate-model change deserves its own slice)*; (b) land **Part 1** first, re-file Part 2; (c) keep as one ticket and attempt the whole thing; (d) other. 2. **Gate-model shape (Part 1):** should `provision.ServiceHealth` gain a named-standing-state field to carry `records-not-verified` / `can-receive-cant-send`, or should the named states live **outside** the health gate (e.g. a separate readiness record surfaced alongside)? This likely wants a design DDR. To re-arm: rule on the split (and, if Part 1 is next, the gate-model shape), then swap `ready-for-human` → `ready-for-agent`.
ben changed title from mail: the five screens — readiness in the P4 deploy gate + the member mailbox surface (#229 split) to mail: the member mailbox surface — /mail portal boot + claim/status vertical (#229 split, Part 2) 2026-08-07 14:07:45 +00:00
Author
Owner

Ben ruled 2026-08-07 on the split question: option (a) — land Part 2 (the member mailbox surface) now, re-file Part 1 (the operator readiness gate) as its own slice.

  • This ticket is now Part 2 only — body rewritten, ready-for-human → ready-for-agent.
  • Part 1 filed as #321, holding the gate-model design ruling.

No blocking edge: Part 2 touches none of the provision gate model.

Ben ruled 2026-08-07 on the split question: **option (a)** — land Part 2 (the member mailbox surface) now, re-file Part 1 (the operator readiness gate) as its own slice. - This ticket is now **Part 2 only** — body rewritten, `ready-for-human` → `ready-for-agent`. - Part 1 filed as **#321**, holding the gate-model design ruling. No blocking edge: Part 2 touches none of the provision gate model.
Author
Owner

Landed the member mailbox surface (Part 2) in bcbe500 on origin/main.

New seam — session-authenticated /api/mail vertical. Unlike join's URL-token auth, internal/controlapi/mail.go (WithMemberMail, GET /mail/status + POST /mail/claim) resolves the member identity from the SSO session the identity-aware ingress passes inward (HeaderSessionResolver, the auth gate's forward_auth posture, ADR 0074/0038); no session answers 401.

The portal logic — new internal/mailsvc/portal.go MemberPortal composes the existing Port (Claim/Address/Data), the config-repo brand (DDR 0007) and mem's live suspension gate to author the branded screens (surface holds no truth, DDR 0073). A suspended member's claim is refused at the gate — the reasonless MAIL-M2x, no address, suspended never on the wire (DDR 0117).

The screens — main.ts routes /mail as a third surface off the one served document (ADR 0113); dashboard/src/entry/mail.ts (bootMailSurface, the join.ts precedent) mounts MailSurface + the M1/M2/M2x screens + the claimed webmail handoff, built to the wireframes' data-field/data-action/data-status contract. M3 webmail / M4 device setup stay external doors — linked, never drawn. openapi spec + regenerated client + main.go wiring (real only behind a derived https://mail.<apex>, ADR 0100/0113).

Acceptance (#229 stories 10/11/12): M1 shows the would-be folded-slug address before claim; M2 is the one-act claim at the fixed address landing in webmail; a suspended claim lands on the reasonless M2x.

Evidence: internal/mailsvc/portal_test.go, internal/controlapi/mail_integration_test.go (401 / session-drives-subject / reasonless refusal over a real suspend), dashboard/tests/unit/mailEntry.test.ts (the surface journey over a live control-plane double). go build/vet/test + golangci-lint + dashboard vitest (968) + openapi client-sync + prettier/eslint all green.

Next: #321 (operator readiness gate + gate-model design ruling); clan-lab smoke-mail live run stays deferred (#319).

Landed the member mailbox surface (Part 2) in `bcbe500` on origin/main. **New seam — session-authenticated `/api/mail` vertical.** Unlike join's URL-token auth, `internal/controlapi/mail.go` (`WithMemberMail`, GET `/mail/status` + POST `/mail/claim`) resolves the member identity from the SSO session the identity-aware ingress passes inward (`HeaderSessionResolver`, the auth gate's forward_auth posture, ADR 0074/0038); no session answers 401. **The portal logic** — new `internal/mailsvc/portal.go` `MemberPortal` composes the existing `Port` (Claim/Address/Data), the config-repo brand (DDR 0007) and `mem`'s live suspension gate to author the branded screens (surface holds no truth, DDR 0073). A suspended member's claim is refused at the gate — the reasonless MAIL-M2x, no address, `suspended` never on the wire (DDR 0117). **The screens** — `main.ts` routes `/mail` as a third surface off the one served document (ADR 0113); `dashboard/src/entry/mail.ts` (`bootMailSurface`, the `join.ts` precedent) mounts `MailSurface` + the M1/M2/M2x screens + the claimed webmail handoff, built to the wireframes' `data-field`/`data-action`/`data-status` contract. M3 webmail / M4 device setup stay external doors — linked, never drawn. openapi spec + regenerated client + `main.go` wiring (real only behind a derived `https://mail.<apex>`, ADR 0100/0113). **Acceptance (#229 stories 10/11/12):** M1 shows the would-be folded-slug address before claim; M2 is the one-act claim at the fixed address landing in webmail; a suspended claim lands on the reasonless M2x. **Evidence:** `internal/mailsvc/portal_test.go`, `internal/controlapi/mail_integration_test.go` (401 / session-drives-subject / reasonless refusal over a real suspend), `dashboard/tests/unit/mailEntry.test.ts` (the surface journey over a live control-plane double). go build/vet/test + golangci-lint + dashboard vitest (968) + openapi client-sync + prettier/eslint all green. Next: #321 (operator readiness gate + gate-model design ruling); clan-lab `smoke-mail` live run stays deferred (#319).
ben closed this issue 2026-08-07 14:32:03 +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#318
No description provided.