Repository navigation
fix(plugin-form): record:line_items hydrates an untyped column from the child field - #12914
Merged
objectstack-fleet[bot] merged 1 commit intoOct 17, 2026
Merged
Conversation
…he child field LineItemsPanel passes its columns through the same hydrateColumns the master-detail carriers call, over the child schema it already loads. An identity-only column takes the child field's label, type and options; an authored label or type still wins, and an undeclared field renders as written. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
This was referenced Oct 17, 2026
objectstack-fleet
Bot
deleted the
claude/issue-12854-line-items-hydrate
branch
October 17, 2026 19:50
This was referenced Oct 17, 2026
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 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 #12854
Clause-②: no
The objectui half of objectstack-ai/objectstack#24140 (the spec describe landed in objectstack-ai/objectstack#24188).
What changed
LineItemsPanel(record:line_items) now passes its authoredcolumnsthroughhydrateColumnsfromderiveMasterDetail.ts, the same function the master-detail carriers call throughderiveDetail. It was already exported, soderiveMasterDetail.tsis untouched. There is no second resolver.getObjectSchema(childObject)for the save sanitize and the line affordances (A1).hydrateColumnstakes it as is: its parameter is the structuralChildObjectSchemaLike(name?,fields?), and the panel's state is that shape ornull(passed asundefined).typetakes the child field'slabel,typeandoptions. Through the same function it also takesrequired, a lookup'sreference/displayField, file props,readonlyWhen/requiredWhenand a formula'scomputed/expr, exactly as a master-detail grid's column does. An authoredlabelortypestill wins. A column whose field the child object does not declare is returned as written. Until the schema answers, the columns render as authored.Translation path
The master-detail carriers do not translate a column heading on the client. The hydrated
labelis the one the object-metadata endpoint serves, and that endpoint translates the object document into the session locale (translateObjectin@objectstack/spec/system, readingobjects.CHILD.fields.F.label). The console adapter's schema cache is cleared on a language switch, so the next read is in the new locale.record:line_itemsnow takes its heading from the same served label, so it translates the same way. The zh pin serves the child schema the way that endpoint answers a zh session.Print page (A3)
A print page does not use a different renderer.
record:line_itemshas one registration (ComponentRegistry.register('line_items', LineItemsPanelRenderer, { namespace: 'record' })inpackages/plugin-form/src/index.tsx), and it rendersLineItemsPanel. On a page that declaresprint, the panel only readsusePrintPage()to name its row cap. Printed headings therefore go through the same hydration.Pins
New
packages/plugin-form/src/LineItemsPanel.childFieldHydration-12854.test.tsx, through the real panel andSchemaRendererProvider:Quantity/Line status(the child field labels), notquantity/status;I18nProvider, with the schema served in zh, the headings are数量/行状态;statuscell is a select picker named by the hydrated label, showing the option labelOpen(zh:未结) rather than the stored valueopen;Units/Stateare kept, and the field's type and options still apply;notecolumn is headednoteand edits as a plain text input over the stored value.Ablation, after the fix was committed (
f58f1ce764), withscripts/ablation-replace.mjsfrom the objectstack checkout and atraprestore.hydrateColumns(schema.columns, childSchema ?? undefined)was replaced withschema.columnsplus a marker comment. Anchor count went 1 to 0, and the blob went892b35f0be3bto85ce270d9929. All 4 tests went red: (a) failed withUnable to find role="columnheader" and name "Quantity", the zh case on数量, and both controls on their hydration-dependent assertions. After the restore the blob read892b35f0be3b, matching the HEAD blob, andgit diff HEADwas empty. A first attempt that put back a bareschema.columnswas refused by the tool before the run (the replacement text already occurred in the anchor, so its count could not rise), and nothing was run on it.Verification (on
f58f1ce764)Tests 4 passed (4), lock verdictcommand-exit 0.pnpm --workspace-concurrency=2 --filter '@object-ui/plugin-form^...' build: exit 0.pnpm --filter @object-ui/plugin-form run type-check(tsc --noEmit && tsc -p tsconfig.test.json): exit 0.--listFilesOnlyontsconfig.test.jsoncounts the new test file once.--no-inline-configon the 2 changed source files: 0 errors and 17 warnings. All warnings are on lines this PR did not touch (no-explicit-any,set-state-in-effect,exhaustive-deps).check:phantom-deps,self-import,unreferenced-sources,doc-example-readers,handler-key-reads,side-effects-array,element-data-source-declaration,spec-symbols,action-forward-parity,designer-field-key-parity,icon-record-names,i18n-keys,i18n-drift,i18n-designer-parity,control-bytes,scripts/check-hand-rolled-comment-mask.mjs,scripts/check-changeset-fixed.mjsandscripts/check-changeset-presence.mjs.check:spec-floors: exit 1,no-artifact(the workspace was not fully built). Recorded, not fixed.plugin-formpackage dir, reason: lock queue. Three timed acquisitions (300 s, 360 s, 420 s) never reached the head while one holder ran a fullpackages/components/vitest for more than 24 minutes, and an earlier whole-package run was cut by the foreground cap. This run is declared to CI.Acceptance notes
GridFieldwithreadonly) draws aselectcell as the stored value. Its cell sends only file and temporal columns throughdisplayText, sodisplayText's select branch is not reached from that table. A read-only line-items panel therefore showsopen, notOpen, even after this change (measured while writing the pins). That is not this PR's scope, and it is reported to the seat.domain:specseat's note on the card.Changeset:
.changeset/12854-line-items-hydrate.md(@object-ui/plugin-form: patch).Session:
https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gBGenerated by Claude Code