Repository navigation
Commit 0641640
docs(cli): name the reader of each
* docs(cli): name the three readers of `_views.<view>.*` separately, per tail
The `pushViewEntries` docblock attributed all three tails it emits to one
browser-side reader: "the convention the runtime resolver reads (`viewLabel` /
`viewDescription` / `viewEmptyState` in @object-ui/i18n)". Measured against
`origin/main` and the objectui checkout, the three tails have three different
readers and the sentence was wrong about two of them:
- `label` is read on BOTH sides — `resolveViewLabel`
(`packages/spec/src/system/i18n-resolver.ts:403`) via `translateView` (:907),
registered as `view:` in `METADATA_DOCUMENT_TRANSLATORS` (:991) from which
`TRANSLATABLE_METADATA_TYPES` is derived (:1008) and read by
`packages/rest/src/rest-server.ts:363`; and `useObjectLabel().viewLabel`
client-side.
- `description` is read SERVER-SIDE ONLY, by `resolveViewDescription` (:424,
called at :908). objectui#7219 removed the
`useObjectLabel().viewDescription()` member, and the objectui source says so
in as many words at `packages/i18n/src/useObjectLabel.ts:485`. The old prose
therefore pointed the reader at a symbol that no longer exists, for a key that
is still resolved and still reaches the screen — the inversion #15180 read as
"declared, accepted, read by nothing".
- `emptyState` is read CLIENT-SIDE ONLY. `emptyState` has zero occurrences in
`i18n-resolver.ts` (positive control in the same file: `description`, 90
occurrences) and `resolveViewEmptyState` has zero occurrences tree-wide
(positive control: `resolveViewLabel`, present), while
`useObjectLabel().viewEmptyState` is live at `useObjectLabel.ts:512`.
The second clause was re-checked rather than carried over and is TRUE: the
platform bundle does carry `sys_user._views.all_users.label`
(`packages/platform-objects/src/apps/translations/en.objects.generated.ts:124`
`_views` → `:128` `all_users` → `label: "All Users"`). Across all nine shipped
`en.objects.generated.ts` bundles, `_views` blocks carry `label` leaves and no
`description` leaf, so naming `.label` there is exact.
`viewLabel` and `viewEmptyState` are NOT retired: objectui kept the
`viewSuffixes` helper all three shared and dropped only the `'description'`
tail. The added warning says that, so the next reader does not over-apply
objectui#7219 and delete two current citations.
`pushViewEmptyState`'s own docblock (:453) names `viewEmptyState` in
@object-ui/i18n and is left untouched — on this measurement it is accurate.
Claude-Session: https://claude.ai/code/session_01TSf4DV7ziu4V5j73e46b7c
Co-authored-by: Claude <noreply@anthropic.com>
* chore(changeset): patch @objectstack/cli for the `_views` reader-per-tail docblock
Measured rather than assumed: `@objectstack/cli` builds with plain
`tsc -p tsconfig.build.json`, so JSDoc survives into
`dist/utils/i18n-extract.js`, which is inside the package's `files[]`. A
comment-only diff therefore moves published bytes here, and `skip-changeset`
would be wrong — the false sentence is text an upgrading agent can grep in the
published tarball. Positive control on the same probe: the docblock's
`sys_user._views.all_users.label` phrase is likewise present in the built
`dist/utils/i18n-extract.js`, and absent from the emitted `.d.ts`.
Claude-Session: https://claude.ai/code/session_01TSf4DV7ziu4V5j73e46b7c
Co-authored-by: Claude <noreply@anthropic.com>
* docs(cli): reconcile objectui's "inert" pin with the server reader of `_views.<view>.description`
Successor pass on the R73 draft. The draft's reader topology re-derived and
CONFIRMED; one omission corrected and the changeset reversed.
Corrected. The draft said "⛔ The absence of a browser-side helper is not
evidence the key is inert" and stopped there. objectui does not merely lack a
helper — it PINS this key as "an inert catalog entry"
(`packages/i18n/src/__tests__/useObjectLabel-view.test.tsx`, a whole `describe`),
and measured across all nine shipped `en.objects.generated.ts` bundles, `_views`
blocks author `label` (104) and `emptyState` (9) leaves and ZERO `description`
leaves. A reader who greps objectui hits "inert catalog entry" and deletes this
emission — the same defect class as the sentence this card is about, aimed the
other way. The block now names both facts, scopes them to the browser path
objectui#7219 removed, and says neither reaches the server reader.
The reach claim is now cited rather than asserted: the overlay lands on the
served view document's `description`, which objectui relays
(`packages/app-shell/src/views/ObjectView.tsx`
`description: viewDef.description ?? listSchema.description`) and renders
(`packages/plugin-list/src/ListView.tsx`, `pickLocalized(schema.description,
displayLocale)`).
Changeset REVERSED to `skip-changeset`. The draft argued `patch` because the
JSDoc is emitted into `dist/utils/i18n-extract.js` inside `files[]`. That premise
is true — re-measured — but it shows bytes moving, not a release. Measured with a
positive control, the docblock reaches NO `.d.ts` (an exported symbol's JSDoc in
the same file does), and `pushViewEntries` is not exported, so nothing a consumer
can call or type against moves. House precedent is directly on point and went the
other way: a comment-only edit to `packages/objectql/src/engine.ts` and
`validation/rule-validator.ts` — a released package that also ships `dist` — took
`skip-changeset` and no changeset file.
Left standing deliberately, both re-measured as ACCURATE: the `pushViewEmptyState`
docblock naming `viewEmptyState` in @object-ui/i18n (live), and the `formViews`
comment naming `viewLabel` (live) — which `packages/lint` quotes verbatim, so
editing it would dangle that citation.
Claude-Session: https://claude.ai/code/session_01TSf4DV7ziu4V5j73e46b7c
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>_views tail per side, and reconcile objectui's inert-key pin (#17721)1 parent f6e37e9 commit 0641640
1 file changed
Lines changed: 35 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
367 | 398 | | |
368 | 399 | | |
369 | 400 | | |
| |||
0 commit comments