Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit 0ffc423

Browse files
fix(components): page:header stops drawing an empty breadcrumb slot; the key is ignored until the spec retires it (objectui#11166) (#11172)
Fixes #11166 Clause-②: no Implements the renderer and docs half of triage `5903152845` (ruling RETIRE). The spec half is objectstack-ai/objectstack#20758; this PR does not depend on it. Dispatched by the `domain:ui` seat 2 PM, session `https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec`, branch `claude/issue-11166-page-header-breadcrumb-retire`. ## What changed - **Renderer.** `PageHeaderRenderer` in `packages/components/src/renderers/layout/containers.tsx` no longer reads `breadcrumb`. It drops both empty `data-page-breadcrumb-slot` divs: the record-chip layout's (above `RecordTitleChip`) and the bare layout's (above the title row). An authored `breadcrumb` (`true` or `false`, in `properties` or on the node) renders exactly like an absent key: no slot and no error. ⛔ No trail is drawn in its place. - **Registration.** `inputs` keeps `{ name: 'breadcrumb', type: 'boolean' }` and adds a description saying the key is ignored. It stays declared while the installed spec (17.4.0) still accepts the key; the measured reasons are in Zone 2 item 2 below. It leaves at the pin bump that brings objectstack#20758's tombstone, when the parity file's forward direction will name it. - **Docs.** `content/docs/layout/page-header.mdx` drops the key's prop-table row, the "renders an empty slot element" paragraph, and the layout diagram's `(breadcrumb slot)` line. **One sentence** replaces the paragraph. I chose one sentence over none because the spec still publishes the key as "Show breadcrumb", default `true`, and this page is where an author learns it draws nothing. - **Declared surface extension: `content/docs/guide/layout.md`.** It is outside the claimed surface, but this change makes it false, so it is a must-fix. - Its `page:header` Schema API excerpt listed `breadcrumb?: boolean // default true — the breadcrumb slot above the title`. That line goes. - Three callouts called the key "a boolean display toggle (for the slot above the title)". They now say it is a boolean the renderer ignores. - Same file, same defect class: the overview bullet "PageHeader - Consistent page headers with title, breadcrumbs, and actions" drops "breadcrumbs". Neither the canonical renderer nor `@object-ui/layout`'s `PageHeader` draws one; the latter's render body has no breadcrumb element. - The claim did not check open PRs against this file. Please check for overlap before landing. - **Changeset.** `'@object-ui/components': patch`, which names the visible spacing shift. ## Zone 2 measurements (base `c2a8d23c6`) 1. **Sites.** All confirmed by content: - the read `const breadcrumb = (schema?.breadcrumb ?? schema?.properties?.breadcrumb) !== false;`; - the two `{breadcrumb && (...data-page-breadcrumb-slot...)}` blocks; - the "breadcrumb/action slots" section comment, now "action slot". **Root class strings are byte-unchanged.** The bare root is `flex flex-col gap-2 pb-4 border-b`, and the record root keeps `gap-3 sm:gap-4`. The demo pin `pageheader-with-actions.test.tsx` stays green on `gap-2` / `pb-4` / `border-b`. **The rendered spacing does move.** Measured in Chromium 1194 (headless) with plain CSS equal to the Tailwind utilities, not the built stylesheet: | Layout | Title offset in the header | Header height | |---|---|---| | bare | 8px, now 0px | 56px, now 48px | | record | 4px, now 0px | 60px, now 56px | The empty div was a flex item in the root's `gap-2` column (bare), or carried `mb-1` (record). A header that already set `breadcrumb: false` does not move. 2. **Registration inputs list `breadcrumb`.** ⛔ The parity file `apps/console/src/__tests__/registry-inputs-spec-parity.test.ts` is untouched. - It has no `page:header.breadcrumb` row. `NO_READ_SITE_TO_PIN` lives in its member-pin ledger, which covers array- and object-armed inputs only, and `breadcrumb` is boolean. So removing the read moves no row, and the file stays green at head. - Why the input must stay, measured with a one-off probe (not kept): - with the input declared, an authored `breadcrumb: true` draws **zero** manifest diagnostics; - with the input filtered out, it draws `unknown-prop`, whose message says page:header has no prop "breadcrumb"; - the control, the key absent with the input filtered out, draws zero. - Dropping the input would also be demanded back by the parity file's reverse direction, which reads every accepted spec key. Covering it needs an `UNPUBLISHED_EXEMPTIONS` entry in that file, which belongs to objectui#11086. 3. **Docs.** The key leaves all three sites. One sentence was chosen (see above). 4. **Existing pins.** None moved. - `git grep -n breadcrumb -- '*.test.*'` under `packages/components` and `examples/schema-catalog` hits only `ui:breadcrumb` and config-panel suites. - The objectui#11162 demo pins assert the root class strings, which did not change. - The `actions-slot` pins are green: the full components suite is below, and the new pin asserts `data-page-actions-slot` in both layouts. ## Tests (all at head `8ef26fe20`, unless marked) - **New pin: `packages/components/src/__tests__/page-header-breadcrumb-ignored-11166.test.tsx`.** It mounts through the real `SchemaRenderer` and registry, in both layouts. - In each layout, three authored spellings are tested: `properties.breadcrumb: true`, `breadcrumb: true` on the node, and `properties.breadcrumb: false`. - Each renders no slot and no `breadcrumb` text anywhere in the header, with no `console.error`. - Each renders the same header markup as the absent-key CONTROL, with React ids blanked. The control asserts the `h1` and `data-page-actions-slot`, so the test cannot pass on an empty header. - Result: `Tests 8 passed (8)`, run at `26bc72b6e`, where `containers.tsx` has the same blob as head. - **`@object-ui/components` plus `examples/schema-catalog`.** Run as `pnpm exec vitest run packages/components/ examples/schema-catalog/ --shard=N/4`, four shards under the verify lock. The unsharded run hit the 560s timeout on the shared box, so it was sharded. | Shard | Test files | Tests | |---|---|---| | 1/4 | 94 passed | 1354 passed, 7 skipped | | 2/4 | 94 passed | 1534 passed, 10 skipped | | 3/4 | 93 passed | 1796 passed | | 4/4 | 92 passed, 1 skipped | 827 passed, 7 skipped | That is 374 files, which equals the 376 `*.test.*` files `git ls-files` lists minus two `.snap` files. - **Cross-package readers: 75 files, 75 passed, 2006 tests.** This covers every test outside those two trees that reads `containers.tsx` or the two edited docs pages from disk, or names `page:header`. That includes: - `registry-inputs-spec-parity`, `public-contract` and `component-input-union-specimens`; - `widget-dom-leak-sweep`, `block-config*` and `PageBlockInspector.i18n`; - the RecordDetailView header suites, `page-breadcrumbs-refusal-8871` and `zod-mirror-parity`; - `scripts/__tests__/check-doc-component-types` and `doc-version-claims`. - **Type-check.** `pnpm --filter @object-ui/components type-check` exits 0, after `pnpm --workspace-concurrency=2 --filter '@object-ui/components^...' build`. `tsc -p tsconfig.test.json --listFiles` includes the new pin. ### Ablation (fix committed first; mutation and restore via `ablation-replace.mjs` WRAP mode) Each leg re-planted the old read-plus-slot in one layout only. - **Bare leg: 4 failed, 4 passed.** Exactly the four bare rows went red: the control, both `true` spellings, and `false` because it no longer matches the control. - **Record leg: 4 failed, 4 passed.** Exactly the four record rows went red. - **Restore.** After both legs, the blob equals HEAD (`c07608e4cc2a`), `git diff HEAD` is empty, and `git status` is clean. ## Gates **Pass (exit 0):** - `check:doc-types` - `check:doc-snippets`: 679 of 679 blocks judged, 0 failed. It ran after `turbo run build` over its own `--build-filter` closure (35/35 tasks); the first run exited 2 on unbuilt packages. - `check:doc-examples`: exited 2 on the first run, then passed after the same build. - `docs:check-links` - `check:doc-fences` - `check:doc-example-ids` - `check:doc-example-readers` - `check-doc-expression-carriage` - `check:control-bytes`, plus a self-scan of the five changed files for control bytes, which found none - `check:new-line-citations` - `check-changeset-presence` - `changeset:check` - `check-changeset-overwrite` - `check:changeset-claims` - `check:pending-changeset-literals` - `check:installed-pin-claims` - `check:handler-key-reads` - `check:action-forward-parity` - `check:element-data-source-declaration` - `check:designer-field-key-parity` - `check:prompt-keys` - `check:spec-symbols` - `check:unreferenced-sources` - `check:readme-exports` - `check:test-path-roots` - `check:vi-mock-specifiers` / `inherit` / `override-shape` - `lint:coverage` - `type-check:coverage` - `check:phantom-deps` - `check:self-import` - `check:i18n-designer-parity` - `check:metadata-write-doors` **Not governed.** `check-governed-queue-guard --test` over the five paths reports NOT GOVERNED. The PR stays draft because it was dispatched. **NOT MEASURED: `check:sdui-registration-pins`.** Reason: it needs a console bundle (`apps/console/dist/assets`) and exits 2 without one. This diff adds or removes no registration and moves no `sideEffects`. Left to CI. **ESLint, a proven narrowing of CI's `pnpm lint`:** - Population, read from eslint's own config: of the five changed files, only the two `.tsx` files match a configuration. For the `.md` / `.mdx` / changeset files eslint reports "File ignored because no matching configuration was supplied". - Count, read from `--format json`: 2 files, 0 errors. - The new pin has 0 messages. - `containers.tsx` has 97 warnings, identical to base by rule: `no-explicit-any` 89, `only-export-components` 7, `exhaustive-deps` 1. Base was read via `--stdin` at the same path. - Invariance: `eslint.config.js` enables no type-aware linting (no `parserOptions.project` / `projectService`), so this diff cannot move a verdict on an untouched file. ## Acceptance notes (not filed) - **At the pin bump carrying objectstack#20758's tombstone:** - the `breadcrumb` entry in `inputs` must go; the parity file's forward direction will name it; - so must the one sentence in each doc page that says "accepts it until objectstack#20758 retires it". - Carrier: the objectui spec pin-bump PR. - **The bare root's `gap-2` now spaces a single child,** the title row, so it is inert. It is kept because the ruling moves no class and the demo pin and docs quote it. Polish; carrier: none. - **A stale test comment.** In `packages/types/src/__tests__/page-breadcrumbs-refusal-8871.test.ts`, the LIT CONTROL comment calls `.breadcrumb` "the live `page:header` toggle", which is no longer true. The control itself still fires on many other hits, and the test is green. It is an unpublished comment; carrier: none. - **Triage fact, for objectstack-ai/objectstack#20758's measurement.** Triage says the spec's `nav:breadcrumb` "has no objectui renderer". The parity file's `EXPECTED_WITHOUT_INPUTS` lists `nav:breadcrumb` as "Registered, spec-carried, and deliberately propless". This is a read-only inference; carrier: objectstack-ai/objectstack#20758. - `content/docs/guide/slotted-pages.md`'s example still authors `breadcrumb: true`. That file belongs to objectui#11165 and is left untouched. The value renders without error and is ignored. ## Out-of-scope finding (reported to the seat for filing, class c) **The Studio page designer still offers a "Show breadcrumb" toggle for `page:header`.** - The producer is `BLOCK_CONFIG['page:header']` in `packages/app-shell/src/views/metadata-admin/previews/block-config.ts`, labelled by `engine.inspector.pageBlock.field.page:header.breadcrumb` (en "Show breadcrumb", zh "显示面包屑"). - It writes `breadcrumb` into stored page metadata, which the renderer now ignores. Once objectstack#20758's tombstone is installed, the platform will refuse the whole node by name. - That file's own `icon` precedent pin says "A retirement that leaves its producer standing makes the failure worse, not better." - `block-config.test.ts` pins the field set as `['title', 'subtitle', 'breadcrumb']`. - It is not fixed here: it adds `packages/app-shell` and i18n to the verification surface, which fails condition ④ of the bounded in-place fix. --- _Generated by [Claude Code](https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent cecd6a0 commit 0ffc423

5 files changed

Lines changed: 201 additions & 24 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
`page:header` no longer draws an empty breadcrumb slot, and an authored `breadcrumb` is
6+
ignored (objectui#11166).
7+
8+
The renderer used to read `breadcrumb` (the spec's `PageHeaderProps.breadcrumb`, default
9+
`true`) and draw an empty `data-page-breadcrumb-slot` div above the title, in both the bare
10+
and the record-chip layout. Nothing ever filled it, and the console's app header already
11+
draws the breadcrumb trail, so the key is being retired rather than wired up; the spec half is
12+
objectstack#20758. Until that retirement reaches this package's `@objectstack/spec` pin the
13+
contract still accepts the key, so an authored `breadcrumb` (`true` or `false`) renders
14+
exactly like an absent one: no slot and no error. No trail is drawn in its place.
15+
16+
**Visible change: the title moves up.** The empty div still took space. In the bare layout
17+
it was an item of the root's `gap-2` column, so the title row sat one `gap-2` (0.5rem) below
18+
the top of the header; in the record-chip layout it carried `mb-1` (0.25rem) above the chip.
19+
Both are gone on every header that did not already set `breadcrumb: false`. No class string
20+
on the header changed.
21+
22+
The `page:header` registration keeps declaring the `breadcrumb` input while the contract
23+
accepts the key, with a description that says it is ignored.

‎content/docs/guide/layout.md‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The layout system provides:
1313

1414
- **AppShell** - Full application container with a top navbar, sidebar, and content areas
1515
- **Page** - Individual page wrapper with header and body
16-
- **PageHeader** - Consistent page headers with title, breadcrumbs, and actions
16+
- **PageHeader** - Consistent page headers with title and actions
1717
- **SidebarNav** - Navigation sidebar with menu items
1818

1919
## Installation
@@ -199,8 +199,8 @@ and `button.tsx`, which reads `schema.label`, renders a button with no text.
199199
> the array rather than refusing it — the same silent-accept shape as `actions`, retired
200200
> under the same ADR-0049 enforce-or-remove gate. The trail is a **node**, not a key: put
201201
> a `breadcrumb` node in `children`, as [Breadcrumbs for Deep Navigation](#2-breadcrumbs-for-deep-navigation)
202-
> shows. ⛔ Not the `page:header` block's `breadcrumb` either — that one is singular and a
203-
> **boolean** display toggle, not a list of links.
202+
> shows. ⛔ Not the `page:header` block's `breadcrumb` either — that one is a singular
203+
> **boolean** the renderer ignores, not a list of links.
204204
205205
### Schema API
206206

@@ -300,7 +300,6 @@ does not render.
300300
title?: string | Record<string, string>, // {field.path} tokens interpolated; derived from the record when omitted on a record page
301301
subtitle?: string | Record<string, string>, // secondary line; same interpolation
302302
actions?: string[], // action ids, resolved against the object's own actions
303-
breadcrumb?: boolean, // default true — the breadcrumb slot above the title
304303
recordChrome?: boolean, // default true — the record chip on a record page
305304
showStar?: boolean, // default true
306305
showCopyId?: boolean, // default true
@@ -318,9 +317,9 @@ does not render.
318317
> header's identity comes from the record chip (`recordChrome`), and each action carries its
319318
> own `icon`.
320319
321-
> **There is no `breadcrumbs` array.** The node's `breadcrumb` is singular and a
322-
> **boolean** display toggle for the slot above the title, not a list of links. A trail of
323-
> links is a `breadcrumb` node — see
320+
> **There is no `breadcrumbs` array, and `breadcrumb` draws nothing.** The contract still
321+
> accepts a singular **boolean** `breadcrumb` until objectstack#20758 retires it; the renderer
322+
> ignores it. A trail of links is a `breadcrumb` node — see
324323
> [Breadcrumbs for Deep Navigation](#2-breadcrumbs-for-deep-navigation).
325324
326325
> **`page-header` is an alias, not the author key.** `page-header` (and its namespaced form
@@ -698,7 +697,7 @@ ellipsis while keeping the first crumb and the current page. See the
698697

699698
⛔ Not `"breadcrumbs"` on the `page` node — that key has no reader and is refused by name
700699
(objectui#8871), the same way `actions` is. ⛔ Nor the `page:header` block's `breadcrumb`,
701-
which is a **boolean** display toggle rather than a list of links.
700+
a **boolean** the renderer ignores rather than a list of links.
702701

703702
### 3. Action Buttons at the Top of the Body
704703

‎content/docs/layout/page-header.mdx‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ absent.
4545
| `title` | string, or an inline locale map | derived from the record on a record page | The heading. `{field.path}` tokens are interpolated against the record in scope. |
4646
| `subtitle` | string, or an inline locale map | — | The secondary line under the title. Same interpolation as `title`. |
4747
| `actions` | array of action ids | — | Names of actions declared on the object's own metadata, drawn as the header's button row. |
48-
| `breadcrumb` | boolean | `true` (*spec*) | Renders a breadcrumb slot above the title. `false` removes it. |
4948
| `recordChrome` | boolean | `true` (*spec*) | On a record page, renders the title as the record chip. `false` keeps the bare heading. |
5049
| `showStar` | boolean | `true` (*spec*) | The follow star beside the record title. Part of the record chip. |
5150
| `showCopyId` | boolean | `true` (*spec*) | The copy-record-id button beside the record title. Part of the record chip. |
@@ -68,8 +67,8 @@ renders none of them and says so once per id in the console. That is why the dem
6867
carries no actions. Placement (`locations: ['record_header']` or `record_more`), ordering and
6968
the overflow menu are covered in [Slotted pages](/docs/guide/slotted-pages).
7069

71-
**`breadcrumb`** renders an empty slot element, marked `data-page-breadcrumb-slot`, above
72-
the title. The renderer draws no trail into it itself.
70+
**`breadcrumb` draws nothing:** the contract accepts it until objectstack#20758 retires it,
71+
and the renderer ignores it, so `true`, `false` and an absent key render the same header.
7372

7473
**`maxVisible` / `mobileMaxVisible`** must be positive integers: the contract rejects `0`
7574
and fractional values, and the renderer falls back to its default for a value the contract
@@ -146,7 +145,6 @@ The renderer picks one of two layouts when it renders:
146145

147146
```plaintext
148147
┌──────────────────────────────────────────────┐
149-
│ (breadcrumb slot) │
150148
│ Title [Actions] [⋯] │
151149
│ Subtitle │
152150
└──────────────────────────────────────────────┘
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
/**
10+
* `page:header` draws no breadcrumb slot, and an authored `breadcrumb` is
11+
* ignored (objectui#11166, triage ruling RETIRE).
12+
*
13+
* Until this change the renderer read `breadcrumb` (spec default `true`) and
14+
* drew an empty `data-page-breadcrumb-slot` div above the title in both
15+
* layouts. Nothing ever filled it, and the console's app header already draws
16+
* the trail, so the ruling retires the key rather than adding a second trail.
17+
* The spec half is objectstack#20758. Until that retirement reaches the
18+
* installed pin the contract still ACCEPTS the key, so an authored value has to
19+
* keep rendering without error: it is ignored, which is the old behaviour
20+
* minus the empty div.
21+
*
22+
* Pinned in both layouts, through the real `SchemaRenderer` and registry:
23+
*
24+
* - `breadcrumb: true`, in `properties` and on the node, renders no slot;
25+
* - the key ABSENT renders no slot either, and is the control: every authored
26+
* spelling, `false` included, must render the SAME header as the absent
27+
* key. Before this change `true` and the absent key drew the slot and
28+
* `false` did not, so each row here was red;
29+
* - the header is really there: its `<h1>` and the empty `actions` slot
30+
* (`data-page-actions-slot`, which the `page-header-actions` suites own)
31+
* render, so "no breadcrumb slot" cannot pass on a header that drew
32+
* nothing.
33+
*/
34+
35+
import { describe, it, expect, afterEach, vi } from 'vitest';
36+
import { render, cleanup } from '@testing-library/react';
37+
import { ActionProvider, RecordContextProvider, SchemaRenderer } from '@object-ui/react';
38+
// Registers every renderer at module scope, not in a hook
39+
// (object-ui/no-dynamic-import-in-test-hook, objectui#3010).
40+
import '../renderers';
41+
42+
afterEach(() => {
43+
cleanup();
44+
vi.restoreAllMocks();
45+
});
46+
47+
const RECORD_OBJECT = {
48+
name: 'crm_account',
49+
label: 'Account',
50+
nameField: 'name',
51+
fields: { name: { type: 'text', label: 'Name' } },
52+
};
53+
54+
type Layout = 'bare' | 'record';
55+
56+
function renderHeader(layout: Layout, schema: Record<string, unknown>) {
57+
const body = <SchemaRenderer schema={schema as never} />;
58+
const utils = render(
59+
<ActionProvider>
60+
{layout === 'record' ? (
61+
<RecordContextProvider
62+
objectName="crm_account"
63+
recordId="rec-1"
64+
data={{ id: 'rec-1', name: 'Acme' }}
65+
objectSchema={RECORD_OBJECT}
66+
>
67+
{body}
68+
</RecordContextProvider>
69+
) : (
70+
body
71+
)}
72+
</ActionProvider>,
73+
);
74+
const header = utils.container.querySelector('header');
75+
expect(header, `${layout}: the page:header root`).not.toBeNull();
76+
return { ...utils, header: header as HTMLElement };
77+
}
78+
79+
/**
80+
* The header's markup with React's generated ids blanked. Two separate mounts
81+
* number `useId` differently, and those ids are the only bytes allowed to
82+
* differ between an authored `breadcrumb` and an absent one.
83+
*/
84+
const ID_ATTRS = ['id', 'aria-controls', 'aria-labelledby', 'aria-describedby', 'for'];
85+
function markupOf(header: HTMLElement): string {
86+
const copy = header.cloneNode(true) as HTMLElement;
87+
for (const el of [copy, ...Array.from(copy.querySelectorAll('*'))]) {
88+
for (const name of ID_ATTRS) if (el.hasAttribute(name)) el.setAttribute(name, 'ID');
89+
}
90+
return copy.outerHTML;
91+
}
92+
93+
const TITLE: Record<Layout, string> = { bare: 'Orders', record: 'Acme' };
94+
95+
/** The authored spellings, each rendered against the absent-key control. */
96+
const AUTHORED: ReadonlyArray<{ name: string; node: (layout: Layout) => Record<string, unknown> }> = [
97+
{
98+
name: '`properties.breadcrumb: true`',
99+
node: (layout) => ({
100+
type: 'page:header',
101+
properties: layout === 'bare' ? { title: TITLE.bare, breadcrumb: true } : { breadcrumb: true },
102+
}),
103+
},
104+
{
105+
name: '`breadcrumb: true` on the node',
106+
node: (layout) => ({
107+
type: 'page:header',
108+
breadcrumb: true,
109+
...(layout === 'bare' ? { properties: { title: TITLE.bare } } : {}),
110+
}),
111+
},
112+
{
113+
name: '`properties.breadcrumb: false`',
114+
node: (layout) => ({
115+
type: 'page:header',
116+
properties: layout === 'bare' ? { title: TITLE.bare, breadcrumb: false } : { breadcrumb: false },
117+
}),
118+
},
119+
];
120+
121+
const ABSENT = (layout: Layout) => ({
122+
type: 'page:header',
123+
...(layout === 'bare' ? { properties: { title: TITLE.bare } } : {}),
124+
});
125+
126+
describe('page:header draws no breadcrumb slot; an authored `breadcrumb` is ignored (objectui#11166)', () => {
127+
for (const layout of ['bare', 'record'] as const) {
128+
describe(`${layout} layout`, () => {
129+
it('CONTROL — the key absent: the header renders, with no breadcrumb slot', () => {
130+
const { header } = renderHeader(layout, ABSENT(layout));
131+
expect(header.querySelector('h1')?.textContent).toBe(TITLE[layout]);
132+
expect(header.querySelectorAll('[data-page-actions-slot]')).toHaveLength(1);
133+
expect(header.querySelector('[data-page-breadcrumb-slot]')).toBeNull();
134+
});
135+
136+
for (const row of AUTHORED) {
137+
it(`${row.name} renders no slot and the same header as the absent key, without an error`, () => {
138+
const errors = vi.spyOn(console, 'error');
139+
const { header } = renderHeader(layout, row.node(layout));
140+
expect(header.querySelector('h1')?.textContent).toBe(TITLE[layout]);
141+
expect(header.querySelector('[data-page-breadcrumb-slot]')).toBeNull();
142+
// No slot, and no stray attribute either: the key reaches no element.
143+
expect(header.outerHTML).not.toMatch(/breadcrumb/i);
144+
expect(errors).not.toHaveBeenCalled();
145+
const authored = markupOf(header);
146+
cleanup();
147+
148+
const { header: control } = renderHeader(layout, ABSENT(layout));
149+
expect(authored).toBe(markupOf(control));
150+
});
151+
}
152+
});
153+
}
154+
});

‎packages/components/src/renderers/layout/containers.tsx‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ ComponentRegistry.register('section', PageSectionRenderer, {
12831283
});
12841284

12851285
// ---------------------------------------------------------------------------
1286-
// page:header — title row + optional subtitle + breadcrumb/action slots.
1286+
// page:header — title row + optional subtitle + action slot.
12871287
// `actions` entries are ACTION IDS, resolved against the object's own metadata
12881288
// (objectstack#11592 ruling, objectui#6252) — see `resolvedHeaderActions`.
12891289
// ---------------------------------------------------------------------------
@@ -1505,7 +1505,12 @@ const PageHeaderRenderer: React.FC<any> = ({ schema, className, ...props }) => {
15051505
fieldOptionLabel,
15061506
headerObjectName,
15071507
);
1508-
const breadcrumb = (schema?.breadcrumb ?? schema?.properties?.breadcrumb) !== false;
1508+
// `breadcrumb` is deliberately NOT read (objectui#11166, ruling RETIRE). All
1509+
// it ever drew was an empty `data-page-breadcrumb-slot` div that nothing
1510+
// filled, and the console's app header already draws the trail. The spec
1511+
// still accepts `PageHeaderProps.breadcrumb` until objectstack#20758 retires
1512+
// it, so an authored value renders exactly as an absent one: ignored, no
1513+
// error. ⛔ Do not add a trail here; that is an ENFORCE ruling, not a fix.
15091514

15101515
// Schema-level opt-outs let authors keep the historic "bare h1" header
15111516
// when they don't want a record chip (e.g. a non-record landing page).
@@ -2340,12 +2345,6 @@ const PageHeaderRenderer: React.FC<any> = ({ schema, className, ...props }) => {
23402345
{...headerAria}
23412346
>
23422347
<div className="flex flex-col min-w-0 sm:min-w-48 flex-1">
2343-
{breadcrumb && (
2344-
<div
2345-
className="text-xs text-muted-foreground mb-1"
2346-
data-page-breadcrumb-slot
2347-
/>
2348-
)}
23492348
<RecordTitleChip
23502349
title={resolvedTitle}
23512350
objectLabel={objectLabel}
@@ -2376,9 +2375,6 @@ const PageHeaderRenderer: React.FC<any> = ({ schema, className, ...props }) => {
23762375
{...designer}
23772376
{...headerAria}
23782377
>
2379-
{breadcrumb && (
2380-
<div className="text-xs text-muted-foreground" data-page-breadcrumb-slot />
2381-
)}
23822378
<div className="flex items-center justify-between gap-4">
23832379
<div className="flex flex-col">
23842380
{explicitTitle && (
@@ -2413,7 +2409,14 @@ ComponentRegistry.register('header', PageHeaderRenderer, {
24132409
{ name: 'title', type: ['string', 'object'], description: 'Supports {field} interpolation and inline translation maps; falls back to the record title' },
24142410
{ name: 'subtitle', type: ['string', 'object'], description: 'Same interpolation as Title' },
24152411
{ name: 'actions', type: 'array', of: 'string', description: "Action IDS — the names of actions declared on the object's own metadata — rendered in the header before any host-injected system actions. An id whose action declares neither record_header nor record_more in its locations renders nowhere." },
2416-
{ name: 'breadcrumb', type: 'boolean' },
2412+
// Declared but NOT read (objectui#11166). It stays in `inputs` only while
2413+
// the installed spec still accepts the key: the reverse direction of
2414+
// `registry-inputs-spec-parity.test.ts` asks for every accepted spec key,
2415+
// and the manifest would otherwise warn `unknown-prop` on a value the
2416+
// contract accepts. It leaves with the spec retirement (objectstack#20758):
2417+
// once the pin carries the tombstone, this entry fails the forward
2418+
// direction. The description tells an author reading the manifest it is inert.
2419+
{ name: 'breadcrumb', type: 'boolean', description: 'Ignored: the header draws no breadcrumb, and the key is being retired from the contract. Leave it out.' },
24172420
{ name: 'recordChrome', type: 'boolean', description: 'Set false for the bare h1 header on non-record pages' },
24182421
{ name: 'showStar', type: 'boolean' },
24192422
{ name: 'showCopyId', type: 'boolean' },

0 commit comments

Comments
 (0)