Repository navigation
fix(plugin-detail): record:details dedupe asks the ADR-0079 resolver which row to hide - #8349
Conversation
…which row to hide `record:details` drops from the body grid the one field whose value the page H1 already shows, but it picked that field with a six-entry literal walk (`name`, `full_name`, `title`, `subject`, `display_name`, `label`) — the TAIL of the chain `PageHeaderRenderer` uses a package away, with no equivalent of the unified ADR-0079 resolver rung above it. For an object whose declared `nameField` names a field the literal walk does not know, both halves of the dedupe were wrong at once: the duplicate row survived (the value the H1 was showing) and an ordinary field disappeared instead (`name`, the walk's first entry, a row the H1 never showed). The ladder now leads with `resolveNameField` and `deriveTitleField` from `@object-ui/core` — the same ADR-0079 resolver `getRecordDisplayName` reads to produce the H1's VALUE and `resolveTitleField` already delegates to in this package. The rung is UNROLLED into two candidates because this ladder is value-keyed and `resolveNameField` short-circuits: a declared pointer wins outright and the derivation never runs, so a record whose declared pointer is blank needs the next rung, exactly as the header's own chain re-tries it. Two fixtures were written around the old ladder and are updated, not re-verdicted: both declare a `name` field and leave it unset, so the ladder resolves its candidate to `name`, finds no value and hides nothing — which is the dedupe-neutrality those files' docstrings always asked for, now stated as a field rather than as an absence. Card relation is declared once, in the PR body. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
…cases Asserting "the duplicate row drops" and "the ordinary row survives" inside one `it` lets the first failure short-circuit the second, so an ablation of the read site reddens only the duplicate half and says nothing about the vanishing half — and a field disappearing in the duplicate's place is half the defect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
Minor, not major: this repo's fixed release group tracks @objectstack's major, so a behavioural change ships minor with the breaking semantics spelled out in the changeset body. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
✅ 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
|
|
PM contract review — accepted, flipped to ready, auto-merge armed. Verified by content against The correction against the dispatch is the most valuable thing in this PR and it is right. The card's suggested shape — one Two further things worth recording because they are the difference between a pin and a pin that measures something:
Ruling on the open question: A — leave bothNeither B (suppress the dedupe when The three reported findings
Generated by Claude Code |
…ess definition `record:details` drops from the body grid the one field whose value the page H1 is already showing. objectui#8175 (PR #8349) made the two halves agree on WHICH FIELD. They still disagreed on WHAT COUNTS AS A VALUE. The header half decides emptiness through `@object-ui/core`'s `valueAt`, which TRIMS: a whitespace-only value is empty, so `getRecordDisplayName` walks on to the next rung. The ladder asked its own raw `undefined` / `null` / `''` question, which a whitespace-only value passes. So for a record whose title field held only spaces the ladder concluded that field was what the H1 shows and hid its row, while the H1 had already moved on — a field disappeared from the grid to deduplicate against a heading that never displayed it. The ladder now CALLS that function rather than re-spelling the test. `@object-ui/core` exports it as `recordDisplayValueAt`; it was the module-private `valueAt`, unchanged in behaviour and renamed only to be a defensible public name. One authority, not two implementations that agree today. Delegation is wider than a trim, deliberately: it also imports the definition's embedded-object rung (a bare `{ id }` lookup payload is not a title) and its stringification (`0` and `false` stay values). In every case the new answer is the one the H1 was already giving. A bolted-on `.trim()` would have closed the whitespace half only, and would be the second implementation whose drift is the shape of this defect one level down. Pinned in `__tests__/record-details.dedupeEmptinessTrims-8350.test.tsx`, which asserts the DEDUPE outcome — which row renders, which drops — at all three tiers of the ladder (both resolver rungs and the literal-walk tail), each half in its own case so a failure at one cannot short-circuit the other, each with a control row asserted by value, plus a non-regression case that a real value still hides its row. Card relation is declared once, in the PR body. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
…ess definition (objectstack-ai#8375) `record:details` drops from the body grid the one field whose value the page H1 is already showing. objectui#8175 (PR objectstack-ai#8349) made the two halves agree on WHICH FIELD. They still disagreed on WHAT COUNTS AS A VALUE. The header half decides emptiness through `@object-ui/core`'s `valueAt`, which TRIMS: a whitespace-only value is empty, so `getRecordDisplayName` walks on to the next rung. The ladder asked its own raw `undefined` / `null` / `''` question, which a whitespace-only value passes. So for a record whose title field held only spaces the ladder concluded that field was what the H1 shows and hid its row, while the H1 had already moved on — a field disappeared from the grid to deduplicate against a heading that never displayed it. The ladder now CALLS that function rather than re-spelling the test. `@object-ui/core` exports it as `recordDisplayValueAt`; it was the module-private `valueAt`, unchanged in behaviour and renamed only to be a defensible public name. One authority, not two implementations that agree today. Delegation is wider than a trim, deliberately: it also imports the definition's embedded-object rung (a bare `{ id }` lookup payload is not a title) and its stringification (`0` and `false` stay values). In every case the new answer is the one the H1 was already giving. A bolted-on `.trim()` would have closed the whitespace half only, and would be the second implementation whose drift is the shape of this defect one level down. Pinned in `__tests__/record-details.dedupeEmptinessTrims-8350.test.tsx`, which asserts the DEDUPE outcome — which row renders, which drops — at all three tiers of the ladder (both resolver rungs and the literal-walk tail), each half in its own case so a failure at one cannot short-circuit the other, each with a control row asserted by value, plus a non-regression case that a real value still hides its row. Card relation is declared once, in the PR body. Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S Co-authored-by: Claude <noreply@anthropic.com>
Fixes #8175
What was wrong
record:detailsdrops from the body grid the one field whose value the page H1 is already showing, so a record page does not printContract No: HT-2026-001directly under an H1 readingHT-2026-001. It picked that field with a six-entry literal walk —name,full_name,title,subject,display_name,label.That list is the tail of the chain
PageHeaderRendereruses to draw the H1 a package away. The rung above it in that chain — the unified ADR-0079 resolver — had no equivalent here, so for an object whose declarednameFieldnames a field the literal walk does not know, both halves of the dedupe were wrong at once.Measured on
origin/main(dacb98f3b), objectnameField: 'contract_no', record{ id: 'C1', contract_no: 'HT-2026-001', name: 'internal-name', amount: 42 }:The duplicate survived and an ordinary field disappeared in its place, with the control row proving the grid rendered at all.
The fix
The candidate list now leads with
resolveNameFieldandderiveTitleFieldfrom@object-ui/core— the same ADR-0079 resolvergetRecordDisplayNamereads to produce the H1's value, and the oneresolveTitleFieldin this very package already delegates to (objectui#7287 / PR #7585). The literal walk stays as the tail, byte-identical.The card suggested "ask
resolveNameFieldfirst, then fall through to the literal walk". Measurement says that single call is not enough, and the rung is spelled as two candidates instead:resolveNameFieldreturns ONE answer and short-circuits. This ladder is value-keyed — and so is the header's:getRecordDisplayNamere-tries the next rung whenvalueAtcomes back empty on the record, so a declared pointer that is blank falls through to the type-aware derivation (step 4). A singleresolveNameField()call would silently lose that rung. Pinned by the case "re-tries the derivation rung when a DECLARED pointer is blank on the record", which is red under the ablation.DetailSectionrenders each row fromfield.name, while the dedupe filters entries throughcolumnIdentity, which is canonical-first (fieldbeatsname/fieldName). The two answers diverge for a deliberately conflicting entry. Every fixture in the new pin uses bare strings, where the two are the same string — so the pin cannot be green because a resolver answer accidentally matched a differently-keyed column. The conflicting-entry shape is a pre-existing defect classhasConflictingColumnIdentityalready names; it is not touched here.The pin asserts the DEDUPE, never the title
packages/plugin-detail/src/renderers/__tests__/record-details.nameFieldDedupe-8175.test.tsx, shaped afterrecord-details.primaryFieldRetired-7586.test.tsx. The H1 half is already green onorigin/mainand proves nothing about this defect, so every case asserts which row RENDERS and which row DROPS, and every case carries a control row proving the grid rendered at all.The two halves are separate cases on purpose: inside one
itthe first failure short-circuits the second, so an ablation would redden the duplicate half and say nothing about the vanishing half.Ablation — the read site, not the pin
Reverted the delegation (bare literal walk back), from the committed implementation, restore proven by state, trap on EXIT INT TERM with absolute paths:
Red rows, by name — every one a DEDUPE assertion (
queryByText(...).toBeNull()/getByText(...)), no title assertion involved:The 2 that stay green are the controls that must: "falls through to the literal walk when the declared pointer is EMPTY on the record" and "CONTROL: an undeclared object still dedupes via the literal walk" — they describe behaviour this change does not alter, and their staying green is what makes the five reds a measurement of the new rungs rather than of the ladder's absence.
No
distis involved: the root vitest config aliases@object-ui/coretopackages/core/src, and the pin imports../record-detailsby relative path.Fixture triage — two files were written around the old ladder
Both are updated, not re-verdicted. Each declares a
namefield and leaves it unset on every record, so the ladder resolves its candidate toname, finds no value, and hides nothing:recordDetailsBodySource.test.tsx— its docstring already said "noname/title/display_namein the data on purpose … a fixture that tripped that would make an absence assertion pass for the wrong reason". With no name-ish field declared, the derivation ends in first title-eligible field by declaration order —phone— so555-0100started disappearing. That was the ladder working correctly: the page H1 for that record is the phone number, becausePageHeaderRendererresolves it through the very same derivation.record-details.emptySectionDefault.test.tsx— same cause onindustry; everyManufacturingassertion would have been measuring the dedupe instead of the empty-section heuristic those cases exist to pin. Placeholder counts and section verdicts are unchanged.Neither names a FIELD, so neither has a row to hide, and closing either is a product ruling rather than a repair:
page:header's ownschema.title— an author-set heading this package cannot see. The ladder hides a row regardless.objectSchema.titleFormat— a render-only template the header ranks above the declared pointer (pinned in@object-ui/components'__tests__/page-header-title.test.tsx, "titleFormat still outranks nameField"), and which can interpolate any number of fields. Note this is itself a divergence between the header andgetRecordDisplayName, whose documented step order putstitleFormatbelow the declared pointer.A third, smaller one: the header's
valueAttrims strings (so a whitespace-only value is "empty"), while this ladder's non-empty test does not. Pre-existing for all six literal entries; not changed here.Verification
All at
b0a4df615unless noted. Every run through the container's shared heavy-verify lock; verdicts quoted from the runner's own summary.vitest run packages/plugin-detail/Test Files 135 passed (135)·Tests 1216 passed (1216)vitest run apps/console/Test Files 89 passed (89)·Tests 1069 passed (1069)vitest run packages/app-shell/ --shard=1/3Test Files 216 passed (216)·Tests 2094 passed | 1 skipped (2095)vitest run packages/app-shell/ --shard=2/3Test Files 216 passed (216)·Tests 1921 passed (1921)vitest run packages/app-shell/ --shard=3/3Test Files 215 passed (215)·Tests 2219 passed (2219)vitest runcalendar+gantt+kanban+runner+schema-catalog+console-starterTest Files 153 passed (153)·Tests 2958 passed (2958)pnpm --filter @object-ui/plugin-detail run type-checktsc --noEmit && tsc -p tsconfig.test.json)eslint .inpackages/plugin-detail899 problems (0 errors, 899 warnings), all pre-existingno-explicit-any; the two on the new pin are the samerenderBody(record: any, schema: any)shape the#7586harness already shipscheck:control-bytesOK (scanned 6628 tracked text file(s))check:phantom-deps·check:unused-deps·check:self-import✅check:unreferenced-sources·check:vi-mock-specifiers·check:vi-mock-inheritcheck:changeset-presence·check:changeset-no-major✅ 4 source file(s) … declares 1 changeset(s)·✅ No changeset declares a major bumpcheck:governed-queue-guard --test✅ NOT GOVERNED — 5 path(s) checkedThe package test set was chosen from
TURBO_SCM_BASE=dacb98f3b turbo ls --affected(11 packages);examples/byo-backend-consoleandapps/sitecarry no test files.Declared narrowings, left to CI:
check:sdui-registration-pinsreturned itsPREREQUISITE NOT METexit 2 ("build the console first") — a NOT-MEASURED, not a red; this diff changes noComponentRegistry.registercall. The repo-widepnpm lintand the remainingcheck:*farm are CI's run.Notes
Session for this work:
https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16SScope fence honoured: objectui#7586 removed the
primaryFieldrung from these same lines and nothing here restores it — this is an addition to the ladder. Its pin,record-details.primaryFieldRetired-7586.test.tsx, is untouched and still green.🤖 Generated with Claude Code
https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
Generated by Claude Code