Uh oh!
There was an error while loading. Please reload this page.
fix(detail): TEXTUAL_REF_FALLBACK_TYPES carries both auto-number spellings - #4251
Merged
Merged
Conversation
…lings (#4219) The set is matched by raw spelling and carried `auto_number` only, while the spec / designer / importer spell the type `autonumber`. Its one ungated reader is `InlineFieldInput`'s reference fallback on exported public API, so an `autonumber` carrying a `reference_to` — computed fields keep one for relational metadata — resolved into the record picker, offering records as replacements for a machine-generated identity. Adds `autonumber` beside `auto_number`, matching plugin-form's both-spellings convention, and documents why the set is spelling-sensitive. Pins the reference-fallback path (red before the change), `auto_number` and a real `lookup` as controls, and set membership directly so the gate union no longer depends on which spelling the metadata uses. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 11, 2026 07:51
Uh oh!
There was an error while loading. Please reload this page.
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 freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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#4219
The re-scoped half of the card: the editability symptom was closed by #4228's alias-aware exclusion (verified and pinned by #4244); what was still owed is the reference-fallback path, which no host gate sits in front of.
The defect, measured on the tip (post-#4244)
TEXTUAL_REF_FALLBACK_TYPESis matched by RAW spelling and carriedauto_numberonly, while@objectstack/spec— and the designer, and the importer — spell the typeautonumber. Its one ungated reader isInlineFieldInput's reference fallback, on exported public API:A field typed
autonumberkeeps areference_tofor relational metadata — which is the entire reason this set exists — so it took the lookup branch and rendered the record picker: a searchable list of records offered as replacements for a machine-generated identity. Theauto_numberspelling of the identical field rendered the textual fallback, as intended.The fix is one member plus the rationale in the docblock, matching how
plugin-formcarries both spellings in each of its non-input sets (deriveMasterDetail.ts:40,:305).Union survivability
The computed gate and the shared exclusion are a union (#3355). Before this change that union's survivability depended on which spelling the metadata used:
autonumberwas held by the exclusion gate alone,auto_numberby both — so losing either gate would have re-opened a different half of the defect depending on how the field was authored. Both spellings are now members of the computed set, asserted directly on the set rather than described in prose.Pins (
InlineFieldInput.autonumberRefFallback.test.tsx, new file)The picker and the terminal input both render an
input, so every case queries by test id —lookup-trigger*for the picker,inline-plain-text-inputfor the fallback — rather than by a role heuristic that reads the two as the same thing.autonumber+reference_torenders the textual fallbackauto_number+reference_tounchanged (control)lookupstill gets the record picker (control, over-blocking)Reverse verification (
git checkout origin/main -- fieldEnrichment.ts, re-run, restore — nevergit stash): predicted RED on exactly the two cases that read the set, with both controls staying green. Observed exactly that —Tests 2 failed | 2 passed (4), the failure on case 1 dumping thelookup-triggerbutton DOM. Restored and re-confirmed green.Verification
npx vitest run packages/plugin-detail/— 72 files, 728 tests passed. The Inline edit still destroys array-valued and container field values on the detail page (the rest of the #4216 fall-through sweep) #4220 partition table ininlineEditTypeCoverage.test.tsxis unmoved:autonumberandauto_numberwere already in theexcludedbucket (the exclusion gate put them there), so widening the computed gate adds no second claim.pnpm --filter @object-ui/plugin-detail type-check— clean.pnpm --filter @object-ui/plugin-detail lint— 0 errors (759 pre-existing warnings, none in the touched files).node scripts/check-control-bytes.mjs— OK, plus a direct control-byte scan of both touched files.pnpm --filter '@object-ui/plugin-detail^...' buildran before any of the above. No exported TYPE changed — this is a Set literal's contents — so no downstream consumer sweep was owed; the public surface is byte-identical.@object-ui/plugin-detailpatch.Sweep, and one finding
Swept
plugin-detailfor sibling spelling-sensitive type sets. The auto-number family has no other gap here. One different family does, filed as #4250 rather than fixed in this PR: the spec spellsrichtext, and four sets across three packages spell itrich_text/rich-text(RelatedList'sSKIP_TYPES, bothautoLayoutimplementations,RecordDetailView'sSECONDARY_FIELD_TYPES) — none of which any producer emits. It spans packages outside this card and carries a design call (whethermarkdownjoinsSKIP_TYPES, whether the dead spellings are dropped), and fixing only theplugin-detailhalves would make the detail page and the form disagree about the same field.Generated by Claude Code