You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
metadata: @label is unregisterable on view.* though columns-file.ts's fieldLabel() reads it #353
But no provider registers a label attribute on any view.* subtype. presentation/view/view-constants.ts enumerates the full set of registered view subtypes — base, text, textarea, date, month, hotlink, dropdown, radio, checkbox, number, password, hidden, web, currency, image — and the only view-scoped attrs registered anywhere in the metadata package are locale on view.currency (VIEW_CURRENCY_ATTR_LOCALE) and, via the separate metaobjects-ui-web provider, rows on view.textarea plus five attrs on view.image. label is not among them, on any subtype.
Authoring @label on a view node fails metadata load with an error to the effect of:
Unknown attribute 'label' on view.currency 'display' — not declared by any registered provider for view.currency
(entity/view names above are illustrative, not from a specific repro — the error shape is what matters).
The result: fieldLabel()'s override branch is permanently unreachable. Every generated grid header falls back to humanize(field.name), so a field like a decimal cost column renders as "Cost Usd" rather than any human-chosen label, with no way to override it from metadata.
This is the same shape as #349 (@emitRoutes and friends): codegen reads vocabulary that nothing registers, so the feature it implies is dead on arrival regardless of how a consumer tries to author it.
Suggested fix
Register a generic label string attribute against view.base (or the closest common ancestor all view subtypes inherit from), the way other view-scoped attrs (locale, rows, the view.image set) are registered per-subtype today. A single base-level registration would make it available to every subtype fieldLabel() already reads from.
Fixed on main; ships in the next release. The diagnosis is exactly right — fieldLabel()'s override branch was unreachable, and @label is registered nowhere.
The suggested fix is the one thing I did not do, and I want to be explicit about why. Registering a label attribute on view.base would move metamodelVersion (0.13 → 0.14) and oblige all four registries to publish, for a header string only the TypeScript grid emitter reads.
It isn't needed, because the vocabulary already exists. title is a registered common attr on every node, and the metamodel already defines it as "a noun phrase" — which is exactly what a column header is. Probed against the strict loader, with a deliberately bogus attr as a control so the probe couldn't pass vacuously:
That is ADR-0037 step 0 (derivable from what exists → add nothing), and adding a second attribute meaning what title means would be the same-name overload the framework explicitly forbids.
So the fix is the read, not the registry. Authoring is now:
Precedence is view first, then the field itself — a view-level title is the more specific override (this rendering of the field), a field-level one names the field wherever it appears — then humanize(). So you can now also just put @title on the field and skip the view child entirely.
All three read sites moved together (the tanstack columns emitter, codegen-ts's shared labelFor(), and the angular grid emitter), so the emitters can't disagree about which attribute names a column.
Related and now fixed: the deprecated AGENT_DOCS_BODY blob still published from @metaobjectsdev/sdk/agent-docs documented @label as a slot and wrote it in a worked example. That blob is removed in this release — if that is where the spelling came from, that surface is gone.
Activity
dmealing commentedon Aug 31, 2026
Fixed on
main; ships in the next release. The diagnosis is exactly right —fieldLabel()'s override branch was unreachable, and@labelis registered nowhere.The suggested fix is the one thing I did not do, and I want to be explicit about why. Registering a
labelattribute onview.basewould movemetamodelVersion(0.13 → 0.14) and oblige all four registries to publish, for a header string only the TypeScript grid emitter reads.It isn't needed, because the vocabulary already exists.
titleis a registered common attr on every node, and the metamodel already defines it as "a noun phrase" — which is exactly what a column header is. Probed against the strict loader, with a deliberately bogus attr as a control so the probe couldn't pass vacuously:That is ADR-0037 step 0 (derivable from what exists → add nothing), and adding a second attribute meaning what
titlemeans would be the same-name overload the framework explicitly forbids.So the fix is the read, not the registry. Authoring is now:
{ "field.decimal": { "name": "costUsd", "children": [ { "view.currency": { "name": "display", "@title": "Cost (USD)" }} ]}}Precedence is view first, then the field itself — a view-level title is the more specific override (this rendering of the field), a field-level one names the field wherever it appears — then
humanize(). So you can now also just put@titleon the field and skip the view child entirely.All three read sites moved together (the tanstack columns emitter,
codegen-ts's sharedlabelFor(), and the angular grid emitter), so the emitters can't disagree about which attribute names a column.Related and now fixed: the deprecated
AGENT_DOCS_BODYblob still published from@metaobjectsdev/sdk/agent-docsdocumented@labelas a slot and wrote it in a worked example. That blob is removed in this release — if that is where the spelling came from, that surface is gone.fix(codegen-ts,codegen-ts-tanstack,codegen-ts-angular): the generated…
fix(sdk): a second agent-context surface was still published, and sti…
docs(changelog): the four grid/renderer defects, and four landed unit…
fix(codegen): the surface decides which view an emitter reads, not th…
fix(cli): meta types under-reported the registry it is the search for (…
docs(agent-context): the always-on file never named the search it dep…
feat!: remove seven attributes codegen read that no provider registers
docs(audit-skill): drift signature 11 was scoped to SQL; the constant…