Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(detail): inline-edit an address as sub-fields, not a text box reading [Object] - #4222

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-4216-inline-address-input
Aug 11, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-4216-inline-address-input

Conversation

@yinlianghui

Copy link
Copy Markdown
Contributor

Fixes #4216

Inline-editing an address on the record detail page collapsed it to one text box reading [Object], and saving wrote a bare string over the structured value. location and geolocation are fixed with it — same cause, same two signatures, one defect in three spellings.

Cause

InlineFieldInput's type switch routes the scalar and relational families to dedicated widgets. Every structured-object type matched nothing and fell through to the terminal raw text input at the end of the component, which stringifies through coerceToSafeValue. That helper's general-object case extracts name || label || externalId || id || _id and otherwise returns the literal [Object] — and an address ({ street, city, state, postalCode, country }) or a coordinate pair ({ latitude, longitude }) carries none of those keys.

The defect has two halves and the second is the damaging one:

  1. Display — the edit box reads [Object], so [Object] is what the user sees as the value they are correcting, which makes typing over it the natural gesture.
  2. Write — that box is a plain text input wired to onChange(v), so whatever is typed is emitted as a string replacing the whole object on save. An ordinary double-click inline edit destroys the sub-field structure.

Input path only. #4037 / PR #4215 fixed the display registry, so read mode — including the inline-edit read state before editing starts — already renders a formatted address; once a field is actively being edited, DetailSection renders InlineFieldInput instead, which is why that PR does not touch this.

The fix

Route address, location and geolocation to the widgets the create/edit dialog already uses — AddressField, LocationField, GeolocationField, the form's own structured-value editors (fieldWidgetMap, and FieldEditWidget's "structured-value editors" block). No new editor, and no consumer-side tolerance: the two entry points now cannot diverge on the value shape they write back.

coerceToSafeValue is untouched. Adding an address branch there would only have improved the display half while leaving the write half intact; the routing is what stops these values from reaching it at all, which makes the branch unnecessary rather than merely unwritten.

autoFocus follows the numeric branches' convention — each widget forwards the DOM pass-through set onto its first focusable sub-input (street / the coordinate box / latitude), so entering inline edit lands the caret where a single-input type would. Commit/cancel semantics are unchanged: InlineFieldInput is a controlled input in every branch, and the hosts commit through InlineEditSaveBar, so there is no per-input keyboard contract to mirror. Both hosts (DetailSection body and the HeaderHighlight strip) share the component and get the fix identically; the highlights strip renders a taller editor for these types, as it already does for the routed ImageField / FileField.

Composite fall-through sweep

Every field type reaching the terminal text input before this change, and the verdict for each. Fixed here: the object-valued composites, which are the same-shape routing the card scopes. Everything else is filed.

Class Types Stringification Disposition
Object-valued composite address, location, geolocation Destructive — object reads [Object], saves a string Fixed here — routed to the form's widgets
Array-valued tags, checkboxes, vector, options-less multiselect Destructive — array joined to a string, saved as one Filed #4220
Container / embedded object, composite, record, grid, repeater, json Destructive — reads [Object], saves a string over the embedded structure Filed #4220 (likely exclusion, not routing)
Scalar, wrong editor toggle, slider, progress, rating, radio Type-lossy — numbers/booleans emitted as strings; radio free-types over its option set Filed #4220
Credentials password, secret Destructive + disclosure — the mask renders as the value and is written back Filed #4221
Already a string text, textarea, markdown, html, richtext, email, phone, url, time, color, code, qrcode, options-less select Benign — identity No action; kept on the terminal input, with controls pinning it
Computed (gated out) formula, summary, rollup, auto_number n/a — never enter inline edit No action, except the autonumber spelling filed as #4219

The array / container / scalar rows are grouped in #4220 rather than ridden along here because each needs a design call (route vs. exclude; what an options-less checkboxes does), not a one-line routing. #4220 also records the root cause behind the whole tail: @object-ui/fields already exports FieldEditWidget with INLINE_EXCLUDED_FIELD_TYPES and a drift-guard test against the form's type list, and InlineFieldInput hand-rolls a parallel switch that consults neither.

Evidence

Red first. The pin asserts both halves for all three types and failed on both signatures before the fix — 11 failed, 2 passed, the 2 passes being the string-type controls that legitimately keep the terminal input:

× renders the real sub-field editor, never a single box reading "[Object]"
× never emits a bare STRING that replaces the whole object
...
AssertionError: expected [input] to be null
+ Received:
  value="[Object]"

AssertionError: expected 'string' not to be 'string' // Object.is equality

The write-half pin is deliberately query-independent (it types into the first box the editor renders, whatever that is). Addressing a named sub-input instead would have failed with "unable to find an element" — a signature naming the missing sub-input, not the missing structured write, which are two different defects.

After the fix: Test Files 1 passed (1) / Tests 13 passed (13).

Affected-package suites — repo root, path-filtered per AGENTS.md:

pnpm exec vitest run packages/plugin-detail/ packages/fields/ --maxWorkers=2
  Test Files  143 passed (143)
       Tests  1738 passed (1738)

Reverse verification. Predicted RED with both signatures returning. Removed only the routing (git checkout origin/main -- packages/plugin-detail/src/InlineFieldInput.tsx), keeping the test: 11 failed / 2 passed — the identical split and test set as the pre-fix run, both signatures back. Restored with git checkout HEAD -- ..., green again at 13/13.

Gates: type-check green for @object-ui/plugin-detail and @object-ui/fields (after building the dependency closure); eslint on both changed files 0 errors (32 pre-existing no-explicit-any warnings, the same pattern the sibling branches already use); check-control-bytes OK across 3917 tracked files; check-changeset-presence OK. No copy was touched, so no i18n gate applies — the widgets' sub-labels are the form's existing ones and this change adds no strings.

Changeset: .changeset/inline-address-input-4216.md, patch on @object-ui/plugin-detail. Not a skip-changeset candidate — the change is user-visible (objectui#3724).


Generated by Claude Code

…ding [Object]

InlineFieldInput's type switch routed the scalar and relational families to
dedicated widgets; every structured-object type matched nothing and fell
through to the terminal raw text input. That fallback stringifies through
coerceToSafeValue, whose general-object case returns the literal [Object] for
a value carrying none of name/label/externalId/id/_id — and then emits what
the user types as a STRING that replaces the whole object on save.

Route address, location and geolocation to the widgets the create/edit dialog
already uses, so the object round-trips and the two entry points cannot
diverge on the value shape they write back. coerceToSafeValue is untouched:
the routing is what stops these values from ever reaching it.

Fixes #4216
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Aug 11, 2026 3:30am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 28.3 KB 350 KB
Entry file index-BJKA05gi.js —
Status PASS —

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 8.88KB 3.25KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 7.57KB 2.97KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 22.10KB 4.37KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 35.76KB 9.11KB
auth (createAuthenticatedFetch.js) 4.37KB 1.69KB
auth (index.js) 2.35KB 1.07KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.91KB 0.87KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 486.47KB 107.53KB
core (index.js) 3.04KB 1.15KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 143.81KB 37.39KB
fields (index.js) 228.33KB 56.58KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.65KB 1.06KB
i18n (pickLocalized.js) 1.70KB 0.83KB
i18n (provider.js) 9.48KB 3.27KB
i18n (useObjectLabel.js) 27.59KB 6.63KB
i18n (useSafeTranslation.js) 4.52KB 1.96KB
layout (index.js) 38.87KB 10.80KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 8.75KB 3.06KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.67KB 1.12KB
permissions (evaluator.js) 4.41KB 1.44KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.55KB 0.71KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-calendar (index.js) 45.23KB 12.45KB
plugin-charts (index.js) 61.52KB 17.49KB
plugin-chatbot (index.js) 180.33KB 42.79KB
plugin-dashboard (index.js) 118.52KB 30.68KB
plugin-designer (index.js) 210.51KB 42.51KB
plugin-detail (index.js) 238.21KB 59.54KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 114.58KB 27.68KB
plugin-gantt (index.js) 164.14KB 39.98KB
plugin-grid (index.js) 187.97KB 49.90KB
plugin-kanban (index.js) 48.60KB 13.41KB
plugin-list (index.js) 110.18KB 26.70KB
plugin-map (index.js) 17.00KB 5.32KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 40.58KB 10.58KB
plugin-timeline (index.js) 26.21KB 7.52KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.03KB 20.55KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.67KB 2.37KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 23.71KB 7.95KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.23KB 0.66KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 4.09KB 1.74KB
sdui-parser (index.js) 4.47KB 2.03KB
sdui-parser (parse.js) 10.04KB 2.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 4.69KB 1.48KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 2.71KB 1.34KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@yinlianghui
yinlianghui marked this pull request as ready for review August 11, 2026 04:16
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 6314e87 Aug 11, 2026
20 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-4216-inline-address-input branch August 11, 2026 04:17
yinlianghui pushed a commit that referenced this pull request Aug 11, 2026
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.
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 17, 2026
…stack-ai#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), objectstack-ai#4167 (adaptation remainder),
objectstack-ai#4163 (I18nLabel consumer story), objectstack-ai#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 objectstack-ai#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 (objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 (objectstack-ai#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 objectstack-ai#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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline-editing an address on the detail page collapses it to one text box reading [Object], and saving overwrites the structured value with a string

2 participants