This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 3261e64
Fixes #10447
Fixes #10446
Clause-②: no — one renderer's private interpolation rebinds to the
existing core authority, and core's empty test aligns with
`recordDisplayValueAt`. No export, schema or accept set moves.
Folded pair, one branch, executed from the triage on each card (comments
5827587063 and 5827564760) and the PM claims 5828659772 / 5828664602.
objectui#10446's core fix lands first, then the H1 rebinds, so no commit
on this branch renders `HT-2026-003 -` in the H1.
## Commits
1. `4c140cb9c` — objectui#10446, `@object-ui/core`.
`formatTitleTemplate` judges each placeholder through the value half of
`recordDisplayValueAt`, now the module-private `displayValueOf`: trim,
then empty, with an expanded reference reduced to its display name. It
used to test the raw value against null, undefined and the empty string
on its own, so a whitespace-only value counted as resolved and the final
whitespace collapse left its separator dangling. One implementation of
the emptiness rule instead of two spellings of it. Exported signatures
unchanged.
2. `ef988ac2f` — objectui#10447, `@object-ui/components`. The record
page H1's `titleFormat` rung hands the declared template (string or
Expression envelope) to core's `formatTitleTemplate` and takes its
answer, including core's empty "nothing resolved"; the rung's separate
unresolved-token test is gone. `cleanupTitleSeparators` had no other
caller and is deleted with its test file. The rungs' order
(objectui#9436) does not move.
3. `47536ebd8` — a typing fix inside the same helper: the declaration
build refused a copy that re-widened to possibly-undefined (TS18048).
4. `b06b17020` — prose only: two pending changesets reconciled with the
rung's one interpolator (see "Reconciled pending changesets" below), and
this change's changeset names both.
## Measured before the change: the two interpolators, token by token
Probe at base `6881e9e47`: the real `page:header` H1 and the header's
own rung (its `interpolate` plus `cleanupTitleSeparators`, plus its
"contains a brace, so decline" test) against core's
`formatTitleTemplate`, same record. "declines" means the rung handed
over to the unified resolver, which renders core's way.
| Token rule | header rung | core | H1 before | H1 after |
|---|---|---|---|---|
| `{account} - {deal_no}`, `account` expanded to Acme | `Q3-042` | `Acme
- Q3-042` | `Q3-042` | `Acme - Q3-042` |
| `{a} - {b}`, `b` whitespace-only | `A` | `A -` | `A` | `A` |
| `{a}, {b}`, `b` missing | `A,` | `A` | `A,` | `A` |
| `Session — {a}`, `a` missing | `Session` | empty | `Session` | next
rung |
| `Static title` (no placeholder) | `Static title` | empty | `Static
title` | next rung |
| `{status}`, select `in_progress` | `In Progress` | `in_progress` | `In
Progress` | `In Progress` (kept) |
| `{{a}} - {{b}}` | declines | `A - B` | `A - B` | `A - B` |
| `{ a } - { b }` | declines | `A - B` | `A - B` | `A - B` |
| `{first-name} {a}` | declines | `Ada L` | `Ada L` | `Ada L` |
| value containing a brace | declines | the value | the value | the
value |
| controls: dotted path, lookup with no display name, array, null, empty
string, `0`, Expression envelope, the separators `·` `:` `–`, a 3-part
template with its middle empty | equal | equal | equal | equal |
After the change every row where core answers non-empty has H1 equal to
core (select rows: equal to core over the labelled record). Where core
answers empty, the H1 walks on to the next rung, as
`getRecordDisplayName` walks from its template rung.
## Select option labels (H2): kept, without touching
`formatTitleTemplate`'s signature
- The header routed a top-level select token through `fieldOptionLabel`;
core has no such hook.
- `withOptionLabels` builds a copy of the record whose select values
read as their option labels, and the rung renders core over that copy.
`optionLabelFor` is the one label lookup in the file, shared with
`interpolate`, so the two readers cannot drift.
- Like-for-like with the dedupe: only top-level scalars are mapped
(null, undefined, expanded references and arrays stay as they are), and
a mapped value is never empty because the label falls back to the raw
value. So the same placeholders resolve on the copy as on the raw
record, and `record:details`, which renders the template over the raw
record, still decides about the field the H1 shows. Pinned in
plugin-detail (the Status-row cases below).
- In-repo census, with a lit control. Instrument: `git grep -n -E
"titleFormat['\"]?\s*[:=]" -- ':!*.test.*' ':!**/__tests__/**'
':!**/CHANGELOG.md'`. The one object declaration it finds outside tests
is `content/docs/guide/building-crud-app.md`'s `titleFormat: '{title}'`,
a text field, so no in-repo `titleFormat` names a select field. Control:
the same pattern over test files is non-empty and includes
`page-header-title.test.tsx`'s `{status}` select case. First-party
producers outside this repo (objectstack platform objects, e.g.
`sys_audit_log` with `{action} · {object_name}` and `sys_member` with
`{user_id} ({role})`) do name select fields, and each of those also
declares a `nameField`, so their template rung is reached only when that
pointer is blank on a record. Re-derive with `git grep -n titleFormat
origin/main -- 'packages/**/src/**'` in objectstack.
## `interpolate`'s callers (H3)
It keeps two callers, both `page:header`'s own templates: `title` and
`subtitle`. They are unchanged. The `titleFormat` rung was the third and
no longer comes through it, so `interpolate` stays. Instrument: `grep -n
"interpolate(" packages/components/src/renderers/layout/containers.tsx`.
## Who the #10446 rule reaches (H4)
- `formatTitleTemplate` is called by `getRecordDisplayName`'s template
rung (core), `DetailView.resolveDisplayTitle` and the `record:details`
H1 dedupe (plugin-detail), and now `page:header`. `@object-ui/app-shell`
re-exports it as `formatRecordTitle`.
- `getRecordDisplayName`, so every resolver-backed surface: app-shell
`RecordDetailView`; components `page:header`; core `sort-values`; fields
`index` and `LookupField`; plugin-calendar `ObjectCalendar`;
plugin-detail `DetailView` and `RelatedList`; plugin-gantt
`ObjectGantt`; plugin-kanban `ObjectKanban`; plugin-list
`ObjectGallery`; plugin-map `ObjectMap`; plugin-tree `ObjectTree`.
Instrument: `git grep -n "getRecordDisplayName(" -- 'packages/**/src/**'
'apps/**/src/**' ':!**/__tests__/**' ':!*.test.*'`.
- The existing `record-title` suites stay green, and every other test
file that mentions `titleFormat` was run too (Gates below).
## Pins, red on base then green on head
New files:
-
`packages/core/src/utils/__tests__/record-title.whitespacePlaceholder-10446.test.ts`
-
`packages/components/src/__tests__/page-header-title.oneInterpolator-10447.test.tsx`
-
`packages/plugin-detail/src/renderers/__tests__/record-details.titleFormatOneInterpolator-10447.test.tsx`
Red leg, from committed head `ef988ac2f`: both source files checked out
at base `6881e9e47`, new tests kept. On-disk proof before the run:
`displayValueOf` 0 hits and the old empty test 1 hit in
`record-title.ts`; `withOptionLabels` 0 hits and
`cleanupTitleSeparators` 2 hits in `containers.tsx`. Result `Tests 11
failed | 25 passed (36)`:
- core: THE CARD `expected 'HT-2026-003 -' to be 'HT-2026-003'` at both
doors; blank leading placeholder `expected '- Acme' to be 'Acme'`;
agreement rows "spaces" `expected '- K' to be 'K'` and "no-break
spaces".
- `page:header`: THE CARD `expected 'Q3-042' to be 'Acme - Q3-042'`;
whitespace `expected 'HT-2026-003' to be 'HT-2026-003 -'` (H1 against
core); comma `expected 'Q3-042,' to be 'Q3-042'`; literal prefix
`expected 'Session' not to be 'Session'`.
- `page:header` beside `record:details`: THE CARD `expected 'Q3-042' to
be 'Acme - Q3-042'`; #10446 in the page `expected 'HT-2026-003' to be
'HT-2026-003 -'`.
- The 25 that stay green are the controls, including every select
option-label case: the H1's label behaviour is kept, not changed.
Restore leg: `git checkout HEAD --` both paths inside an EXIT/INT/TERM
trap, blob hashes equal to `ef988ac2f`'s (`d7e714385`, `86a980376`),
`git diff HEAD` empty. `47536ebd8` differs from `ef988ac2f` only by the
typing fix inside `withOptionLabels`, a file the red leg replaces with
base, so the red and green numbers carry over. Green leg: the three
files pass on head inside the package runs listed under Gates; the two
render files alone read `Tests 21 passed (21)`.
## Gates
Code, type and test gates ran at `47536ebd8`; the changeset gates were
re-run on the prose commit `b06b17020` (no code or test file moved
between the two).
- `pnpm --workspace-concurrency=2 --filter
"@object-ui/plugin-detail^..." build` (the dependency closure, includes
core and components): exit 0.
- `type-check` of `@object-ui/core`, `@object-ui/components`,
`@object-ui/plugin-detail`: `Done` ×3, exit 0. Each package's test
program lists its new test file (`tsc -p tsconfig.test.json
--listFiles`, 1 match per package).
- `pnpm exec vitest run packages/core/`: `Test Files 172 passed (172)`,
`Tests 3501 passed (3501)`.
- `pnpm exec vitest run packages/components/ packages/plugin-detail/`:
`Test Files 507 passed | 2 skipped (509)`, `Tests 4976 passed | 25
skipped (5001)`.
- Every other test file that mentions `titleFormat` (app-shell, fields,
plugin-dashboard, plugin-grid, plugin-map, react, types): `Test Files 21
passed (21)`, `Tests 218 passed (218)`.
- `pnpm --filter @object-ui/components run test:dist`: `Test Files 2
passed (2)`.
- `check-changeset-presence` (at `b06b17020`): `✅ 7 source file(s) of 3
released package(s) changed, and this change declares 1 changeset(s):
.changeset/10447-one-title-interpolator.md.`
- `check:new-line-citations` (at `b06b17020`): `VERDICT
new-cross-file-line-citations: 0 new citation(s)`.
- `check:control-bytes` (at `b06b17020`): `✅ check-control-bytes: OK`.
- At `b06b17020`: `check-changeset-no-major` `✅ No changeset declares a
major bump.`; `check-changeset-fixed` `✅ All workspace packages are in
the changeset fixed group.`; `check:pending-changeset-literals` `✅ No
test source names a pending changeset.`; `check-changeset-overwrite`
exit 0, report-only, listing exactly the two reconciled entries (`2
modified, 0 deleted`); `check:changeset-claims` exit 0, report-only, and
the entries it still lists name the touched files for other aspects
(reviewed; none describes the `titleFormat` rung's interpolation).
- `check:test-path-roots`, `check-vi-mock-override-shape`: exit 0.
- eslint on the six touched source and test files: 0 errors (warnings
are the repo-wide `no-explicit-any` / `only-export-components` level).
The package-wide `pnpm lint` is CI's run; not measured here.
## Reconciled pending changesets
Two changesets still pending in the same release described the rung as
rendered by the header's own interpolation. Each is reconciled in the
form objectui#10533 / #10540 used, with its frontmatter byte-identical
(md5 of the frontmatter block equal before and after:
`3d9e2a1e59bc11924bb99ffd9eea81e3` and
`ce888ebde4729564f67bca69a7928743`):
- `.changeset/9436-page-header-declared-pointer-order.md`: item 3 now
reads "rendered at this change with the header's own interpolation", and
"At this change, objects that declare a pointer and no `titleFormat`,
and objects that declare a `titleFormat` and no pointer, render exactly
as before". A dated note follows: "Dated note, 2026-09-25 — the record
title's titleFormat rung now renders through core's formatTitleTemplate
— objectui#10447". It states that option labels are still translated,
via `withOptionLabels`, and that the order is unchanged.
- `.changeset/9174-interpolate-fastpath-trim.md`: "At this change
`page:header`'s `title`/`subtitle` (and the record-title `titleFormat`)
all went through `interpolate()`". The same dated note follows, stating
that `title` and `subtitle` still go through `interpolate()`, so that
entry's fix holds for them unchanged.
- `.changeset/10447-one-title-interpolator.md` names both entries.
Every other pending `.changeset/*.md` was re-grepped for present-tense
claims about the header's own `titleFormat` interpolation or
`cleanupTitleSeparators`, and none has one. Instrument: `git grep -n -i
-E "cleanupTitleSeparators|separator
cleanup|interpolat|formatTitleTemplate|titleFormat" -- .changeset/`. The
nearest hits are about `page:header`'s `title` (objectui#10117, #8923)
or other readers, and still hold.
## File surface
- `packages/core/src/utils/record-title.ts`, and beside it the new
`packages/core/src/utils/__tests__/record-title.whitespacePlaceholder-10446.test.ts`.
- `packages/components/src/renderers/layout/containers.tsx`, and beside
it the new `page-header-title.oneInterpolator-10447.test.tsx`, a
docblock-only edit to `page-header-title.test.tsx`, and the deleted
`cleanup-title-separators.test.ts` (its function had no other caller).
-
`packages/plugin-detail/src/renderers/__tests__/record-details.titleFormatOneInterpolator-10447.test.tsx`:
new, test-only, outside the claims' listed surface ("tests beside
each"). It is where `page:header` and `record:details` render together
(the objectui#9436 and objectui#10360 agreement files live beside it),
which the H5 pin needs. No plugin-detail source changes.
- `.changeset/10447-one-title-interpolator.md` (patch on
`@object-ui/core` and `@object-ui/components`), plus the two reconciled
entries above.
## Scope
- objectui#10499 is not addressed here. The H1's row source is unchanged
(`ctx.data`, the raw served row). This neither helps nor hinders that
fix beyond one fact: the rung and `record:details`' dedupe now call the
same function and differ only in the row they pass it.
- objectui#10462 (action-entry `params`, same file) is untouched.
## Acceptance notes
- Behaviour change on the rung, by the one-authority rule: a template
none of whose placeholders resolves no longer shows its literal text in
the H1 (`Session — {user_id}` with no user used to read `Session`); the
H1 walks on to the next rung.
- A resolved placeholder now emits the trimmed string
`recordDisplayValueAt` returns. After core's whitespace collapse this is
visible only where a padded value sits against a non-space literal, for
example `({code})`.
- `DetailView.resolveDisplayTitle` still renders the template over the
raw record, so on the non-synthesized detail header a select token reads
as its raw value where `page:header` shows the label. That predates this
change and is read from source only, not measured through a running
page.
---
_Generated by [Claude
Code](https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent fde4caf commit 3261e64
10 files changed
Lines changed: 683 additions & 136 deletions
File tree
- .changeset
- packages
- components/src
- __tests__
- renderers/layout
- core/src/utils
- __tests__
- 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
| |||
This file was deleted.
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments