This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit cc4366d
fix(plugin-detail): record:details dedupes a titleFormat collapsed onto any field the template rendered (#10443)
Fixes #10360
Clause-②: no
## What
When no declared name pointer holds a value, the record page H1 is the
rendered `titleFormat`. `record:details` hides the row whose value
equals that rendered string, but it compared the string only against
`titleCandidates`: the two ADR-0079 resolver rungs and six literal
names. A template that collapsed onto any other field was not
recognised. `{contract_no} - {name}` with a blank `name` put
`HT-2026-003` in the H1 and again in the "Contract No" row directly
under it.
The template-scan branch keeps the comparison and widens the set it
compares against:
1. The candidate scan runs first, exactly as before, and a candidate
match still wins. No row that was hidden before is hidden differently
now.
2. Only when no candidate matches, the dedupe hides the first record
field (in record key order) whose `recordDisplayValueAt` value EQUALS
the rendered title AND that the template actually rendered. At most one
row goes.
"Actually rendered" is asked of `formatTitleTemplate` itself: blank that
one field on the record, render again, and see whether the title
changed. There is no second placeholder parser.
objectui#8351 ruling B is kept: a row goes only on equality with the
rendered string, never because a `titleFormat` exists. The
declared-pointer branch (objectui#9436, landed in objectui#10358) and
the empty-template walk are untouched.
## Mechanism assumptions, measured
- **A1 (reuse the renderer's placeholder parser): partly falsified,
route changed.** `formatTitleTemplate` exports no parser. Its
placeholder regexes are inline in the function body in
`@object-ui/core`'s `record-title.ts`, so reusing them literally would
mean a new `@object-ui/core` export, outside this claim's file surface.
Instead the renderer itself is the oracle (blank and re-render). It
therefore agrees by construction on every token shape
`formatTitleTemplate` accepts: `{{field}}`, whitespace inside the
braces, and dotted lookup paths such as `{account.name}`, where the
record field blanked is the first path segment. No regex was written.
- **A2 (equality through `recordDisplayValueAt`, at most one row):
confirmed. The example premise is falsified.** Two placeholders that
both hold `HT-2026-003` do not collapse. Each renders its own copy, the
H1 is `HT-2026-003 - HT-2026-003`, and both rows stay (pinned). Two
TOP-LEVEL placeholder fields cannot both equal a collapsed title. The
real two-equal case needs a dotted path. `{owner.nickname} - {rep}` with
a blank nickname renders `rep`'s value, and an expanded `owner` whose
display name is also `Ann` equals it too. The dedupe hides `rep`,
because its placeholder rendered the H1. It keeps `owner`, because
blanking `owner` leaves the title unchanged. A "first field the template
names" rule would hide `owner` and keep the duplicate (pinned). If two
fields both rendered the title AND both equal it, `.find` still hides
only one: the first in record key order. That case needs two dotted
lookups whose display names each equal the composite, so it is not
pinned.
- **A3 (the objectui#8351 lit controls stay true): confirmed, no
retarget.** `record-details.titleFormatNoDedupe-8351.test.tsx` is
unchanged and green (10/10) under the fix and under the reverse proof.
- **A4 (only the template-scan branch moves): confirmed.** The change
sits inside `if (interpolatedTitle)`, in the `else` that follows the
declared-pointer check. The DECLARED POINTER CONTROL case pins that a
template collapsing onto `contract_no` hides nothing while `nameField`
holds a value.
## Tests
The new
`packages/plugin-detail/src/renderers/__tests__/record-details.titleFormatPlaceholderDedupe-10360.test.tsx`
renders the real `page:header` beside the real body under one record
context, as the objectui#9436 agreement pin does. Each case reads the H1
the user sees and then which row drops. The viewport is pinned to
desktop so that `DetailSection` auto-hide cannot remove a row.
- THE CARD: the H1 is `HT-2026-003`. The body has no `HT-2026-003` and
no "Contract No".
- COMPOSITE CONTROL: the H1 is `HT-2026-013 - Acme Corporation`, and
both rows stay.
- SAME VALUE IN BOTH PLACEHOLDERS: the H1 is a composite, and both rows
stay.
- TWO FIELDS EQUAL THE H1: `rep` goes, and the derived `name` row stays.
- DECLARED POINTER CONTROL: only the pointer's row goes, and
`contract_no` stays.
**Red on base `c3025ead2`, before the fix.** THE CARD and TWO FIELDS
EQUAL fail; the first message is `expected 'Contract
NoHT-2026-003Name—Amount13' not to contain 'HT-2026-003'`. The other 3
cases pass. The H1 assertions pass on base, so the header really shows
what the card says.
**Reverse proof.** Run on the committed fix with `ablation-replace.mjs`
in WRAP mode. Each restore was proven by blob == HEAD and an empty `git
diff HEAD`.
- Restoring the candidate-only comparison turns THE CARD and TWO FIELDS
EQUAL red (2 failed, 16 passed). COMPOSITE, SAME VALUE, DECLARED
POINTER, all 10 cases of the objectui#8351 file and all 3 of the
objectui#9436 agreement file stay green.
- Dropping only the "the template actually rendered it" check turns TWO
FIELDS EQUAL red. The other 4 cases stay green.
The subject is imported by relative path from `src`, so neither leg
needed a build.
## Gates, at HEAD `84039bba8`
- `pnpm exec vitest run --maxWorkers=2 packages/plugin-detail/
packages/core/src/utils/__tests__/column-identity.ratchet.test.ts
packages/core/src/utils/__tests__/record-title` exited 0: 211 files (210
passed, 1 skipped), 2159 tests passed and 8 skipped. The run covers
every `record-details*` suite. It also covers the source-text pins that
read `record-details.tsx`: `recordDetailsInputs.spec-parity`,
`detailRendererUndeclaredKeys-8649` and `column-identity.ratchet`.
- The closure build `pnpm --workspace-concurrency=2 --filter
"@object-ui/plugin-detail^..." build` exited 0. It built 11 packages;
`test-support` has no build script.
- `pnpm --filter @object-ui/plugin-detail build` exited 0. That is vite
plus the dts plugin, which fails on type errors.
- `pnpm --filter @object-ui/plugin-detail type-check` (`tsc --noEmit &&
tsc -p tsconfig.test.json`) exited 0. `--listFilesOnly` confirms that
the test project includes the new file and the objectui#8351 file.
- The changeset gates all exited 0: `check-changeset-presence`,
`check-changeset-no-major`, `check-changeset-overwrite`,
`check-changeset-fixed`, `check:changeset-claims` and
`check:pending-changeset-literals`. `check:changeset-claims` is
report-only. It flagged 3 pending changesets,
`7997-detail-view-related-retired`, `8400-kanban-name-field-skip-set`
and `8649-detail-renderer-undeclared-keys`. I read each one whole, and
all three are still true against this diff.
- `check:new-line-citations` (0 new), `check:control-bytes`,
`check:test-path-roots` and `check:unreferenced-sources` all exited 0.
- ESLint on the 2 touched TS files found 0 errors. `record-details.tsx`
has 35 warnings, the same as base. The new test has 2 `no-explicit-any`
warnings, from the same helper signature the objectui#9436 pin uses. The
narrowing rests on three facts:
- The population is the plugin-detail `lint` script, `eslint .`, under
the root `eslint.config.js`.
- The file count is 2, read from `--format json`.
- No type-aware linting is configured (no `parserOptions.project` or
`projectService`), and no custom rule in `eslint-rules/` reads other
files. So this diff cannot move any untouched file's verdict.
Left to CI: the full `pnpm test` shards, repo-wide `pnpm type-check`,
`pnpm lint`, the `pnpm check` CLI self-check, and Build & E2E.
## Acceptance notes
- **Reported to the seat for filing, not filed here (class a).** The
page header and this dedupe render `titleFormat` through two different
functions. The header uses `PageHeaderRenderer`'s own `interpolate` plus
`cleanupTitleSeparators`; its comment records that it kept these in
objectui#9436. The dedupe, `getRecordDisplayName` and `DetailView` use
core's `formatTitleTemplate`. Both cases below were measured on this
branch, and in each a duplicate row survives that the widened scan
cannot see:
- With a whitespace-only `name`, the H1 is `HT-2026-003` but core
renders `HT-2026-003 -`, so the body still prints `HT-2026-003`.
`getRecordDisplayName` also returns `HT-2026-003 -`.
- With `{account} - {deal_no}` and an expanded `account`, the H1 is
`Q3-042` but core renders `Acme - Q3-042`, so the body prints `Q3-042`.
- The pending objectui#8351 changeset says the dedupe answers "whether
that string is some candidate's value". That is still true of the first
step. This PR's changeset, in the same release, describes the widened
second step.
- Whether a collapsed template should be the H1 at all is still out of
scope (triage note 3).
Session: `https://claude.ai/code/session_01BP8CMtACxTdLjqR6rhd33C`
---
_Generated by [Claude
Code](https://claude.ai/code/session_01BP8CMtACxTdLjqR6rhd33C)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3632060 commit cc4366d
3 files changed
Lines changed: 329 additions & 9 deletions
File tree
- .changeset
- packages/plugin-detail/src/renderers
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
426 | 428 | | |
427 | 429 | | |
428 | 430 | | |
| |||
516 | 518 | | |
517 | 519 | | |
518 | 520 | | |
519 | | - | |
| 521 | + | |
| 522 | + | |
520 | 523 | | |
521 | 524 | | |
522 | 525 | | |
523 | | - | |
524 | | - | |
525 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
526 | 529 | | |
527 | 530 | | |
528 | 531 | | |
| |||
547 | 550 | | |
548 | 551 | | |
549 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
550 | 578 | | |
551 | 579 | | |
552 | 580 | | |
553 | 581 | | |
554 | 582 | | |
555 | 583 | | |
556 | 584 | | |
557 | | - | |
| 585 | + | |
| 586 | + | |
558 | 587 | | |
559 | | - | |
560 | | - | |
561 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
562 | 597 | | |
563 | 598 | | |
564 | 599 | | |
| |||
0 commit comments