Repository navigation
Commit bb68488
fix(i18n): render I18nLabel objects at the 13 remaining sites (#4208)
* retire(studio): drop the global_nav designer surfaces with the rc.6 spec bump (objectstack#7100)
`global_nav` was an `ACTION_LOCATIONS` member no running-app surface ever
rendered — the console's ⌘K palette reads no action metadata at all — and the
Studio designer previewed a mock command-palette frame for it anyway.
@objectstack/spec 17.0.0-rc.6 retired the member (objectstack#6888, maintainer
ruling 2026-08-09 direction 2); this removes the designer surfaces that outlived
it, plus the bump that makes them stop compiling.
- ActionPreview.tsx: the mock ⌘K placement frame is gone. The metadata strip
still echoes the declared token, deliberately — reporting what a draft says is
honest; the frame CLAIMED the platform renders it.
- ActionDefaultInspector.tsx: the `LOCATION_LABELS` entry is gone. The map is
`Record<ActionLocation, string>`, so the retirement arrived as a compile error
(objectui#3017's mechanism firing as designed).
- block-config.ts + both locale tables: the palette option and its now-orphaned
i18n key.
- components' action:bar doc comment aligned (its enum is `[...ACTION_LOCATIONS]`
and followed on its own).
- ActionEngine.getActionsForLocation is UNCHANGED: narrowing it would be a second
rejection point beside the schema's. The type and `ActionLocationSchema` are the
enforcement, both pinned.
The bump (all 37 `@objectstack/*` declarations, rc.5 -> rc.6) rides along because
the two cannot compile apart, and its fallout is repaired here: the `…Input` alias
retirement (types/theme, types/spec-report, core/ActionRunner), the five dead i18n
re-exports, the `I18nLabel` widening at 8 render sites, `.extend` -> `.safeExtend`
on a now-refined `GlobalFilterSchema`, and two parity lists re-pointed.
NOT green: the bump's remaining surface is out of this card's scope and filed —
objectui#4165 (contract conflict, blocks), #4167 (adaptation remainder),
#4163 (I18nLabel consumer story), #4164 (name reclaim available).
Part of objectstack-ai/objectstack#7100
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
* fix(deps): repair the rc.6 fallout the first pass missed, and pin the one conflict
Second pass over the @objectstack/spec 17.0.0-rc.6 bump. The first commit fixed
every COMPILE error; a full `vitest run` (14615 tests) then surfaced the runtime
half. All mechanical, each pinned; the one non-mechanical case is left as a
tripwire rather than decided.
- types/zod/complex.zod.ts: `GlobalFilterSchema` composes by spreading the spec's
`.shape`. rc.6 closed BOTH extension doors on a now-refined schema — `.extend()`
throws at module load, `.safeExtend()` types the three overridden keys as
`never` (TS2322, which only `apps/site`'s build caught). The spread preserves
rc.5 behaviour exactly and decides nothing: the refinement-vs-stored-`{preset}`
conflict is objectui#4165, pinned by a new tripwire that reds from either side.
The pin isolates the refinement by widening `defaultValue` first — the bare spec
schema rejects `{preset}` on the OLD field type and the refinement never runs,
so the obvious shorter assertion would have pinned the wrong thing.
- core/actionKeys.ts: `description` joins SPEC_ACTION_KEYS (rc.6 added it to
`ActionSchema`). Inventory only — `ActionDef` is untouched.
- metadata-admin flow tests x2: `FlowNodeSchema` became pipe-wrapped, so `.shape`
read `undefined`. Access-path repair (walk the wrapper); the blocks themselves
are unchanged upstream, and a non-vacuity guard now says so.
- clientValidation.optOuts: INVERTED — rc.6 makes `SharingRuleSchema` declare the
seven ADR-0010 envelope keys, so the create door now ACCEPTS a stamped
`_packageId`. Upstream convergence, pinned as accept, with a bogus-key case
proving the door is still a door.
- clientValidation.viewDiagnostics: fixture supplies a `label`; rc.6's widened
`I18nLabel` made every label a LEAF union, which #3606's root-union expansion
does not reach. The resulting bare `Invalid input` is recorded as its own pin
(objectui#4163), not papered over.
- components/record-picker parity: fixture drops `displayField` — an ADR-0087 D2
tombstone refused by name, which was failing all three `filter` assertions.
- console registry parity: `SPEC_SHAPE_EMPTY_ON_THE_PIN` deleted exactly as its
own self-clearing test instructed (rc.6 lands `PageContainerProps`), with a
tombstone assertion so the deletion cannot be silently undone.
- i18n residue ratchet: matches `const { t, … } = useObjectTranslation(` by
pattern. Both sidebars legitimately also take `language` now, to resolve the
spec's inline per-locale labels.
Still red, filed, NOT fixed here: 2 console-parity exemption-list entries and
`check:spec-symbols`' 13 name collisions (objectui#4167) — each is per-symbol
triage, not a mechanical edit — and objectui#4165, which blocks ready.
Part of objectstack-ai/objectstack#7100
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
* fix(deps): triage the 14 rc.6 spec-symbol collisions and refresh the console parity exemptions (#4167)
objectui#4167, objectstack#4115. `check:spec-symbols` reported 13 collisions on
the @objectstack/spec 17.0.0-rc.6 bump and a 14th (`GlobalFilterSchema`) appeared
during the bump itself; each is triaged on its own rather than blanket-renamed.
Renamed (3) — the spec's same-named export means something else:
MetadataState -> MetadataCacheState (react, app-shell)
resolveI18nLabel -> resolveKeyedI18nLabel (react, app-shell, + apps/console)
DateRangePreset -> FilterBuilderDateRangePreset (types)
Bound or derived (10): DATE_RANGE_PRESETS (+ a `satisfies` completeness pin on
the local bounds table), NavigationMode (+ a both-directions type pin),
AddressValue, BreakpointColumnMap, BreakpointOrderMap, KanbanConfig,
CalendarConfig, GanttConfig. Four copies were losing information: GanttConfig
declared 6 of the spec's 17 keys while plugin-gantt reads all of them,
AddressValue 5 of 7 parts, and DATE_RANGE_PRESETS was the third copy
objectstack#4614 extracted the vocabulary to collapse.
ALLOW (1): GlobalFilterSchema, the same `.shape`-spread dialect as
SelectOptionSchema beside it — it collided only because rc.6's refinement forced
`.extend()` to be respelled, moving a derivation the guard could see into an
object literal it deliberately does not descend into. Nothing about #4165 is
encoded.
Console registry-inputs-spec-parity: all 12 off-spec exemptions deleted (rc.6
landed objectstack#6776 and objectstack#5775, verified per key against the
resolved shape), and `element:record_picker` publishes `sort` / `limit` /
`emptyText` — read by the renderer all along, and the red demanding them was
predicted in writing by the exemption it replaces. 49 tests/2 failing -> 51/0.
Also repairs 3 pre-existing type-check errors of this card's own rc.6 family,
found only by running `type-check` (which the bump PR did not): the retired
`ThemeInput` alias re-pointed BY SIDE, and `DroppedFieldsEvent.reason`'s new
`primary_key` arm. The consumer gap that arm exposes is objectui#3935.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
* fix(i18n): render I18nLabel objects at the 13 remaining sites
`@objectstack/spec` 17.0.0-rc.6 widened `I18nLabel` from `string` to
`string | Record<string, string>`, so an author may inline a per-locale map
(`label: { en: 'Owner', 'zh-CN': '负责人' }`) anywhere the spec accepts a
display label. PR #4169 repaired eight such sites; thirteen more were invisible
to it because the five packages involved build through vite/rolldown, so
`turbo run build` never type-checks their sources — only `turbo run type-check`
does.
Read sites now resolve the map to the viewer's locale instead of reaching a
text node as `[object Object]`:
- `@object-ui/layout` — `NavigationArea.label` (area switcher button + tooltip)
- `@object-ui/plugin-list` — `ViewTab.label` (pill row, dropdown trigger, menu)
- `@object-ui/plugin-dashboard` — `DashboardWidget.title` (heading + attribute)
- `@object-ui/plugin-designer` — `DashboardWidget.title` (card + preview tile)
- `@object-ui/app-shell` — `ActionParam.label` and each option's `label`,
fixed on the `RawActionParam` DECLARATION rather than on the test that
surfaced it
Two edges are deliberate rather than mechanical:
`DashboardEditor`'s title `<input>` is an authoring WRITE, not a display.
Resolving a map into it and writing `e.target.value` back would collapse every
other locale on the first keystroke, so the write is GUARDED — a map-valued
title renders resolved and read-only, and survives an unrelated edit-and-save
round trip untouched. The type error dies from the guard, not from a cast.
What Studio should actually offer for authoring a per-locale label is #4163
part 2, which stays unclaimed and pending design.
`@object-ui/layout` carries no i18n dependency by design (its whole i18n story
is injection), so it uses the PRODUCER's resolver — `resolveI18nLabel` from
`@objectstack/spec/ui` — at the spec's documented `en` default rather than
hand-rolling a resolution that could drift. The three plugin packages sit
inside objectui's i18n tree and already hold the live language, so they use
`pickLocalized`; `plugin-list/src/__tests__/i18nLabel-resolver-parity.test.ts`
pins the two resolvers limb for limb so the runtime dashboard and the
designer's preview of it cannot start disagreeing about which entry wins.
Also re-points four `plugin-list` type-test assertions at `ViewTabParsed`:
rc.6's `…Input`-alias retirement moved the bare `ViewTab` onto the input side,
so following the NAME left them comparing the authoring side against itself.
Invisible until now because `type-check` is `tsc --noEmit && tsc -p
tsconfig.typetests.json` and the `&&` never reached that project.
Part of #4163
* fix(rc.6): finish the rc.6 adaptation the train never saw
Three residual reds on main after the rc.5→rc.6 spec bump (#4169), none of
which the train cars themselves covered.
QUICK_REFERENCE.md's "Current Release" block still quoted `^17.0.0-rc.5` for
both `@objectstack/spec` and `@objectstack/client` while every manifest it
names as its anchor declares `rc.6`. The pin test for that block
(quick-reference-current-release-4143) landed on main AFTER the train was
built, so no car ever ran against it.
recordDetailsInputs.spec-parity carried `layout: 'custom'` in both fixtures of
its object-sections case. `layout` was removed in @objectstack/spec 17.0.0
(objectstack#6946, ADR-0087 D2) and rc.6 gave it a named `never` rejection, so
the object-form fixture failed on `layout` while its `sections` were valid —
and the id-list fixture above it kept PASSING on `layout`'s own `invalid_type`
without ever reaching `sections`. Dropping the key puts both verdicts back on
`sections`; the id-list case now also pins the issue PATH, since a bare code
could not tell the two rejections apart.
AddressField re-exports `AddressValue` through its declaring module rather than
bare. main's #4222 moved the declaration into the pure `address-format` module
while this train re-sourced the type from `@objectstack/spec/data`; the merge
keeps both by importing the spec type in `address-format` (where the definition
now lives) and letting the widget re-export from there, which is the form
check:spec-symbols resolves to a declaration site instead of reading as a
second local declaration of a name the spec owns.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6314e87 commit bb68488
67 files changed
Lines changed: 1926 additions & 340 deletions
File tree
- .changeset
- apps/console/src
- __tests__
- pages/system
- packages
- app-shell/src
- chrome
- console
- ai
- home
- hooks
- layout
- __tests__
- providers
- utils
- views
- components/src/renderers
- basic
- data-display
- core/src/utils
- __tests__
- data-objectstack/src
- fields/src/widgets
- layout
- src
- __tests__
- plugin-dashboard/src
- __tests__
- plugin-designer/src
- __tests__
- plugin-detail/src/__tests__
- plugin-list/src
- __tests__
- components
- __tests__
- react/src
- context
- hooks
- __tests__
- utils
- types/src
- __tests__
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| 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 | + | |
| 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 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 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 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
0 commit comments