dashboard: BrandKit apply and preview failures show stale-green #301

Closed
opened 2026-08-05 23:11:06 +00:00 by ben · 1 comment
Owner

dashboard/src/components/shell/BrandKitScreen.vue:

  • :222 onApply is try/finally with no catch: a failed apply resets applying so the button re-enables, emits no applied, shows nothing — the kit appears not to save with no explanation.
  • :206, :212, :252, :253 — void props.seam.compilePreview(…).then(…) / .validate(…).then(…) with no .catch: a failure leaves the preview and coverage report rendering the previous kit's tokens — stale-green on a live preview.

Acceptance

  • Apply failure renders an error with retry; preview/validate failures mark the preview stale/errored rather than silently showing old tokens.
  • Vitest per path.

Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).

`dashboard/src/components/shell/BrandKitScreen.vue`: - **:222** `onApply` is try/finally with **no catch**: a failed apply resets `applying` so the button re-enables, emits no `applied`, shows nothing — the kit appears not to save with no explanation. - **:206, :212, :252, :253** — `void props.seam.compilePreview(…).then(…)` / `.validate(…).then(…)` with no `.catch`: a failure leaves the preview and coverage report rendering the **previous** kit's tokens — stale-green on a live preview. **Acceptance** - Apply failure renders an error with retry; preview/validate failures mark the preview stale/errored rather than silently showing old tokens. - Vitest per path. --- _Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code)._
Author
Owner

Fixed in 1e481c9 (on origin/main).

BrandKitScreen.vue now fails loud on both paths:

  • Apply routes through useAsyncGuard — a failed apply renders OcErrorState (data-status="brand-kit-apply-error") with an Apply-again retry and emits no applied; its busy also guards the double-submit the old applying flag did.
  • compile-preview / validate (all four call sites — mount + edit) run through guarded helpers (compilePreviewNow / validateNow); on rejection a stale marker is set and a single OcErrorState (data-status="preview-stale", Recompile retry) renders over the preview column, so the previous kit's tokens are never passed off as fresh. Each marker clears on its own next success.

Red-first Vitest in brandKitTheming.test.ts (+4): failed apply ⇒ error + retry, no applied; failed compile-preview ⇒ stale; failed validate ⇒ stale; retry recompiles clean ⇒ stale clears. Full dashboard suite 947 green, vue-tsc + eslint clean.

Fixed in 1e481c9 (on origin/main). `BrandKitScreen.vue` now fails loud on both paths: - **Apply** routes through `useAsyncGuard` — a failed apply renders `OcErrorState` (`data-status="brand-kit-apply-error"`) with an Apply-again retry and emits no `applied`; its `busy` also guards the double-submit the old `applying` flag did. - **compile-preview / validate** (all four call sites — mount + edit) run through guarded helpers (`compilePreviewNow` / `validateNow`); on rejection a stale marker is set and a single `OcErrorState` (`data-status="preview-stale"`, Recompile retry) renders over the preview column, so the previous kit's tokens are never passed off as fresh. Each marker clears on its own next success. Red-first Vitest in `brandKitTheming.test.ts` (+4): failed apply ⇒ error + retry, no `applied`; failed compile-preview ⇒ stale; failed validate ⇒ stale; retry recompiles clean ⇒ stale clears. Full dashboard suite 947 green, `vue-tsc` + eslint clean.
ben closed this issue 2026-08-06 00:35:18 +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#301
No description provided.