Repository navigation
fix(plugin-detail): the Overview draws a record's own field groups before its master-detail tables, at the list's dense height - #35824
Conversation
…before its master-detail tables Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ
… the columns that fit whole Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ
…d width Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ
… sized them Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ
…ollapse value Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ
…erview-body-table-order
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对ACCEPT · head Routing: no Checked:
Required before landing:
Nit (no action required):
|
|
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ Landing · area ux-2 · 2026-11-20T10:28Z
State: draft → ready + auto-merge (merge queue). |
Fixes #35742
Part of #35590
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Order (the synthesized record page's Overview,
bodyTablePlacementinbuildDefaultPageSchema.ts). A master-detail body table now follows the field sections the page draws OPEN, instead of leading every section. The left column reads: the strip (key fields, stage bar; full width, unchanged) then the record's field groups then its body tables. An object with no stage bar and no key fields opens on its own fields. A field group whoserelatedListnames a body table still places that table at the group's position (unchanged).Default-collapsed groups: my call, and why. The principle on the card is "common fields before the tables". A section the page draws CLOSED when it opens is, by its author's own declaration, not a common one: a field group with
collapse: 'collapsed', or an enumerated section that iscollapsibleanddefaultCollapsed. So the closed sections that TRAIL the last open one follow the tables. Two limits keep the rule from reordering anything an author wrote:The console host's "More details" section (
deriveRecordDetailSections) iscollapsiblebut opens EXPANDED (defaultCollapsed: false), so it is drawn open and stays before the tables. The card describes it as default-collapsed; onmainit is not, and I keyed the rule on what the reader actually sees closed rather than on the section's name. An object whose author marks a groupcollapse: 'collapsed'gets that group after the tables.Density (
RelatedList.tsx, the body-table face only).BODY_TABLE_DENSITYputs a body table's header at 32px and its data cells at 32px with no vertical padding (the row-actions cell included), the same measuresobject-griddraws a list'scompactrows with. It is applied only when the list is a body table; every other related list keeps its face.Width (
RelatedList.tsx, the body-table face only). A body table draws the leading run of its columns, in their priority order (the order the list derives, name first), that fits whole in the details column, and offers the rest behind its labelled ⤢ "All columns" button (the enlarged tab, which draws every column). Widths are the inline widths the table gives each header (the user's resize, the declared width or the drawn-content estimate), cached per column key, so a column left out is still counted when the column grows. A table whose FIRST column alone is wider than the box still scrolls inside it with that column pinned (the existing sideways-scroll behaviour, now only the fallback). Never fewer than one column.Untouched: tab rules, the right rail, the header (the strip still sits above both columns), body tables appear only in the Overview, the edit state's
RecordBodyTableEditorSlotContextpath (the host's editor replaces the list, so neither change reaches it), andhandleAddRecords.Tests
Migrated pins (each one's expectation flipped to the new order; none retired):
buildDefaultPageSchema.bodyTables-27055.test.tsobject.fieldentry names the one FK; another FK places nothing (second expectation)RelatedList.bodyTable-27055.test.tsxdata-body-table-columns-omitted), no scroll, no pin, no shadow, ⤢ in wordsUnchanged and still green: "with no section the details node leads", "a group declared before every field group puts its table first", "a group declared last puts its table after every field section", the host-passed
{ group }sections case, and the three-columns CONTROL (now also asserting all three columns are drawn).New pins:
details(basic)thentable(meeting_todo);record:highlights, then groups, then the table;record:highlights, record:path, then groups, then the table;collapsedgroup follows the tables; a closed group between open ones stays; anexpandedgroup stays before; every section closed puts the tables last; the enumeratedcollapsible+defaultCollapsedform trails while an open "More details" leads; a group-placed table keeps its position ahead of a trailing closed group;bodyTableColumnsThatFit: the leading run that fits, never fewer than one,nullwhen all fit or a width is unknown;BODY_TABLE_DENSITYclass (32px header, 32px cells, no vertical padding); CONTROL: the same list outside the body-table set does not;Acceptance notes
docs/adr/**is outside this claim's file surface and is a governed surface, so the add-only amendment note is left to the seat (named in the report), not written here.border-collapse, so the 1px row line is shared: the "33" of the list's density comment counts the line separately).Verification
Read first, by risk:
RelatedList.tsx, the measuringread()inside the body-table layout effect: the column-fit read, itsMutationObserver(the table settles its columns a render after it is handed fewer), and the guard that a header with no width yet records nothing.buildDefaultPageSchema.ts,bodyTablePlacement:tablesAtand the slot loop (placed tables flush before the unplaced ones at the split).sectionDrawnClosed: a{ group }reference is judged throughderiveFieldGroupDetailEntries, the same derivationrecord:detailsresolves it with.Two-minute check: open any showcase expense report (
pnpm dev, Expense Reports, any record) at 1280 wide. Expected: stage bar, then the Report, Totals and Other groups, then "Expense Lines" with five whole columns, an "All columns" button, rows the height of the list page's rows, and no column cut at the table's right edge.Test readings (head 873a23d, after merging origin/main)
Final-head readings are in the os-dev report on the card, with each command and its
VERDICTline. Before the merge, on the same diff:buildDefaultPageSchema.bodyTables-27055.test.ts+RelatedList.bodyTable-27055.test.tsx: Test Files 2 passed (2), Tests 56 passed (56).packages/plugin-detail/src/synth/+renderers/__tests__/record-related-list*(includes the edit-stateeditorSlot-35599pin): Test Files 25 passed (25), Tests 271 passed (271).packages/plugin-detail/src/__tests__/RelatedList*+RecordPageColumns*: Test Files 59 passed (59), Tests 402 passed (402).RecordDetailView.harness,recordPageTiers-26678,childWriteRefreshesParent-12244,relatedListFilter-4664,recordEditState.helpers-35599, plugin-gridemptyArrayCell-8481,relatedListRowActionDisabled-33215: Test Files 7 passed (7), Tests 105 passed (105).pnpm --filter @object-ui/plugin-detail run type-check(tsc --noEmit && tsc -p tsconfig.test.json): exit 0. It caught one test usingcollapse: 'collapsible', which is not a spec value; the case now usesexpanded.Ablations (scripts/ablation-replace.mjs, mutation proven on disk, restore proven by blob hash and an empty diff)
buildDefaultPageSchema.ts:const tablesAt = lastOpen === -1 ? resolved.length : lastOpen + 1;replaced byconst tablesAt = 0;(tables before every section, the old order). Anchor 1 to 0, blob a0218d67 to e8e8dbe2. Placement file: 15 failed, 9 passed (24). Red: every migrated order pin and every new order pin. Green: the CONTROL, the page-size and side-list cases, and the group-placed-first case, which do not depend on the split. Restored: blob back to a0218d67 (HEAD),git diff HEADempty.RelatedList.tsx: the over-budget branch ofbodyTableColumnsThatFit,return Math.max(1, index);, replaced byreturn null;(never omit). Blob eb8e3656 to 107ffa88. Renderer file: 4 failed, 28 passed (32). Red: the eight-columns case, the first-column fallback, and twobodyTableColumnsThatFitcases. Green: the three-columns CONTROL and the density pins. Restored: blob back to eb8e3656 (HEAD),git diff HEADempty.A4 browser reading (1280x900, DSF 2, headless Chromium, showcase backend on a private port, Console dev server)
Showcase expense report EXP-2001 (stage bar, three field groups, master-detail child Expense Lines), tier
wide:showcase_expense_line, same session: header 32, row pitch 32);data-body-table-columns-omitted="1"; five columns drawn, the last ending at x 810 inside the box's right edge at 811;scrollWidth744 equalsclientWidth744 (no sideways scroll); "All columns" offered in words;Screenshots: expense-1280x900.png, expense-body-table.png in the claim's a4-35742 folder. The showcase's invoice and project records draw authored pages, not the synthesized one, so the no-stage case is pinned in tests rather than read in the browser.
Human Minimum
packages/specholds no runtime logic.pnpm lintis CI's run and was not run locally.main, one pull request.packages/spectouched: not touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code