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

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 #4216

Closed

Description

@yinlianghui

Found while fixing #4037 (display-registry gap for address); filed unassigned per Prime Directive #10. Different defect, different path — #4037 is the read/display registry, this is the inline-edit input path.

What happens

InlineFieldInput (packages/plugin-detail/src/InlineFieldInput.tsx) has a type switch that routes select / multiselect, references, number, currency, percent, date / datetime to real widgets. address matches none of them, so it falls through to the terminal raw text input at the end of the component.

That fallback stringifies an object value through coerceToSafeValue:

: typeof value === 'object'
  ? String(coerceToSafeValue(value) ?? '')
  : String(value);

coerceToSafeValue (packages/fields/src/index.tsx:317) has no address branch — a structured address hits its general-object case, which extracts name || label || externalId || id || _id and otherwise returns the literal [Object]. An address has none of those keys, so the edit box shows [Object].

Why it matters beyond cosmetics

The input is a plain text box wired to onChange(v). Whatever the user types is emitted as a string, replacing the structured { street, city, state, postalCode, country } object. So the sub-field structure is destroyed by an ordinary inline edit — and [Object] is what the user sees as the current value they are correcting, so editing over it is the natural thing to do.

Contrast the create/edit dialog, which resolves address to the real sub-field widget and round-trips the object correctly.

Reachability

Live today: the desktop detail row enters inline edit on double-click whenever the record is inline-editable (onEnterInlineEdit supplied and the field is not readonly / computed / a system field). An address field satisfies that.

Not covered by #4037

PR #4215 fixes the display registry, so the address now reads formatted in read mode and in the inline-edit read state (the row before editing starts). It deliberately does not touch any input path. Once a field is actively being edited, DetailSection renders InlineFieldInput instead of the display value, so this defect is unchanged by that PR.

Likely shape of a fix

Route address to the existing address widget in InlineFieldInput's type switch, the way the form path does — so the structured value is edited as sub-fields and written back as an object. Worth checking the same fall-through for other composite types in that switch while there.


Generated by Claude Code

Activity

  1. self-assigned this
    on Aug 11, 2026
  2. yinlianghui commented on Aug 11, 2026

    @yinlianghui
    ContributorAuthor

    CLAIM (objectui whole-repo seat PM, session session_017Qqyix2QcnpUC9XeYVDzx3) — graded queue+bug on filing (data-destroying inline edit, live today) and dispatching a dev agent now.

    • Branch claude/issue-4216-inline-address-input, worktree objectui-issue-4216 (M container)
    • Serialization gate: PR fix(fields): a detail-page address reads as a formatted address, not stringified JSON #4215 (merged-pending) ships the AddressValue export and shared formatter this fix will consume, and touches the fields barrel — first edit waits until it is on origin/main (git-layer polling).
    • Scope per the card's likely-shape: route address in InlineFieldInput's type switch to the real sub-field widget (the form path's behavior) so the object round-trips; red-first pin must assert BOTH halves — no [Object] shown, and the emitted value stays a structured object. The composite fall-through sweep: enumerate what else hits the terminal text input; same-shape one-line routings may ride along with their own pins, anything larger becomes findings.

    Generated by Claude Code

  3. yinlianghui commented on Aug 11, 2026

    @yinlianghui
    ContributorAuthor

    ACCEPT (objectui seat PM, session session_017Qqyix2QcnpUC9XeYVDzx3, review of record) — PR #4222.

    The routing lands exactly on the dispatch's shape and the ride-alongs are legitimate: location/geolocation are the SAME defect in different spellings (object-valued, same terminal input, same [Object]-then-string-overwrite pair, same one-line routing to an already-wired widget), not adjacent scope. The two measured non-actions are as valuable as the fix: commit/cancel needed no mirroring (controlled inputs, both hosts commit through the shared InlineEditSaveBar — measured, not assumed), and coerceToSafeValue was correctly left alone (an address branch there would fix the display half while leaving the string write intact; the routing makes it unreachable). The pin-construction note deserves the record: the first write-half assertion failed on a MISSING SUB-INPUT query — a different defect's signature — and was replaced with a query-independent helper so the pin fails on the emitted value SHAPE. That is the difference between a pin and a coincidence.

    The fall-through sweep is the complete map this switch never had: three defects fixed, three cards filed with verdict classes (destructive-array/container + type-lossy scalars → #4220 with the root cause written out — the hand-rolled switch duplicating FieldEditWidget and consulting neither it nor INLINE_EXCLUDED_FIELD_TYPES; the autonumber spelling gap → #4219, the #3355 failure mode; password/secret mask write-back → #4221, severity-split correctly). Controls held on all four boundaries (string terminal input, dialog path, #4215's read state, readonly/computed gating). CI converged 18/2/0, real changeset. Flipping ready + auto-merge. The seat is queueing #4221 (credential-loss severity) and #4219 now; #4220's delegate-vs-route design call gets ruled at its dispatch.


    Generated by Claude Code

  4. added 2 commits that reference this issue on Aug 17, 2026
    6314e87
    e7663f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions