|
| 1 | +--- |
| 2 | +"@objectstack/spec": patch |
| 3 | +"@objectstack/lint": patch |
| 4 | +--- |
| 5 | + |
| 6 | +fix(spec): classify the 22 dashboard widget keys and refuse undeclared container inheritance (#4956) |
| 7 | + |
| 8 | +The spec liveness ledger's `dashboard.widgets` entry carried one blanket `live` |
| 9 | +verdict plus a `note` asserting that the per-widget props were *"classified in |
| 10 | +the DashboardWidgetSchema subtree"*. **No such subtree ever existed.** The gate's |
| 11 | +walk drills one level and only through an explicit `children`, and `widgets` |
| 12 | +declared none — so all 22 authorable keys of the strict `DashboardWidgetSchema` |
| 13 | +were never classified, never counted as unclassified, and every run printed |
| 14 | +"all governed-type properties are classified" anyway. |
| 15 | + |
| 16 | +That gap — not evidence — is what carried `widgets[].responsive` through the |
| 17 | +#3896 inert-key sweep that removed both its sibling `widgets[].performance` and |
| 18 | +its literal namesake `view.responsive`. `view` is drilled through `children`, so |
| 19 | +`list.responsive` got asked and went out; `widgets` was never asked. It was |
| 20 | +finally retired in #4876 / PR #4995, by hand, four days late. |
| 21 | + |
| 22 | +**What changed for authors** |
| 23 | + |
| 24 | +The `objectstack build` / `objectstack lint` advisory now covers dashboards, so |
| 25 | +five widget keys warn at build time (they never did before — `dashboard` was not |
| 26 | +in the lint's type collections, because until now its ledger warned on nothing): |
| 27 | + |
| 28 | +| Widget key | Why it warns | What to do instead | |
| 29 | +| :--- | :--- | :--- | |
| 30 | +| `widgets[].colorVariant` | no render path reads the top-level key — only the authoring panels do | move it under `options` (the inline metric card reads it there); the dataset-bound path has no colour affordance | |
| 31 | +| `widgets[].actionUrl` | no renderer draws a per-widget action button; every `actionUrl` the dashboard renderer reads belongs to `header.actions[]` | use `dashboard.header.actions[]` | |
| 32 | +| `widgets[].actionType` | pairs with the above | as above | |
| 33 | +| `widgets[].actionIcon` | zero readers in either repo | as above | |
| 34 | +| `widgets[].aria` | declared ARIA attributes never reach the DOM — the same false-compliance shape as the dashboard-level `aria` removed in 17.0.0 | delete it; the renderer emits its own `aria-*` | |
| 35 | + |
| 36 | +Advisory only — the build never fails on these. **Nothing is removed and no |
| 37 | +runtime behaviour changes**: this records verdicts, it does not act on them. |
| 38 | +Enforce-or-remove (ADR-0049) for the five is tracked separately. |
| 39 | + |
| 40 | +Two verdicts worth knowing because they cut the other way: `requiresService` is |
| 41 | +**live** — it reads as inert in the renderer repo but the REST layer strips |
| 42 | +widgets whose service is unregistered (ADR-0057 D10) — and `compareTo` is live |
| 43 | +on the inline chart path only; on the ADR-0021 dataset path the string arms are |
| 44 | +dropped and `{ offset }` fails in the analytics executor. |
| 45 | + |
| 46 | +**What changed for the gate** |
| 47 | + |
| 48 | +`pnpm --filter @objectstack/spec check:liveness` gains a third direction. A |
| 49 | +ledger entry sitting on a container property must now declare one of exactly |
| 50 | +three dispositions, all of them data: **drilled** (`children`), **deferred** (a |
| 51 | +`{ container, to }` row naming the coordinate that does classify the subtree), |
| 52 | +or **recorded** (a row in the shrink-only |
| 53 | +`scripts/liveness/undrilled-containers.baseline.json`). A container in none of |
| 54 | +the three fails, and so does a baseline row whose container has since been |
| 55 | +drilled. |
| 56 | + |
| 57 | +A deferral is **resolved, not believed** — the target must exist (a governed |
| 58 | +type root, or a drilled `type/prop` coordinate) and classify exactly the |
| 59 | +container's child keys; a dangling or drifted target fails. That is the #4956 |
| 60 | +claim itself, made checkable: pointing a deferral at `DashboardWidgetSchema` |
| 61 | +now produces a build failure naming it, where the same words in a `note` were |
| 62 | +believed for a release. |
| 63 | + |
| 64 | +Every run reports both populations (today: 58 containers / 292 child keys |
| 65 | +classified nowhere, plus 6 resolved deferrals covering 248), `--undrilled` |
| 66 | +prints the worklist, and the success line no longer claims a completeness it |
| 67 | +does not have. |
0 commit comments