spec: P4 catalogue browses as two tiers — S2 tabs, candidate tier, broker-relayed service request (child of #1073; DDR 0220 / ADR 0219) #1116

Closed
opened 2026-09-01 20:11:41 +00:00 by ben · 2 comments
Owner

Parent

  • Feature issue: #1073 (grilled 2026-08-31; both gates confirmed).
  • Program map: #7 — its "catalogue fixed in v1" boundary superseded in its
    presentation half only (note on the map, 2026-08-31); ports remain
    IDSS-side engineering through the update channel.
  • Design contract: DDR 0220 (the catalogue browses in P4), ADR 0219
    (the demand signal rides the broker), flow
    docs/ux/flows/p4-provisioning.mermaid (nodes P4-S2 / S2b / S2b-req /
    S2bx + the updates→activity arrival edges), wireframes
    docs/ux/wireframes/p4-provisioning/ (p4-s2-select-role-and-services.html
    amended; p4-s2b-browse-catalogue.html, p4-s2b-req-request-confirm.html,
    p4-s2bx-request-nothing-sent.html — commit 3d800e99). Standing
    inherited contracts: ADR 0062 (three-part port), ADR 0064 (single floor
    source), DDR 0166 / DDR 0156 / DDR 0146 (cards, accent flood, gating).

Problem Statement

An operator provisioning a device sees nine unadorned service names and has
no way to see what their community could host beyond them, learn what each
service honestly is, or tell anyone what's missing. The catalogue reads as a
checklist, not a catalogue; community wants die in conversation because
there is nowhere for them to land.

Solution

The P4-S2 Select screen grows a second tab. For this device stays the
honest-fit picker over the installable tier, now dressed with tiles,
one-line descriptions and category groups. Browse catalogue shows the
whole catalogue — installable services with where they already run, and a
curated, never-deployable candidate tier with a Request action:
one explicit, broker-relayed send that files an issue on Matou/idss and
emails ben@matou.nz, recorded community-wide as "Requested on ‹date›". A
Suggest something else card catches everything curation missed. When a
requested port later ships through the update channel, the entry moves
tiers wearing its history and the activity feed says so. Vocabulary:
Catalogue / candidate / service request — never store, marketplace, app
store (CONTEXT.md).

User Stories

  1. As an operator on P4-S2, I want a two-tab strip (For this device ·
    Browse catalogue), so that fit-picking and catalogue-browsing stay one
    screen without polluting each other.
    • Given ticked services on For this device, When I switch to Browse
      catalogue and back, Then my ticks are exactly as I left them and
      Review impact remains reachable from either tab.
    • Given the Browse tab, Then no card carries a tick or is selectable
      for deploy — candidates never appear where a tick could be mistaken
      for a promise.
  2. As an operator, I want every installable card to wear a glyph tile, a
    one-line description in domain vocabulary, and its product named and
    linked (DDR 0166), so that I can learn what I'd actually be running.
    • Given the For this device tab, Then AVAILABLE is grouped under the
      curated category headings (Work together · Reach people · Build ·
      Protect · Foundations) and a category with nothing available is
      absent; RECOMMENDED stays ungrouped, ordered by the gap it fills.
    • Given any gated card, Then its reason still reads in the device's own
      numbers and all DDR 0146 / #411 / #413 gating is unchanged.
  3. As an operator, I want the Browse tab to show the whole catalogue by
    category, so that I can see what exists and what could.
    • Given the Browse tab, Then every installable service shows a
      RUNNING pill with where it runs ("running on karaka · second copy on
      tōtara") or an INSTALLABLE pill with the plain reason it doesn't yet.
    • Given a candidate, Then its card is visibly distinct (dashed,
      CANDIDATE pill, "would run ‹product›") and carries Request where the
      tick would be.
  4. As an operator, I want to search the catalogue across name, product and
    description, so that I can find a service by any handle I know.
    • Given a search that matches nothing, Then the empty state names the
      query, offers clear-search, and the Suggest something else card stays,
      pre-filled with my search text — the tab never dead-ends (P4-S2b).
  5. As an operator, I want a tile-face toggle (glyphs default · product
    logos), remembered per operator and honoured on both tabs, so that I
    can choose recognisability over kit consistency.
    • Given a candidate without a curated logo, When the logo face is on,
      Then its tile falls back to the glyph — never a broken image.
  6. As an operator, I want Request to open a confirm that states exactly
    what is sent and to whom, so that the send is a deliberate act I can
    stand behind (P4-S2b-req).
    • Given the confirm, Then it states the four facts: TO (an issue on
      git.matou.nz/Matou/idss and an email to ben@matou.nz), SAYING (my
      community's name + the service + my optional note), FROM (the
      community's name only — no member data, no device facts, no
      addresses), VIA (Mātou's broker).
    • Given Cancel, Then nothing is sent and nothing is recorded.
  7. As an operator, I want "Requested" earned only on broker acceptance
    (ADR 0219), so that the state never lies.
    • Given Send, When the broker accepts, Then I return to Browse and the
      card reads "Requested on ‹date›" — and every other operator of this
      community sees the same.
    • Given a community that already requested this service, When any
      operator sends again, Then the broker's dedupe returns the existing
      acceptance and the card shows the original date — never an error,
      never a second issue.
  8. As an operator whose send failed, I want the one fail-loud shape
    (P4-S2bx), so that I know nothing half-happened.
    • Given the relay unreachable or refusing, Then the dialog says "The
      request couldn't reach Mātou — nothing was sent" with the reason it
      has (never a stack trace), keeps my note, and offers Try again /
      Leave it for now; the card is still a plain candidate and the ledger
      records nothing.
  9. As an operator, I want Suggest something else (name required, product
    optional, why required), so that curation never silences a real want.
    • Given an accepted suggestion, Then Browse shows a one-line
      confirmation and my community's suggestions list as dated plain lines
      under the Suggest card — visible to every operator, not re-sendable
      by accident.
  10. As an operator whose request was answered, I want the arrival to find
    me, so that the loop visibly closes.
    • Given a port shipping through the update channel for a service this
      community requested, Then the entry moves to the installable tier
      wearing "Requested ‹date› · now installable", and an ops-event lands
      in the P12 activity feed naming the service and that this community
      requested it.
    • Given a request that will not be ported, Then no card state changes
      ever — there is no declined state; that conversation lives on the
      filed issue.
  11. As a member, I do not see the catalogue at all — browsing and
    requesting are operator-only in v1 (DDR 0220).
  12. As Mātou (the maintainers), I want each request to arrive as one
    prefilled Matou/idss issue plus one email, sent with the broker's own
    credentials, so that demand is actionable and no community holds a
    tracker token (ADR 0219).
  13. As Mātou, I want the broker to rate-limit and dedupe requests
    centrally, so that the tracker cannot be spammed from community
    installs.
  14. As an IDSS release engineer, I want the candidate tier to be curated
    data compiled in beside the catalogue and shipped through the update
    channel, so that browsing works offline and the list grows by commit.
  15. As an operator of a community preset, I want glyph tiles coloured by
    kit tokens (ADR 0122), so that my community's re-skin covers the
    catalogue too.

Implementation Decisions

  • Catalogue package stays the single source (ADR 0064). Service grows
    display facts only: category, one-line description, glyph, logo asset
    reference. A new Candidate type and Candidates() listing live in the
    same package: slug, name, product + product URL, category, one-liner,
    glyph, optional logo. Candidates carry no floor, no roles, no health
    check and can never reach the deploy path. The curated category taxonomy
    is data in this package; it is never free-tagged.
  • A new service-request module owns the request ledger — one
    single-writer JSON document (the ADR 0050 jsonstore pattern the member
    and rescue ledgers use) mapping service slug → requested-on date, plus
    the community's sent suggestions (name, product, date) — and the send
    orchestration: call the broker, record only on accept.
  • The broker client grows one method (RequestService), the same
    ADR 0100 port pattern as ClaimSubdomain/Rent, carrying: community name,
    kind (candidate | suggestion), service slug or suggested name + optional
    product, optional note. The response is accept (with the canonical
    requested-on date — the original date on dedupe) or a refusal with a
    human-readable reason. The broker-side endpoint (issue filing with its
    token, the email, rate limiting, dedupe) is companion work in the
    broker's own codebase, not this repo
    — the contract above is what this
    repo pins with its fake.
  • The control API grows two routes beside the existing P4 family:
    a catalogue read returning both tiers, categories, per-service
    running-where (from fleet state), request states and the suggestions
    list — the one read the Browse tab renders from; and a request POST
    (kind, slug/name, product, note) implementing send-then-record. The
    existing assessment/selection/impact/deploy routes are untouched.
  • Dashboard (P4-S2 surface): the tab strip, the Browse tab, the
    confirm and failed dialogs are built to the wireframe contract
    (data-field / data-action / data-status names in the four files are
    the literal element contract). The tile-face preference is a
    per-operator remembered view preference. Wireframe samples (Outline,
    Jellyfin, Listmonk, Mobilizon, Vaultwarden, Uptime Kuma, Immich) are
    illustrative; the shipped candidate list is the output of the seed
    research pass.
  • Arrival detection rides the update channel: applying an update
    diffs the incoming catalogue's installable slugs against the request
    ledger; a match stamps the entry's request history and emits an
    ops-event through the update module's existing RecentEvents projection
    (the #824 ops-event contract). No new notification machinery.
  • Vocabulary is enforced in copy: Catalogue, candidate, service
    request, Mātou / the IDSS maintainers. Never store, marketplace, app
    store, vote, pending, declined.

Testing Decisions

  • Test external behaviour at the existing controlapi HTTP seam with a
    fake broker behind it (the ADR 0100 fake pattern founding uses) — no
    new seam. Good tests here assert what an operator or the broker
    observes: the catalogue read's two tiers and states, requested-only-on-
    accept, the dedupe date, the fail-loud refusal leaving the ledger
    untouched, the suggestion listing, the arrival stamping + ops-event.
  • Catalogue data facts (every service has category/description/glyph;
    every candidate has product + URL; taxonomy closed) get plain table
    tests in the catalogue package, prior art: the existing floor tests.
  • Ledger persistence gets the jsonstore prior art (member/rescue ledger
    tests): load-mutate-save, schema guard, empty-file first run.
  • Update-arrival gets the update module's RecentEvents prior art
    (projection over records, windowed).
  • Dashboard component tests pin the wireframe contract selectors (tab
    strip, card states, confirm's four facts, failed dialog) — prior art:
    the app's existing P4 picker tests; design-verify closes the loop
    against the wireframes.

Out of Scope

  • Member-side browsing or requesting (operator-only, DDR 0220).
  • Declined / expired request states — none exist, ever.
  • Deployable candidates — nothing deploys without its ADR 0062 port.
  • Live external indexes (nixpkgs, awesome-selfhosted) at browse time.
  • Vote counts or tallies — one request per community per candidate.
  • Ratings, reviews, screenshot galleries, featured rows, changelogs.
  • A catalogue page in the shell (the read is surface-agnostic; later).
  • The broker-side endpoint implementation (companion work, broker repo).
  • The curated candidate seed list content itself (separate /research
    pass; this spec ships the machinery and the taxonomy).

Further Notes

  • ADR 0219's privacy commitment is a contract: the payload is the
    community's name + the service + the note, nothing else. The confirm's
    FROM line is the operator-facing face of that promise; widening the
    payload is a new ruling, not a ticket-level call.
  • The broker refusal message is operator-facing copy (like
    HealthCheck.Summary, ADR 0062): human words, never a stack trace.
  • Logo assets are curated in-repo SVGs; sourcing/licensing joins the
    per-entry curation duty. Glyph fallback is mandatory.
## Parent - Feature issue: #1073 (grilled 2026-08-31; both gates confirmed). - Program map: #7 — its "catalogue fixed in v1" boundary superseded in its presentation half only (note on the map, 2026-08-31); ports remain IDSS-side engineering through the update channel. - Design contract: **DDR 0220** (the catalogue browses in P4), **ADR 0219** (the demand signal rides the broker), flow `docs/ux/flows/p4-provisioning.mermaid` (nodes P4-S2 / S2b / S2b-req / S2bx + the updates→activity arrival edges), wireframes `docs/ux/wireframes/p4-provisioning/` (`p4-s2-select-role-and-services.html` amended; `p4-s2b-browse-catalogue.html`, `p4-s2b-req-request-confirm.html`, `p4-s2bx-request-nothing-sent.html` — commit `3d800e99`). Standing inherited contracts: ADR 0062 (three-part port), ADR 0064 (single floor source), DDR 0166 / DDR 0156 / DDR 0146 (cards, accent flood, gating). ## Problem Statement An operator provisioning a device sees nine unadorned service names and has no way to see what their community could host beyond them, learn what each service honestly is, or tell anyone what's missing. The catalogue reads as a checklist, not a catalogue; community wants die in conversation because there is nowhere for them to land. ## Solution The P4-S2 Select screen grows a second tab. **For this device** stays the honest-fit picker over the installable tier, now dressed with tiles, one-line descriptions and category groups. **Browse catalogue** shows the whole catalogue — installable services with where they already run, and a curated, never-deployable **candidate** tier with a **Request** action: one explicit, broker-relayed send that files an issue on `Matou/idss` and emails ben@matou.nz, recorded community-wide as "Requested on ‹date›". A **Suggest something else** card catches everything curation missed. When a requested port later ships through the update channel, the entry moves tiers wearing its history and the activity feed says so. Vocabulary: Catalogue / candidate / service request — never store, marketplace, app store (CONTEXT.md). ## User Stories 1. As an operator on P4-S2, I want a two-tab strip (For this device · Browse catalogue), so that fit-picking and catalogue-browsing stay one screen without polluting each other. - Given ticked services on For this device, When I switch to Browse catalogue and back, Then my ticks are exactly as I left them and Review impact remains reachable from either tab. - Given the Browse tab, Then no card carries a tick or is selectable for deploy — candidates never appear where a tick could be mistaken for a promise. 2. As an operator, I want every installable card to wear a glyph tile, a one-line description in domain vocabulary, and its product named and linked (DDR 0166), so that I can learn what I'd actually be running. - Given the For this device tab, Then AVAILABLE is grouped under the curated category headings (Work together · Reach people · Build · Protect · Foundations) and a category with nothing available is absent; RECOMMENDED stays ungrouped, ordered by the gap it fills. - Given any gated card, Then its reason still reads in the device's own numbers and all DDR 0146 / #411 / #413 gating is unchanged. 3. As an operator, I want the Browse tab to show the whole catalogue by category, so that I can see what exists and what could. - Given the Browse tab, Then every installable service shows a RUNNING pill with where it runs ("running on karaka · second copy on tōtara") or an INSTALLABLE pill with the plain reason it doesn't yet. - Given a candidate, Then its card is visibly distinct (dashed, CANDIDATE pill, "would run ‹product›") and carries Request where the tick would be. 4. As an operator, I want to search the catalogue across name, product and description, so that I can find a service by any handle I know. - Given a search that matches nothing, Then the empty state names the query, offers clear-search, and the Suggest something else card stays, pre-filled with my search text — the tab never dead-ends (P4-S2b). 5. As an operator, I want a tile-face toggle (glyphs default · product logos), remembered per operator and honoured on both tabs, so that I can choose recognisability over kit consistency. - Given a candidate without a curated logo, When the logo face is on, Then its tile falls back to the glyph — never a broken image. 6. As an operator, I want Request to open a confirm that states exactly what is sent and to whom, so that the send is a deliberate act I can stand behind (P4-S2b-req). - Given the confirm, Then it states the four facts: TO (an issue on git.matou.nz/Matou/idss and an email to ben@matou.nz), SAYING (my community's name + the service + my optional note), FROM (the community's name only — no member data, no device facts, no addresses), VIA (Mātou's broker). - Given Cancel, Then nothing is sent and nothing is recorded. 7. As an operator, I want "Requested" earned only on broker acceptance (ADR 0219), so that the state never lies. - Given Send, When the broker accepts, Then I return to Browse and the card reads "Requested on ‹date›" — and every other operator of this community sees the same. - Given a community that already requested this service, When any operator sends again, Then the broker's dedupe returns the existing acceptance and the card shows the original date — never an error, never a second issue. 8. As an operator whose send failed, I want the one fail-loud shape (P4-S2bx), so that I know nothing half-happened. - Given the relay unreachable or refusing, Then the dialog says "The request couldn't reach Mātou — nothing was sent" with the reason it has (never a stack trace), keeps my note, and offers Try again / Leave it for now; the card is still a plain candidate and the ledger records nothing. 9. As an operator, I want Suggest something else (name required, product optional, why required), so that curation never silences a real want. - Given an accepted suggestion, Then Browse shows a one-line confirmation and my community's suggestions list as dated plain lines under the Suggest card — visible to every operator, not re-sendable by accident. 10. As an operator whose request was answered, I want the arrival to find me, so that the loop visibly closes. - Given a port shipping through the update channel for a service this community requested, Then the entry moves to the installable tier wearing "Requested ‹date› · now installable", and an ops-event lands in the P12 activity feed naming the service and that this community requested it. - Given a request that will not be ported, Then no card state changes ever — there is no declined state; that conversation lives on the filed issue. 11. As a member, I do not see the catalogue at all — browsing and requesting are operator-only in v1 (DDR 0220). 12. As Mātou (the maintainers), I want each request to arrive as one prefilled `Matou/idss` issue plus one email, sent with the broker's own credentials, so that demand is actionable and no community holds a tracker token (ADR 0219). 13. As Mātou, I want the broker to rate-limit and dedupe requests centrally, so that the tracker cannot be spammed from community installs. 14. As an IDSS release engineer, I want the candidate tier to be curated data compiled in beside the catalogue and shipped through the update channel, so that browsing works offline and the list grows by commit. 15. As an operator of a community preset, I want glyph tiles coloured by kit tokens (ADR 0122), so that my community's re-skin covers the catalogue too. ## Implementation Decisions - **Catalogue package stays the single source (ADR 0064).** `Service` grows display facts only: category, one-line description, glyph, logo asset reference. A new `Candidate` type and `Candidates()` listing live in the same package: slug, name, product + product URL, category, one-liner, glyph, optional logo. Candidates carry no floor, no roles, no health check and can never reach the deploy path. The curated category taxonomy is data in this package; it is never free-tagged. - **A new service-request module** owns the request ledger — one single-writer JSON document (the ADR 0050 jsonstore pattern the member and rescue ledgers use) mapping service slug → requested-on date, plus the community's sent suggestions (name, product, date) — and the send orchestration: call the broker, record only on accept. - **The broker client grows one method** (`RequestService`), the same ADR 0100 port pattern as ClaimSubdomain/Rent, carrying: community name, kind (candidate | suggestion), service slug or suggested name + optional product, optional note. The response is accept (with the canonical requested-on date — the original date on dedupe) or a refusal with a human-readable reason. **The broker-side endpoint (issue filing with its token, the email, rate limiting, dedupe) is companion work in the broker's own codebase, not this repo** — the contract above is what this repo pins with its fake. - **The control API grows two routes** beside the existing P4 family: a catalogue read returning both tiers, categories, per-service running-where (from fleet state), request states and the suggestions list — the one read the Browse tab renders from; and a request POST (kind, slug/name, product, note) implementing send-then-record. The existing assessment/selection/impact/deploy routes are untouched. - **Dashboard (P4-S2 surface):** the tab strip, the Browse tab, the confirm and failed dialogs are built to the wireframe contract (`data-field` / `data-action` / `data-status` names in the four files are the literal element contract). The tile-face preference is a per-operator remembered view preference. Wireframe samples (Outline, Jellyfin, Listmonk, Mobilizon, Vaultwarden, Uptime Kuma, Immich) are illustrative; the shipped candidate list is the output of the seed research pass. - **Arrival detection rides the update channel:** applying an update diffs the incoming catalogue's installable slugs against the request ledger; a match stamps the entry's request history and emits an ops-event through the update module's existing RecentEvents projection (the #824 ops-event contract). No new notification machinery. - **Vocabulary is enforced in copy:** Catalogue, candidate, service request, Mātou / the IDSS maintainers. Never store, marketplace, app store, vote, pending, declined. ## Testing Decisions - Test external behaviour at the **existing controlapi HTTP seam** with a **fake broker** behind it (the ADR 0100 fake pattern founding uses) — no new seam. Good tests here assert what an operator or the broker observes: the catalogue read's two tiers and states, requested-only-on- accept, the dedupe date, the fail-loud refusal leaving the ledger untouched, the suggestion listing, the arrival stamping + ops-event. - Catalogue data facts (every service has category/description/glyph; every candidate has product + URL; taxonomy closed) get plain table tests in the catalogue package, prior art: the existing floor tests. - Ledger persistence gets the jsonstore prior art (member/rescue ledger tests): load-mutate-save, schema guard, empty-file first run. - Update-arrival gets the update module's RecentEvents prior art (projection over records, windowed). - Dashboard component tests pin the wireframe contract selectors (tab strip, card states, confirm's four facts, failed dialog) — prior art: the app's existing P4 picker tests; `design-verify` closes the loop against the wireframes. ## Out of Scope - Member-side browsing or requesting (operator-only, DDR 0220). - Declined / expired request states — none exist, ever. - Deployable candidates — nothing deploys without its ADR 0062 port. - Live external indexes (nixpkgs, awesome-selfhosted) at browse time. - Vote counts or tallies — one request per community per candidate. - Ratings, reviews, screenshot galleries, featured rows, changelogs. - A catalogue page in the shell (the read is surface-agnostic; later). - The broker-side endpoint implementation (companion work, broker repo). - The curated candidate seed list content itself (separate `/research` pass; this spec ships the machinery and the taxonomy). ## Further Notes - ADR 0219's privacy commitment is a contract: the payload is the community's name + the service + the note, nothing else. The confirm's FROM line is the operator-facing face of that promise; widening the payload is a new ruling, not a ticket-level call. - The broker refusal message is operator-facing copy (like HealthCheck.Summary, ADR 0062): human words, never a stack trace. - Logo assets are curated in-repo SVGs; sourcing/licensing joins the per-entry curation duty. Glyph fallback is mandatory.
Author
Owner

Ticketed: #1119–#1128 — one ticket per slice of docs/slices/catalogue.yaml, ready-for-agent, dependency edges native (cross-feature: #23 bootstrap:skeleton, #73 provision-active-and-partial — both closed). Frontier: #1119 (display facts), #1121 (request ledger), #1122 (broker client) can start immediately. Not ticketed here by design: the candidate seed list (/research pass) and the broker-side endpoint (broker codebase).

**Ticketed:** #1119–#1128 — one ticket per slice of docs/slices/catalogue.yaml, `ready-for-agent`, dependency edges native (cross-feature: #23 bootstrap:skeleton, #73 provision-active-and-partial — both closed). Frontier: **#1119** (display facts), **#1121** (request ledger), **#1122** (broker client) can start immediately. Not ticketed here by design: the candidate seed list (/research pass) and the broker-side endpoint (broker codebase).
Author
Owner

Closed 2026-10-21 (Ben's ruling in the stale sweep): the two-tier catalogue spec was ticketed as #1119–#1128 and the arc is delivered (four-axis review 2026-09-02 on parent #1073, closed with it).

Closed 2026-10-21 (Ben's ruling in the stale sweep): the two-tier catalogue spec was ticketed as #1119–#1128 and the arc is delivered (four-axis review 2026-09-02 on parent #1073, closed with it).
ben 2026-10-21 20:48:56 +00:00
  • closed this issue
  • removed the
    no-triage
    label
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#1116
No description provided.