This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(plugin-detail): resolveTitleField delegates to the shared ADR-0079 ladder - #7585
Merged
Merged
Conversation
…9 ladder `resolveTitleField` ran a second, private record-title ladder topped by `def.primaryField` — a `DetailViewSchema` key read off an OBJECT def, ranked above the canonical `nameField` (AGENTS.md Commandment #0.1) — with a literal five-name walk underneath that matched on NAME with no type check. It now calls `@object-ui/core`s `resolveNameField` and nothing else, so the detail page, the list column and the lookup chip cannot disagree about which field titles an object. ADR-0079 collapsed ~6 divergent resolvers for exactly this reason; this one grew back. No producer can put `primaryField` on an object: the spec object schema is a strictObject that answers unrecognized_keys, and objectstack#6326 removed the identical read from two lint rules. A census across both repos found zero object payloads carrying it. `DetailViewSchema.primaryField` is untouched. `deriveHighlightFields` asks the objectui#4914 retirement gate about the title field before skipping it, so an object whose only retired-typed field is the one that titles it still gets its report. Fixes #7287 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC
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
|
`ObjectDefLike` is re-exported from this package index and
@object-ui/plugin-detail is published, so the member is part of a shipped
.d.ts. Deleting it narrows a published type — an external
`const d: ObjectDefLike = { primaryField: 1 }` compiles today and would stop
— which is a contract change owed its own card, not a rider on a behaviour
fix. What the member DESCRIBES (a key no object payload can carry) is a
different question from whether it is REACHABLE, and it is.
No read comes back: resolveTitleField stays a pure delegation to
resolveNameField, and deriveHighlightFields still asks the objectui#4914
retirement gate before skipping the title field. The member carries a
comment marking it accepted-but-unread so it is not tidied away again
without noticing it is published.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC
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
|
…e and pin it The skip set previously read primaryField, nameField and displayNameField separately and skipped EVERY declared one; it now skips the single field the shared ADR-0079 ladder resolves. The docstring called that "subsumes the three separate reads", which was false: the ladder PICKS one rung where the old set added every one, so the two disagree on an object declaring nameField and the deprecated displayNameField alias to DIFFERENT fields. Skipping only the winner is intended. getRecordDisplayName reads the same declaredNameField ladder and renders the WINNER value, so the losing alias is an ordinary field the H1 never shows — hiding it removed a field and spent a strip slot for nothing. It also makes the heuristic branch agree with the DECLARED branch, which has only ever filtered a single title field; the "#2548 follow-up" note claiming both branches agree was until now true only for objects declaring one alias. That input was the one case the suite did not cover. It is now pinned, and the changeset names the behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC
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
|
os-project-manager
marked this pull request as ready for review
September 4, 2026 03:21
os-project-manager
enabled auto-merge
September 4, 2026 03:21
os-justin
pushed a commit
that referenced
this pull request
Sep 6, 2026
…s off an object def `primaryField` is a `DetailViewSchema` key (`@object-ui/types` `views.ts`) — a VIEW key `DetailView.resolveDisplayTitle` reads off `schema` and is welcome to. Two consumers also read it off an OBJECT def, where nothing can declare it: `@objectstack/spec`'s object schema is a `strictObject` answering `unrecognized_keys: ['primaryField']` and `ObjectSchema.create()` throws. Measured on the shipped `@objectstack/spec@17.2.0` dist: `primaryField` in 0 files, canonical `nameField` in 68. objectstack#6326 removed the identical read from two lint rules; objectui#7287 / PR #7585 removed it from `resolveTitleField`. These two survived it, while three of this repo's own changelogs already called the probe "not a spec property — always undefined". Two different repairs, not one patch twice. `@object-ui/components` — `PageHeaderRenderer`'s record-chip chain ranked it directly under `schema.title` and ABOVE the unified ADR-0079 resolver, on the surface that renders the ACTUAL H1 of a synthesized record page. The rung is gone, so the heading comes from `titleFormat` -> the ADR-0079 resolver -> the record-key walk, the precedence `DetailView`'s own header already uses. `@object-ui/plugin-detail` — `record:details`' ladder decides WHICH ROW the body grid hides so the H1's field is not repeated under it. That is a different question from "what is the title", and `primaryField` was its first candidate. The rung is gone and the docstring, which described the header chip as resolving "from objectSchema.primaryField" and went stale when PR #7585 landed, now describes the chip as it is. User-visible on purpose: a payload carrying the off-spec key anyway gets a different H1 and a different surviving grid row. Nothing spec-legal reaches either path. `DetailViewSchema.primaryField` and the deliberate `ObjectDefLike.primaryField` declaration in `buildDefaultPageSchema` are untouched. Two fixtures spelled the key on an object def and now spell the canonical `nameField`; neither suite ever read its effect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
This was referenced Sep 6, 2026
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Sep 9, 2026
…s off an object def (objectstack-ai#8179) `primaryField` is a `DetailViewSchema` key (`@object-ui/types` `views.ts`) — a VIEW key `DetailView.resolveDisplayTitle` reads off `schema` and is welcome to. Two consumers also read it off an OBJECT def, where nothing can declare it: `@objectstack/spec`'s object schema is a `strictObject` answering `unrecognized_keys: ['primaryField']` and `ObjectSchema.create()` throws. Measured on the shipped `@objectstack/spec@17.2.0` dist: `primaryField` in 0 files, canonical `nameField` in 68. objectstack#6326 removed the identical read from two lint rules; objectui#7287 / PR objectstack-ai#7585 removed it from `resolveTitleField`. These two survived it, while three of this repo's own changelogs already called the probe "not a spec property — always undefined". Two different repairs, not one patch twice. `@object-ui/components` — `PageHeaderRenderer`'s record-chip chain ranked it directly under `schema.title` and ABOVE the unified ADR-0079 resolver, on the surface that renders the ACTUAL H1 of a synthesized record page. The rung is gone, so the heading comes from `titleFormat` -> the ADR-0079 resolver -> the record-key walk, the precedence `DetailView`'s own header already uses. `@object-ui/plugin-detail` — `record:details`' ladder decides WHICH ROW the body grid hides so the H1's field is not repeated under it. That is a different question from "what is the title", and `primaryField` was its first candidate. The rung is gone and the docstring, which described the header chip as resolving "from objectSchema.primaryField" and went stale when PR objectstack-ai#7585 landed, now describes the chip as it is. User-visible on purpose: a payload carrying the off-spec key anyway gets a different H1 and a different surviving grid row. Nothing spec-legal reaches either path. `DetailViewSchema.primaryField` and the deliberate `ObjectDefLike.primaryField` declaration in `buildDefaultPageSchema` are untouched. Two fixtures spelled the key on an object def and now spell the canonical `nameField`; neither suite ever read its effect. Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Sep 16, 2026
This was referenced Sep 24, 2026
feat(types)!: retire FilterUISchema.filters[].operator on the filter-ui node (objectui#10611)
#10760
Merged
This was referenced Sep 28, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #7287
Clause-②: no— re-verified on this diff atac41b2a51, not carried forward. Four mechanical checks against merge-baseccb3ad78a62b:packages/typesfiles in the diff: 0 (lit controlpackages/plugin-detail/= 4).views.tsblobbe5b9d2e3e21…identical at base and head;DetailViewSchema.primaryFieldstill declared.primaryField: 'subject',); lit control — the same regex matches 36 added lines.ObjectDefLikemember set: identical in order, 10 members, none removed, none added.index.tsx: byte-identical (diffexit 0).resolveTitleField's signature: unchanged.ObjectDefLike.primaryFieldstays declared but never read. The interface is re-exported atpackages/plugin-detail/src/index.tsx:182and@object-ui/plugin-detailis published (v17.6.0,exports["."].types→./dist/index.d.ts), so removing the member would narrow a shipped type — verified on the artifact, not inferred: it is emitted at line 40 ofdist/synth/buildDefaultPageSchema.d.ts(lit control, siblingstageField= 3 hits in that same file;index.d.tsshows 0 for both, so a grep there proves nothing). Retiring it is a contract change owed its own card. Code reads ofdef.primaryField: 0.What changed
resolveTitleFieldnow calls@object-ui/core'sresolveNameFieldand nothing else:ADR-0079 collapsed ~6 divergent record-title resolvers onto that one ladder. This module grew one back. The repair is delegation, not a second ladder that agrees today — two ladders that agree now diverge on the next change, which is the entire history of this defect.
Two reads went with it:
def.primaryField, and the literal['name','full_name','title','subject','display_name']walk that matched on NAME with no type check.Three user-visible changes, all deliberate and pinned
1. A derived title now resolves. An object with no conventional name field —
{ due_at: datetime, headline: text }— resolved tonullhere while every other surface titled the recordheadline.2. A
selectnamedtitleis no longer mistaken for the title field. The literal walk matched on name alone; the shared ladder rejects non-title types.3. The highlight strip's skip set now skips ONE field, not every declared role. It previously read
primaryField,nameFieldanddisplayNameFieldseparately and skipped whatever each found; it now skips the single field the ladder resolves. These differ on exactly one input: an object declaringnameFieldand the deprecateddisplayNameFieldalias to different fields. The old set skipped both; this skips only the winner.Skipping only the winner is intended.
getRecordDisplayNamereads the samedeclaredNameFieldladder and renders the winner's value, so the losing alias is an ordinary field the H1 never shows — hiding it removed a field and spent a strip slot for nothing, which is the class of bug this card is about. It also makes the heuristic branch agree with the declared branch, which has only ever filtered a singletitleField: the "#2548 follow-up" note in that branch claims both branches agree, and until now that held only for objects declaring one alias.deriveHighlightFieldsasks the objectui#4914 retirement gate about the title field before skipping it. Skipping first would have silenced the report for an object whose only retired-typed field is the one that titles it — the strip would look right while the gate went quiet.The census — card step 1, genuinely unmeasured until now
Nothing produces
primaryFieldon an object payload.primaryFieldin shipped@objectstack/spec@17.2.0dist/nameField→ 68 filesprimaryField?:inpackages/types/src/**views.ts, onDetailViewSchema)summaryFields?:/recordNavigation?:/sectionGroups?:→ 1 eachprimaryField, objectstacknameFieldpresent in objectql fixtures/engineprimaryField, objectuiThe structural half is stronger than a census:
@objectstack/spec's object schema is astrictObject.ObjectSchema.safeParseanswersunrecognized_keys: ['primaryField']andObjectSchema.create()throws — which is why objectstack#6326 removed this identical read from two lint rules. This PR is the objectui half of a removal the sibling repo already ruled on. Same shape as theobjectDef.titleFieldread objectui#6531 measured and #6557 removed.The census is about producers; the surviving type member is about consumers who type their own defs. That is why zero producers does not license deleting it.
The two divergence examples — executed, not reasoned
Triage was explicit that it had not run either resolver. Both were run, and the RED output below is the "before":
resolveTitleField{ due_at: datetime, headline: text }nullheadlineheadline{ title: select, body: text }titlebodybody{ primaryField: 'ref_no', nameField: 'name' }ref_nonamenameThe
headlinecase is worse than the card framed it.resolveTitleFieldis how the detail page predicts what the H1 shows — but the H1 is rendered by core'sgetRecordDisplayName. On that object the H1 showedheadline's value whileresolveTitleFieldreturnednull, soderiveHighlightFieldsskipped nothing andheadlinebecame the first chip directly under a heading already showing it. It is now pinned as an equality across three surfaces: the field the strip skips, the field the list leads with (leadWithNameField), and the field whose value the H1 renders.Verification — on
ac41b2a51primaryFieldback on top of the ladder. Mutation proven on disk first (blob177c1d55…→0ea5032b…, marker count checked, hard exit if not) →Tests 3 failed | 6 passed, exactly the three rung tests.b6466f98…→9838c1ef…, marker lines 2 and the injecteddisplayNameField) skip.addline 1) →Tests 1 failed | 9 passed, failing precisely onexpected [ 'priority' ] to include 'legacy_title'. That is the one input where old and new disagree, so the pin is on the behaviour rather than the spelling.trap ... EXIT INT TERMwith absolute paths viagit checkout HEAD -- ABSOLUTE_PATH:git diff HEADempty and on-disk blob back to the HEAD blob, residual markers 0. The second ablation's first attempt aborted on its own guard (my expected marker count was wrong —grep -ccounts lines, not occurrences); it refused to measure, the trap restored the tree, and it was re-run with the correct expectation rather than nudged until green.vitest.config.mts:408aliases@object-ui/coretopackages/core/srcand:427aliases@object-ui/plugin-detailtopackages/plugin-detail/src; the tests import the subject relatively. Nodiston the resolution path.pnpm exec vitest run packages/plugin-detail/from the repo root —Test Files 131 passed (131),Tests 1189 passed (1189), lock verdictcommand-exit 0. The wider sweep (plugin-detail+app-shell+core+components+ the console fixture) ran green on the previous head atTest Files 1089 passed (1089),Tests 11522 passed | 1 skipped; this head's delta is confined toplugin-detail, so that package's suite is the re-run — a declared narrowing, with CI running the full farm regardless.plugin-detail+app-shellafter building their dependency closures —Scope: 2 of 47 workspace projects, bothtsc --noEmit && tsc -p tsconfig.test.jsonechoed andDone.check:control-bytes—OK (scanned 6247 tracked text file(s));check:phantom-deps—Every in-scope import is declared by the package that publishes it.;check:self-import—No package names itself inside its own src/.;check-changeset-presence—4 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s);check-changeset-no-major—No changeset declares a major bump.Plus a control-byte self-scan of every changed file: clean.check:readme-exportsis NOT MEASURED, not red. All 75 findings are the prerequisite form "type entry./dist/index.d.tsis not on disk -- runpnpm buildfirst" (0 lines of any other form), naming app-shell / cli / plugin-ai / plugin-gantt and neverplugin-detail(lit control:plugin-ganttappears 43 times in the same file). It wants a full-repo build this seat did not run, and this diff touches no README and — as measured above — no export surface.Declared narrowing — lint. The gate is
turbo run lint, i.e. each package's owneslint .; this diff touches exactly one package.packages/plugin-detaillinted whole: 184 files, 0 errors (exit 0); changed files at 0 errors each (warnings only, against 894 pre-existing there). The narrowing cannot hide anything: the singleeslint.config.jsconfigures no type-aware linting (grepforprojectService/parserOptionsexits 1), so a verdict is a per-file function. The wide shape was run once too — rooteslint . --no-inline-configover 4274 files (count from--format json) shows 93 errors, all pre-existing, none in a file this PR touches.Not in this PR — out of the fence
Two more consumers read
primaryFieldoff an OBJECT def, both outside this card's fence and both user-visible on their own:packages/components/src/renderers/layout/containers.tsx(the record-chip / page-headerresolvedTitlechain) andpackages/plugin-detail/src/renderers/record-details.tsx(a fourth inlinetitleCandidatesladder). Handed up with their evidence; the coordinator is filing them.Generated by Claude Code