operator app: after hand-off the shell does not wear the community's brand kit until a stack card is clicked #2191

Closed
opened 2026-11-11 12:21:28 +00:00 by ben · 5 comments
Owner

What happened

tu-ia, app 2026.11.3430, after the hand-off finished (founding state scrubbed 2026-11-10 23:00): the operator app shell does not wear the community's brand kit — it shows the default look — until Ben clicks a piece of the stack on the health board, which then paints.

Leads

  • internal/founding/preview.go ShellBrand serves the draft's kit while a draft exists, then falls back to o.communityBrand (the config-repo header). After the scrub there is no draft, so this depends on the community-brand reader being wired and on the shell re-asking.
  • app/src/lib/shellBrand.ts dresses :root at boot and from the wizard's previews; the health board (HealthBoard.vue) paints the brand scoped to its own element via applyBrandTokens(tokens, el). That matches the symptom: the card paints, the shell does not.
  • Likely the shell is never re-dressed when the founding ends (draft → scrubbed), or the boot dress runs before the community-brand source is readable. Re-dress the shell when the seat changes to operator(community).

Related: #237, DDR 0151, DDR 0302.

## What happened tu-ia, app 2026.11.3430, after the hand-off finished (founding state scrubbed 2026-11-10 23:00): the operator app shell does **not** wear the community's brand kit — it shows the default look — until Ben clicks a piece of the stack on the health board, which then paints. ## Leads - `internal/founding/preview.go` `ShellBrand` serves the draft's kit while a draft exists, then falls back to `o.communityBrand` (the config-repo header). After the scrub there is no draft, so this depends on the community-brand reader being wired and on the shell re-asking. - `app/src/lib/shellBrand.ts` dresses `:root` at boot and from the wizard's previews; the health board (`HealthBoard.vue`) paints the brand scoped to its own element via `applyBrandTokens(tokens, el)`. That matches the symptom: the card paints, the shell does not. - Likely the shell is never re-dressed when the founding ends (draft → scrubbed), or the boot dress runs before the community-brand source is readable. Re-dress the shell when the seat changes to operator(community). Related: #237, DDR 0151, DDR 0302.
ben self-assigned this 2026-11-11 12:21:28 +00:00

This was generated by AI during triage.

Agent Brief

Category: bug
Summary: After hand-off, the operator-app shell shows the default look instead of the community's brand kit until a stack card is clicked. Re-dress the shell when the seat becomes operator(community) / when the founding ends, and after the community-brand source is readable.

Current behavior:
After the hand-off finishes (the founding draft is scrubbed), the shell wears the default look. Clicking a piece of the stack on the health board paints the brand — because HealthBoard.vue applies the brand scoped to its own element via applyBrandTokens(tokens, el) — but the shell itself (:root) is never re-dressed, so the window chrome stays default.

Why: dressShell (app/src/lib/shellBrand.ts) dresses :root at boot and from the wizard's previews. internal/founding.ShellBrand serves the draft's kit while a draft exists, then falls back to the community-brand reader (the config-repo header) once the draft is gone. After the scrub there is no draft, so the shell brand depends on (a) the community-brand reader being wired and readable, and (b) the shell re-asking. The boot dress either ran before the community-brand source was readable, or the shell is simply never re-dressed when the founding ends (draft → scrubbed). The card paints (own-element scope) while the shell does not — exactly the symptom.

Desired behavior:
When the seat transitions to operator(community) — i.e. a founding ends and its draft is scrubbed — the shell is re-dressed from the community brand (ShellBrand falling back to the config-repo community brand), so the window wears the community's kit without the operator having to click a stack card. If the community-brand source is not yet readable at boot, the shell re-dresses once it becomes readable rather than being stuck on the default look.

Key interfaces:

  • dressShell(foundingClient, brand) (app/src/lib/shellBrand.ts) — the function that applies brand tokens to :root. It is called at boot and from the shell; it needs to also run on the seat change to operator(community) / when the active founding clears.
  • The seat/session model that drives the shell (the activeFounding / seat the shell watches) — add a re-dress when the seat changes to operator(community).
  • internal/founding.ShellBrand — serves the draft's kit while a draft exists, else the config-repo communityBrand. No change expected unless the community-brand reader is found to be unwired on this path (verify it returns the community kit after scrub).

Acceptance criteria:

  • A unit test asserts the shell is re-dressed (:root brand tokens applied from the community brand) when the seat changes to operator(community) / the active founding clears, without a stack-card click.
  • After hand-off completes and the draft is scrubbed, the shell wears the community's kit (logo/colours), not the default look.
  • If the community-brand source is unreadable at boot, the shell re-dresses once it becomes readable (no permanent default-look stuck state).
  • The health-board card brand scoping (applyBrandTokens(tokens, el), DDR 0302) is unchanged — the card still paints its own community's brand; this fixes only the shell-level dress.
  • App unit suite, vue-tsc, eslint clean.

Out of scope:

  • The per-card brand on the health board (DDR 0302, shipped #2165) — unchanged.
  • Any change to ShellBrand's draft-first precedence (the wizard preview must still win while a draft exists, DDR 0151).
  • The live drive proving the shell paints branded after a real hand-off — owed as drive proof after the fix lands; tracked by the standing drive issue.

Ruled by agent under ADR 0174 — veto anytime.
Ruling: ready-for-agent. Two-way door: re-dressing the shell on a seat change is additive, revertible per commit, and proven by the unit test named above. Not on the one-way-door list — purely cosmetic shell theming, no credentials, no security posture, no member-facing trust accept, no data destruction, no spend. The design contract (DDR 0151 / DDR 0302) already exists, so no needs-design gate applies.

> *This was generated by AI during triage.* ## Agent Brief **Category:** bug **Summary:** After hand-off, the operator-app shell shows the default look instead of the community's brand kit until a stack card is clicked. Re-dress the shell when the seat becomes operator(community) / when the founding ends, and after the community-brand source is readable. **Current behavior:** After the hand-off finishes (the founding draft is scrubbed), the shell wears the default look. Clicking a piece of the stack on the health board paints the brand — because `HealthBoard.vue` applies the brand scoped to its own element via `applyBrandTokens(tokens, el)` — but the **shell itself** (`:root`) is never re-dressed, so the window chrome stays default. Why: `dressShell` (`app/src/lib/shellBrand.ts`) dresses `:root` at boot and from the wizard's previews. `internal/founding.ShellBrand` serves the **draft's** kit while a draft exists, then falls back to the community-brand reader (the config-repo header) once the draft is gone. After the scrub there is no draft, so the shell brand depends on (a) the community-brand reader being wired and readable, and (b) the shell re-asking. The boot dress either ran before the community-brand source was readable, or the shell is simply never re-dressed when the founding ends (draft → scrubbed). The card paints (own-element scope) while the shell does not — exactly the symptom. **Desired behavior:** When the seat transitions to operator(community) — i.e. a founding ends and its draft is scrubbed — the shell is re-dressed from the community brand (`ShellBrand` falling back to the config-repo community brand), so the window wears the community's kit without the operator having to click a stack card. If the community-brand source is not yet readable at boot, the shell re-dresses once it becomes readable rather than being stuck on the default look. **Key interfaces:** - `dressShell(foundingClient, brand)` (`app/src/lib/shellBrand.ts`) — the function that applies brand tokens to `:root`. It is called at boot and from the shell; it needs to also run on the seat change to operator(community) / when the active founding clears. - The seat/session model that drives the shell (the `activeFounding` / seat the shell watches) — add a re-dress when the seat changes to operator(community). - `internal/founding.ShellBrand` — serves the draft's kit while a draft exists, else the config-repo `communityBrand`. No change expected unless the community-brand reader is found to be unwired on this path (verify it returns the community kit after scrub). **Acceptance criteria:** - [ ] A unit test asserts the shell is re-dressed (`:root` brand tokens applied from the community brand) when the seat changes to operator(community) / the active founding clears, without a stack-card click. - [ ] After hand-off completes and the draft is scrubbed, the shell wears the community's kit (logo/colours), not the default look. - [ ] If the community-brand source is unreadable at boot, the shell re-dresses once it becomes readable (no permanent default-look stuck state). - [ ] The health-board card brand scoping (`applyBrandTokens(tokens, el)`, DDR 0302) is unchanged — the card still paints its own community's brand; this fixes only the shell-level dress. - [ ] App unit suite, `vue-tsc`, eslint clean. **Out of scope:** - The per-card brand on the health board (DDR 0302, shipped #2165) — unchanged. - Any change to `ShellBrand`'s draft-first precedence (the wizard preview must still win while a draft exists, DDR 0151). - The **live drive** proving the shell paints branded after a real hand-off — owed as drive proof after the fix lands; tracked by the standing drive issue. --- **Ruled by agent under ADR 0174 — veto anytime.** Ruling: `ready-for-agent`. Two-way door: re-dressing the shell on a seat change is additive, revertible per commit, and proven by the unit test named above. Not on the one-way-door list — purely cosmetic shell theming, no credentials, no security posture, no member-facing trust accept, no data destruction, no spend. The design contract (DDR 0151 / DDR 0302) already exists, so no `needs-design` gate applies.

swarm-claim host=matou-dev-server-01 run=63574
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=63574 (automated multi-host claim — lowest live claim id works this ticket)

⏩ independent reviewer for #2191 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #2191 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #2191 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261111-124446-e72d38 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 2191,
  "status": "success",
  "commits": [
    "c089f567e236a668f6d14ecdc2937e003e37b4f4"
  ],
  "changed_files": [
    "app/src/components/AppShell.vue",
    "app/tests/unit/appShell.test.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "CI=true npx vitest run tests/unit/appShell.test.ts (app/)",
      "exit_code": 0
    },
    {
      "command": "CI=true npx vue-tsc -p tsconfig.json --noEmit (app/)",
      "exit_code": 0
    },
    {
      "command": "CI=true npx eslint app/src/components/AppShell.vue app/tests/unit/appShell.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A unit test asserts the shell is re-dressed (:root brand tokens applied from the community brand) when the seat changes to operator(community) / the active founding clears, without a stack-card click": "app/tests/unit/appShell.test.ts: 're-dresses :root off the community brand when the seat answers operator, without a stack-card click' — UnreadSeat answers operator -> document.documentElement --oc-accent becomes #619793 (the brand-tokens op's kit), no card interaction. Red before the AppShell watch, green after.",
    "After hand-off completes and the draft is scrubbed, the shell wears the community's kit (logo/colours), not the default look": "AppShell.vue: watch on activeSeatSource.seat().kind === 'operator' calls dressShell(activeFounding, brand) -> :root wears the community kit; the scrub flips the seat to operator (the config header now readable). Proven by the seam test above.",
    "If the community-brand source is unreadable at boot, the shell re-dresses once it becomes readable (no permanent default-look stuck state)": "AppShell.vue: the re-dress fires on the seat's flip to operator, which (like the brand) comes from the config replica syncing; the test models exactly this — UnreadSeat holds unread at boot (nothing dressed), then answers operator and the shell dresses.",
    "The health-board card brand scoping (applyBrandTokens(tokens, el), DDR 0302) is unchanged — the card still paints its own community's brand; this fixes only the shell-level dress": "HealthBoard.vue untouched (not in changed_files); the new watch writes :root only via dressShell, never a card element.",
    "App unit suite, vue-tsc, eslint clean": "vue-tsc exit 0, eslint exit 0, appShell suite 23/23 green; the only app-suite failures (boot.test.ts, updatesFeed.test.ts) are spawnSync go ENOENT — the go toolchain is absent on this sandbox (CI runs under nix develop .#go-ci), unrelated to this TS-only change."
  },
  "summary": "The operator-app shell re-dresses :root off the community brand the moment the seat answers operator(community), so the window wears the kit after a hand-off without an Open/stack-card click.",
  "blockers": []
}
**close-report** for #2191 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261111-124446-e72d38` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2191, "status": "success", "commits": [ "c089f567e236a668f6d14ecdc2937e003e37b4f4" ], "changed_files": [ "app/src/components/AppShell.vue", "app/tests/unit/appShell.test.ts", "STATUS.md" ], "tests": [ { "command": "CI=true npx vitest run tests/unit/appShell.test.ts (app/)", "exit_code": 0 }, { "command": "CI=true npx vue-tsc -p tsconfig.json --noEmit (app/)", "exit_code": 0 }, { "command": "CI=true npx eslint app/src/components/AppShell.vue app/tests/unit/appShell.test.ts", "exit_code": 0 } ], "criteria": { "A unit test asserts the shell is re-dressed (:root brand tokens applied from the community brand) when the seat changes to operator(community) / the active founding clears, without a stack-card click": "app/tests/unit/appShell.test.ts: 're-dresses :root off the community brand when the seat answers operator, without a stack-card click' — UnreadSeat answers operator -> document.documentElement --oc-accent becomes #619793 (the brand-tokens op's kit), no card interaction. Red before the AppShell watch, green after.", "After hand-off completes and the draft is scrubbed, the shell wears the community's kit (logo/colours), not the default look": "AppShell.vue: watch on activeSeatSource.seat().kind === 'operator' calls dressShell(activeFounding, brand) -> :root wears the community kit; the scrub flips the seat to operator (the config header now readable). Proven by the seam test above.", "If the community-brand source is unreadable at boot, the shell re-dresses once it becomes readable (no permanent default-look stuck state)": "AppShell.vue: the re-dress fires on the seat's flip to operator, which (like the brand) comes from the config replica syncing; the test models exactly this — UnreadSeat holds unread at boot (nothing dressed), then answers operator and the shell dresses.", "The health-board card brand scoping (applyBrandTokens(tokens, el), DDR 0302) is unchanged — the card still paints its own community's brand; this fixes only the shell-level dress": "HealthBoard.vue untouched (not in changed_files); the new watch writes :root only via dressShell, never a card element.", "App unit suite, vue-tsc, eslint clean": "vue-tsc exit 0, eslint exit 0, appShell suite 23/23 green; the only app-suite failures (boot.test.ts, updatesFeed.test.ts) are spawnSync go ENOENT — the go toolchain is absent on this sandbox (CI runs under nix develop .#go-ci), unrelated to this TS-only change." }, "summary": "The operator-app shell re-dresses :root off the community brand the moment the seat answers operator(community), so the window wears the kit after a hand-off without an Open/stack-card click.", "blockers": [] } ``` </details>
Author
Owner

The close-report above closed this against worker branch sandcastle/worker/20261111-124446-e72d38, but the land never reached main (main sat at 4e31fe43 from 2026-11-11 13:03 UTC to 2026-11-16 with no reopen notice — the #283 shape, unflagged). Merged by hand at Ben's request: 8c0fc34b on main carries c089f567. tests/unit/appShell.test.ts 23/23 and vue-tsc --noEmit clean on the merge. Not yet seen in a built app.

The close-report above closed this against worker branch `sandcastle/worker/20261111-124446-e72d38`, but the land never reached `main` (main sat at 4e31fe43 from 2026-11-11 13:03 UTC to 2026-11-16 with no reopen notice — the #283 shape, unflagged). Merged by hand at Ben's request: **8c0fc34b** on main carries c089f567. `tests/unit/appShell.test.ts` 23/23 and `vue-tsc --noEmit` clean on the merge. Not yet seen in a built app.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#2191
No description provided.