Repository navigation
Commit 99e1912
feat(spec): retire the metric sub-caption — the widget translation subCaption key and translateDashboard's options.description overlay (#21342)
Fixes #21257
Clause-②: no (narrowing)
Retires the metric sub-caption at both ends, objectstack first. This
executes ruling **C** on objectstack-ai/objectui#11389 (batch #264 item
5, maintainer 「同意264」), which reverses #5428 item 4. A dashboard widget
keeps one authored description, `widget.description`. It renders as the
card-header subtitle and is translated by the widget node's
`description` key. No `options.description` comeback, and no new
widget-level key.
## What changes
1. **The translation member is retired.** In
`packages/spec/src/system/translation.zod.ts`, `subCaption` on the
widget translation node is now a `retiredKey()` tombstone. Its
prescription is: delete the entry; translate the card subtitle through
the widget's `description` entry; run `os migrate meta --from 17`. The
node is spread into the per-app bundle entry, the platform bundle entry
and the `translation` item, and all three refuse the key.
2. **The overlay is removed.** `translateDashboard` no longer writes
`options.description`, and it carries `options` through by reference.
The `attr` union of `lookupWidgetAttr` drops `'subCaption'`, and the
`WidgetLike.options` and `translateDashboard` docblocks say so.
3. **The census asserts nothing writes the key.**
`scripts/check-widget-option-census.mjs`: `NON_DECLARED_MEMBERS` is
empty. The `description` row left together with its witness and its
self-test cases. The row checks (stale row, witness gone, witness only
in prose) still run against a fixture ledger, through a new `ledger`
parameter on `judge`. A new battery pins `description` coming back into
the census as `UNDECLARED-AND-UNLEDGERED`, and the self-test floor goes
from 16 to 17. The gate's own `WITNESS GONE` text prescribes taking the
key out of the census, so `@objectstack/sdui-parser`'s
`CONSUMED_WIDGET_OPTION_KEYS` drops `description` in the same change. An
authored `options.description` now draws the `unconsumed-widget-option`
warning, which is a warning and fails nothing.
4. **Docblocks** in `ui/dashboard.zod.ts`,
`sdui-parser/src/dashboard-widget-options.ts` and
`platform-objects/.../source-hash.ts` now state the retired state and
point at `widget.description`.
Retirement kit, per `.claude/skills/spec-property-retirement`:
- **D2 conversion.** `translation-widget-sub-caption-removed` (protocol
18, `MAJOR_18_CONVERSIONS` order 55, `retiredAfter: '17.6.0'`). It
strips the key from bundle entries and bare items, and is retired from
the load path. Stored `translation` rows replay it through
`applyConversionsToStoredItem`.
- **D3 entry.** The semantic entry
`translation-widget-sub-caption-retired` and its `STEP18_RATIONALE`
fragment (order 60). The registry region was regenerated with
`gen:migration-registry`.
- **Liveness.** The `translation.json` `dashboards` row has new evidence
and a new note, and `verifiedAt` is 2026-10-02. The member sits below
the ledger's walk boundary, inside the `widgets` record, so it has no
row of its own.
- **Generated.** `content/docs/references/system/translation.mdx` was
regenerated by `check:generated --fix`, which judged only `check:docs`
stale. Nothing was hand-edited.
- **Docs.** `content/docs/ui/translations.mdx` is corrected at the table
row, the callout and the packaged-strings table.
- **Changeset.** `.changeset/21257-widget-sub-caption-retired.md` bumps
`@objectstack/spec`, `@objectstack/sdui-parser` and `@objectstack/lint`
by `minor`. It has a `**BREAKING**` banner, a FROM-to-TO table and the
ADR-0087 marker `registered translation-widget-sub-caption-removed,
translation-widget-sub-caption-retired`.
- **No `RETIRED_KEYS_BY_MAJOR` row.** The key sits under two records,
and the nested-key resolver deliberately does not traverse
`additionalProperties`. The component-copy `submitLabel` retirement
(commit d173125) made the same choice.
## The `subtitle` alias: refused, not repointed
The old table carried `subtitle: 'subCaption'`. With `subCaption`
tombstoned, that row is the shape the alias-integrity audit refuses by
name. Measured by putting the row back in: `alias-integrity.test.ts`
went red with "`subtitle` -> `subCaption` — `subCaption` is a tombstone;
it accepts nothing".
Every precedent in the tree for an alias whose target was retired moves
the alias into `guidance` with a refusal: chart `accessibility` /
`ariaProps`, postgres `passwd` / `pwd`, permission `restore` / `purge`,
app `home` / `homepage` / `landingpage`, and component-copy `submit`.
None of them repoints the alias.
Repointing it at `description` would also silently change what the word
is taken to mean. The alias existed because a `subtitle` on a metric
widget meant the caption under the number. So `subtitle` is now a
`guidance` entry that names both readings: card-header copy belongs
under `description`; a caption under the value has nowhere to render, so
delete it. This keeps the four-axis 「过渡也从紧」 rule: no rename window and
no silent repoint. The change is a refusal message, not an accept-set
change: `subtitle` was never accepted.
## Measurements
- **Producers (objectstack `main` `393ae878d3`, re-read at
`1371dc980c`).**
- `git grep subCaption` over `examples/`, `packages/platform-objects`
and `apps/` returns 0 hits. Control: widget translation entries exist in
the showcase and platform bundles (`widgets:` appears 4 times in
`examples/app-showcase/src/system/translations/index.ts` and once in
each `platform-objects` locale file).
- Authored widget `options` blocks in the 6 `*.dashboard.ts` sources
under `examples/` and `packages/platform-objects`: 0. The two `options:`
hits are global-filter option arrays. Control: `widget.description` is
authored, for example on `pipeline.dashboard.ts`.
- `app-multi-package` has no dashboards.
- So: 0 producers. This is not a stop.
- **objectui pin check (`.objectui-sha` `31971ff1e28f`).** The pinned
objectui still reads `subCaption` and `options.description`:
`useObjectLabel.widgetSubCaption`, `widgetSubCaption.ts`,
`DatasetWidget`, `DashboardRenderer`, and its own `sdui-parser` census.
That is objectui#11389's reader half. It imports no symbol this PR
removes: `git grep` at the pin finds no import of `WidgetLike`,
`translateDashboard` or `lookupWidgetAttr`. Control: the pin does import
from `@objectstack/spec` elsewhere, for example
`spec-symbol-parity.test.ts`. No exported symbol is removed here, and
the bundle-shaped `subCaption` fixtures at the pin are untyped. So there
is no build break, and no sibling fix rides this landing.
- **Lockstep window.** objectui's `CONSUMED_WIDGET_OPTION_KEYS` at the
pin still lists `description`, and objectui#11389 drops it with the
reader. Until then this copy is one member short. That errs in the safe
direction: this copy warns on a key that objectui's strict authoring
face already refuses. `check:sdui-lockstep` compares grammar, codes and
the containment predicate, not this array, and it is green. The window
is documented at the array.
## Verification (final head `8438e24995`, which is `3f1c6d9c4d` with
`origin/main` `1371dc980c` merged)
- `pnpm --filter @objectstack/spec build`, then `check:generated`. 1 of
15 artifacts was stale (`check:docs`), and `--fix` regenerated only that
one.
- Spec tests:
- `vitest run --project local` (at `3f1c6d9c4d`): 597 files, 17487
passed, 1 todo.
- `vitest run --project repo`: 48 files, 849 passed.
- `pnpm --filter @objectstack/spec typecheck`: exit 0.
- Other package tests:
- `@objectstack/sdui-parser`: test 218 passed; typecheck exit 0.
- `@objectstack/lint`: test 5575 passed after the merge; typecheck exit
0.
- `@objectstack/platform-objects` (comment-only change): test 948
passed; typecheck exit 0.
- `node scripts/check-widget-option-census.mjs --self-test`: 17 cases
pass. The real run is green with 5 declared keys in 5 members and 0
non-declared.
- Derived gates. `node scripts/pm/dispatch-gates.mjs --repo
objectstack-ai/objectstack --commands` derived 137 commands at
`8438e24995`. All 137 ran with recorded exit codes, and `--ran`
reconciles: 136 run, 1 NOT-MEASURED, 0 UNRUN.
- The NOT-MEASURED one is `check:pm-dispatch-gates`. Two foreground runs
were killed at the container cap (580s and 560s) before reaching a
verdict; CI runs it.
- Five gates first exited 3 (PREREQUISITE NOT MET) and passed after the
CLI and client-react closures were built: `check:i18n`,
`check:i18n-walk-parity`, `check:skill-examples`,
`check:lean-entry-closure`, `check:dual-build-cjs-loads`.
- **Reverse verification (cross-package type).** I planted `subCaption`
on `widget_total_users` in
`packages/platform-objects/src/apps/translations/en.ts`, which is typed
`TranslationData` through spec's rebuilt `dist`. `tsc --noEmit` went
red: `en.ts(210,69)`, error TS2322, a `string` not assignable to the
`'[REMOVED] Key retired: …': never` mark. The file was restored, the
blob equals HEAD, and `git diff HEAD` is empty. My first attempt was a
no-op: `ablation-replace` refused because the replacement contained the
anchor. It wrote nothing.
- **Ablations, one-shot, each restored to the HEAD blob.**
- Re-adding an `options.description` write in `translateDashboard`
turned the 3 new resolver pins red.
- Swapping the tombstone for `z.string().optional()` turned 3
translation pins red. The `subtitle` pin stays green because it is
independent of the tombstone.
- Restoring the `subtitle -> subCaption` alias turned alias-integrity
red, as quoted above.
- **eslint, a declared narrowing.** I ran `eslint --no-inline-config
--format json` on the 13 changed `.ts` / `.mjs` files: 13 files linted,
0 errors, 0 warnings, and none ignored, because an ignored file would
have shown as a warning. `eslint.config.mjs` states that type-aware
linting is never enabled (no `parserOptions.project`), so this diff
cannot move a verdict on an untouched file. The repo-wide `pnpm lint`
belongs to CI.
## Acceptance notes
- Two example comments still describe the dataset-bound read set as
"plus the `description` sub-caption":
`examples/app-crm/src/dashboards/pipeline.dashboard.ts:41` and
`examples/app-todo/src/dashboards/task.dashboard.ts:22`. That is true of
objectui's renderer at the pin, and false once objectui#11389 lands.
These are comments only and outside the claimed file surface, so they
are not edited here. No carrier is named.
- `DashboardWidgetOptionsSchema` stays `passthrough`, as ruled when the
bag was opened, so the spec still parses an authored
`options.description`. What now names it is the
`unconsumed-widget-option` warning at `os validate`, `os build` and `os
lint`. This is an observation, not a finding: 0 producers were measured.
- The card body asked for `Clause-②: yes (narrowing)`. The measured arm
is `no (narrowing)`, which matches the claim: no surface widens. The
`subtitle` change alters a refusal message only, and the new conversion
and semantic entries are registry rows, not an accept-set or export
widening.
- `#20274` regenerates `liveness/state-counts*` and
`content/docs/references/**`. This PR changes no state count; the
`dashboards` row stays `live`. It does change
`references/system/translation.mdx`. If the two collide, the second to
land regenerates through `scripts/pm/os-regen-merge.sh`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01UtnxvdiN376GF3sgXwAw4d)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6c5bef5 commit 99e1912
17 files changed
Lines changed: 573 additions & 206 deletions
File tree
- .changeset
- content/docs
- references/system
- ui
- packages
- lint/src
- platform-objects/src/apps/translations
- sdui-parser/src
- __tests__
- spec
- liveness
- src
- conversions
- migrations
- entries/semantic
- system
- ui
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
| 432 | + | |
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
188 | | - | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
| |||
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
| |||
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
| 194 | + | |
| 195 | + | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
207 | 221 | | |
208 | 222 | | |
209 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | | - | |
118 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
122 | | - | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| |||
0 commit comments