Worker portal redesign — composability runtime + design-system extraction
Status: In progress — Stages 1–5 shipped; Stage 6 residual #500 (live-mode composer) and #501 (Plugin Studio); Stage 7 residual #504 (first-impression states)
Tracking issue: #460
Epic: &51
Contracts: ADR-021, ADR-022, ADR-024
This file is the canonical source of truth for the redesign; the May 2026 design-exploration handoff artifacts are non-normative. Stage 2 closed on 2026-05-20 at two of three ADRs — ADR-021 and ADR-022 ratified — while the third ("ADR-023: promote-PR mechanism") was reframed as the canopy-wide config-backend question and deferred to #507. Composition v1 therefore ships on the filesystem rulesets/{juris}/ pattern and the Studio promote affordance is descoped from v1 (#488 and #492 closed-deferred); it lands as a follow-up once #507 ratifies a write-capable backend.
Status
Step |
Description |
Status |
1 |
Design system extraction (1 MR). Extract 8 Askama macro primitives — |
Done (2026-05-21) — !349 |
1.5 |
Panel-state primitives upgrade (1 MR, follow-up to Stage 1, non-blocking). Upgrade the four CSS-only panel-state utility classes from Stage 1 to first-class Askama-macro primitives with proper props: |
Done (2026-05-21) |
2 |
ADR ratification (2 MRs shipped; 3rd deferred). ADR-021 (composability runtime + plugin model — ratified 2026-05-20). ADR-022 (storage layering — ratified 2026-05-20). Originally ADR-023 (promote-PR mechanism) — deferred 2026-05-20 in favor of #507 (unified config backend ADR across canopy). |
Done (2026-05-20) — ADR-021 + ADR-022 ratified; ADR-023 deferred to #507 |
3 |
Composability runtime + storage layering (2 MRs; 1 deferred). MR1 lands the forward-only migration creating |
Done (2026-05-22) — MR1 + MR2 merged |
4 |
Identity rework (2 MRs). Generic IDP loader from |
Done (2026-05-22) — !353 + !354 |
5 |
Core surfaces (4-5 MRs, one per surface). Worker dashboard (12-panel kit composition-driven). Supervisor dashboard. Analyst dashboard. Case detail with 3 shell strategies (scroll / card-grid / tabs) and 13 section types. Customize-my-dashboard (worker-level deltas). MR1 (495) lands the worker dashboard via the Stage 3 composition runtime: 12 panel plugins registered through |
Done (2026-05-25) — !355, !356, !357, !359, !363, !364, !365 |
6 |
Maintainer surfaces (3 MRs). Jurisdiction Studio: onboarding wizard. Studio: live-mode composer (promote modal descoped from v1 pending #507). Studio: plugin developer view (Plugin Studio). |
In progress — #499 shipped 2026-05-25; #500 and #501 open |
7 |
Polish (2-3 MRs). ⌘K command palette. Audit log (system + case scopes sharing one primitive). First-impression states (splash, maintenance, expired, 404). |
In progress — #502 and #503 shipped; #504 open |
Child issues
| Stage | Issue | Title | Weight |
|---|---|---|---|
1 |
#485 |
Design system extraction (Askama partials + CSS utility classes) |
3 |
1.5 |
#505 |
Upgrade panel-state utility classes to 4 Askama-macro primitives |
3 |
2 |
#486 |
ADR-021 — composability runtime + plugin model (ratified) |
2 |
2 |
#487 |
ADR-022 — composition override storage layering (ratified) |
2 |
2 |
~#488~ |
~~ADR — promote-PR mechanism~~ deferred to #507 |
— |
3 |
#489 |
DB migrations for composition override layers |
3 |
3 |
#490 |
Composition loader (TOML parse + role filter + override merge) |
5 |
3 |
#491 |
Live override APIs (read/write/archive endpoints) |
3 |
3 |
~#492~ |
~~Promote-live-to-baseline (git-host PR generation)~~ deferred to #507 |
— |
4 |
#493 |
Generic IDP loader from idp.toml |
3 |
4 |
#494 |
IDP-aware sign-in template |
2 |
5 |
#495 |
Worker dashboard (12-panel kit, composition-driven) |
5 |
5 |
#496 |
Supervisor + analyst dashboards (role overrides) |
3 |
5 |
#497 |
Case detail (3 shell strategies + 13 section types) |
8 |
5 |
#498 |
Customize my dashboard (per-worker deltas) |
3 |
6 |
#499 |
Studio onboarding wizard |
3 |
6 |
#500 |
Studio live-mode composer (promote modal descoped pending #507) |
3 |
6 |
#501 |
Plugin Studio (developer view) |
5 |
7 |
#502 |
⌘K command palette |
3 |
7 |
#503 |
Audit log unified surface (system + case scopes) |
3 |
7 |
#504 |
First-impression states (splash / maintenance / expired / 404) |
2 |
Context
The worker portal becomes composition-driven: jurisdictions edit TOML in rulesets/{jurisdiction}/ rather than fork canopy. The same three layers (dashboard, case-detail, identity) follow the same composition + override pattern, with a five-layer storage model (user delta → role override → jurisdiction live override → TOML baseline → system defaults).
Scope
In scope (across Stages 1-7)
-
Design system extraction into reusable Askama partials + CSS utility classes (Stage 1) + four-state primitive upgrade (Stage 1.5)
-
Composability runtime: TOML composition loader, 5-layer merge (RFC 7396 baseline + RFC 6902 DB layers per ADR-022), plugin manifest validation per ADR-021
-
Storage layering: forward-only migration for
composition_documents+composition_documents_archive; live override APIs (read/write/archive) -
Generic IDP loader + IDP-aware sign-in
-
Worker / supervisor / analyst dashboards (composition-driven)
-
Case detail (3 shell strategies + 13 section types)
-
Customize-my-dashboard (per-worker deltas)
-
Jurisdiction Studio (onboarding wizard + live-mode composer + Plugin Studio)
-
⌘K command palette
-
Audit log unified surface (system + case scopes)
-
First-impression states (splash, maintenance, expired, 404)
Out of scope
-
Plugin Marketplace federation — defer to v2 (in-process Askama partials in v1 per ADR-021 require canopy-core PRs to install plugins; federation arrives when
WasmPluginSourceis added) -
Studio promote modal / promote-live-to-baseline endpoint — descoped from v1 pending #507 (unified canopy config-backend ADR). Admins promote live overrides to baseline via their jurisdiction’s existing workflow (PR / Salt / manual edit) external to canopy until #507 lands.
-
Applicant portal (ADR-008, Dioxus) — separate project
-
Mobile / tablet — not in scope for v1
-
Print views — ADR-010 Typst territory, separate surface
-
Worker-journey microspec — needs design iteration before build; file separate design-spec issues per journey (intake / IEVS resolution / sign-and-authorize / notice compose)
-
Determination sign-and-authorize ceremony — needs design before build; tracked as separate spec issue
-
Notice compose/preview UX — needs design before build; tracked as separate spec issue
-
Income tab interaction depth (IEVS resolution, add/edit/remove income, employer lookup) — section shape is designed; interaction depth is not yet designed
Design
The contracts live in the ADRs and are not restated here: the plugin model, PluginSource, the #[canopy_plugin] macro, compile-time manifest validation and the cache posture in ADR-021; the five-layer storage model, the composition_documents table and the RFC 6902 / RFC 7396 merge semantics in ADR-022; the per-worker delta schema in ADR-024. The rules a contributor needs are in Coding Conventions (worker-portal & composition patterns); per-stage design detail is in the archived stage plans linked from the Status table. The one decision recorded only here follows.
Case-detail shell strategy (locked 2026-05-19)
Shells are jurisdiction-selectable per role, not progressive enhancements at viewport breakpoints. Same jurisdiction can run different shells per role; any given user in any given context sees exactly one shell. No responsive shell-switching in v1.
Rationale (per design):
-
Desktop-first product — workers don’t review cases on phones
-
Runtime cost of two shells live: double templates, double htmx swap targets, ambiguous focus management when the viewport crosses a breakpoint mid-action
-
Escape hatch already exists: a jurisdiction that needs viewport flexibility picks
tabs(the most viewport-tolerant shell)
TOML shape per role in rulesets/{jurisdiction}/composition/case-detail.toml:
[shell.eligibility_worker]
strategy = "scroll"
[shell.intake_screener]
strategy = "card_grid"
Erratum (2026-09-17): as built the file is rulesets/<jurisdiction>/composition/case_detail.toml and the table is [shell_per_role.<role>] (RawComposition.shell_per_role; rulesets/georgia/composition/case_detail.toml).
Section list and shell strategy are independent knobs. A jurisdiction on tabs can still reorder sections, mark some required = true, or exclude program-specific ones via the same TOML’s sections = […] list. Section partials know nothing about which shell hosts them — section content shape is identical across shells; only the chrome changes per strategy.
Georgia migration default: existing 6-tab implementation becomes strategy = "tabs" with current section slugs in sections = […]. scroll and card_grid ship as opt-in; Studio admin switches when ready. No auto-migration.
Verification
-
cargo xtask validateclean (fmt + clippy + nextest + check-docs) -
cargo xtask docs plan-lintclean (this plan’s Status column stays canonical) -
Pre-push validate + Playwright E2E
-
cargo xtask coverageat or above the currentDEFAULT_THRESHOLDfloor (xtask/src/cmd/coverage.rs; unit-lane scoped since #1382) -
Stages 6 and 7: per-surface acceptance is defined in the surface’s own MR
Errata
-
Erratum (2026-09-16): Step 5’s MR4c merged as !365 on 2026-05-25 (the case-detail stage plan is archived); Step 6’s #499 shipped 2026-05-25 (
services/canopy-web/src/studio/wizard.rs) while #500 and #501 have no code yet; Step 7’s #502 (/command-palette/search) and #503 (/audit-log, its CSV export and the citation PDF, inservices/canopy-web/src/api/mod.rs) shipped and only #504 remains — the Status cells are corrected to as-built. -
Erratum (2026-09-16): the ADR-023 number was later claimed by the OIDC ADR and ADR-024 by this epic’s Stage 5 MR3;
coding-conventions.adocgained the composition-runtime conventions after Stage 3. The Steps, Files Touched, branch-hygiene, CHANGELOG-format, Q1–Q8, Risk and open-decisions sections were removed on 2026-09-16 as duplicates of the archived stage plans, the ADRs and the synced rules. -
Erratum (2026-10-25, as-built):
cargo xtask validateno longer runscheck-docs, which retired with the template sync (#2990); the rest of the § Verification line stands.