This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(detail): inline-edit an address as sub-fields, not a text box reading [Object] - #4222
Merged
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This was referenced Aug 11, 2026
yinlianghui
marked this pull request as ready for review
August 11, 2026 04:16
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.
This was referenced Aug 11, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4216
Inline-editing an
addresson the record detail page collapsed it to one text box reading[Object], and saving wrote a bare string over the structured value.locationandgeolocationare 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 throughcoerceToSafeValue. That helper's general-object case extractsname || label || externalId || id || _idand 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:
[Object], so[Object]is what the user sees as the value they are correcting, which makes typing over it the natural gesture.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,
DetailSectionrendersInlineFieldInputinstead, which is why that PR does not touch this.The fix
Route
address,locationandgeolocationto the widgets the create/edit dialog already uses —AddressField,LocationField,GeolocationField, the form's own structured-value editors (fieldWidgetMap, andFieldEditWidget'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.coerceToSafeValueis 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.autoFocusfollows 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:InlineFieldInputis a controlled input in every branch, and the hosts commit throughInlineEditSaveBar, so there is no per-input keyboard contract to mirror. Both hosts (DetailSectionbody and theHeaderHighlightstrip) share the component and get the fix identically; the highlights strip renders a taller editor for these types, as it already does for the routedImageField/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.
address,location,geolocation[Object], saves a stringtags,checkboxes,vector, options-lessmultiselectobject,composite,record,grid,repeater,json[Object], saves a string over the embedded structuretoggle,slider,progress,rating,radioradiofree-types over its option setpassword,secrettext,textarea,markdown,html,richtext,email,phone,url,time,color,code,qrcode, options-lessselectformula,summary,rollup,auto_numberautonumberspelling filed as #4219The 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
checkboxesdoes), not a one-line routing. #4220 also records the root cause behind the whole tail:@object-ui/fieldsalready exportsFieldEditWidgetwithINLINE_EXCLUDED_FIELD_TYPESand a drift-guard test against the form's type list, andInlineFieldInputhand-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:
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:
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 withgit checkout HEAD -- ..., green again at 13/13.Gates:
type-checkgreen for@object-ui/plugin-detailand@object-ui/fields(after building the dependency closure);eslinton both changed files 0 errors (32 pre-existingno-explicit-anywarnings, the same pattern the sibling branches already use);check-control-bytesOK across 3917 tracked files;check-changeset-presenceOK. 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 askip-changesetcandidate — the change is user-visible (objectui#3724).Generated by Claude Code