Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .changeset/35853-record-header-two-rows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@objectstack/spec': patch
'@object-ui/components': patch
'@object-ui/app-shell': patch
---

feat(record-page): the record's header is two rows — navigation over the record — and shows up to three actions again

Clause-②: yes (widening) — `@object-ui/components` takes four optional members: `RecordTopBarProps.record`, `RecordTopBarStepper.onScope`, `NavigationOverlayProps.recordRow` and `PageHeaderActionsProps.fitWidth`; nothing removed or renamed
Metadata-protocol: none

The record's top bar, on the full page and in the drawer alike, is now two rows:

- The navigation row (40 px). From a list: ↑ ↓ and 「第 N 条,共 M 条 · 视图名」 ("N of M · view"), M being the records the list matched; the view's name returns to the list. From no list (a link, a notification, a search): the object's name and no ↑ ↓; on the page the name links to the object's list, and in the drawer it is shown without a link. ✕ sits at the far right in every case: on the page it returns to the list the page came from as it was left, else the object's default list; in the drawer it closes, with ⤢ (open the full page) before it.
- The record row (48 px): the record's icon, its name one size larger, its stage and approval tags, then who else is on the record and the managing package's badge (on the page they no longer float over the corner above the tabs), and at the right the record's buttons and ⊟.

The drawer shows ↑ ↓ and the count again (the drawer hid them since #35593). A phone keeps its one-row bar.

The header bar's default inline budget is 3 again (#35593 had set it to 1): what does not fit the bar's width folds into 「更多」 one action at a time, down to the primary, so a narrow drawer shows fewer. An authored `maxVisible` still wins, a phone still shows one primary action (its bottom bar holds the host's Edit and one more), and there is still one primary-coloured button at a time. The `page:header` `maxVisible` / `mobileMaxVisible` describe, the `pages.mdx` Default cell and the Studio designer descriptions say so.
4 changes: 2 additions & 2 deletions content/docs/references/ui/component.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1579,8 +1579,8 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
| **recordChrome** | `boolean` | optional (default: `true`) | Render the record chrome — the title as a record chip with its copy-id button. Set false on a non-record page (dashboard, landing) to fall back to the bare heading layout. |
| **showStar** | `never` | optional | [REMOVED] `page:header` property `showStar` was removed in @objectstack/spec 18 (ADR-0087 D2) — the reference console draws no star beside the record title, so the key switched nothing: the record's favorites entry is the header's ⋯ menu, and metadata does not control it. Delete the key, whether it was `true` or `false`; the ⋯ menu's favorites entry is unchanged. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. |
| **showCopyId** | `boolean` | optional (default: `true`) | Show the copy-record-id button beside the record title. Part of the record chrome — no effect when `recordChrome` is false. |
| **maxVisible** | `integer` | optional | How many header actions render as inline buttons before the rest fold into the overflow menu. Renderer default when unset: 1 in a record page's one-row header bar, 3 on any other header. |
| **mobileMaxVisible** | `integer` | optional | The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page's bottom action bar on a phone, 1 on any other header. |
| **maxVisible** | `integer` | optional | How many header actions render as inline buttons before the rest fold into the overflow menu. Renderer default when unset: 3 on every header. In a record page's header bar the number, authored or not, is an upper bound: actions that do not fit the bar's width fold as well, so a narrow drawer shows fewer. |
| **mobileMaxVisible** | `integer` | optional | The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page's bottom action bar on a phone, where the host's Edit counts as one, 1 on any other header. |
| **aria** | `{ ariaLabel?: string \| Record<string, string>; ariaDescribedBy?: string; role?: string }` | optional | ARIA accessibility attributes |

### Nested Shape: `PageHeaderProps.aria`
Expand Down
4 changes: 2 additions & 2 deletions content/docs/ui/components/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Namespace `page`.
| `placedActions` | `boolean` | | Set true to draw every action of the object placed at record_header or record_more, read live from the object's metadata, in place of an Actions list: an action another package adds to the object is drawn without editing the page. Refused beside an authored Actions list: keep one. |
| `recordChrome` | `boolean` | | Set false for the bare h1 header on non-record pages |
| `showCopyId` | `boolean` | | — |
| `maxVisible` | `number` | | How many header actions render as inline buttons on desktop before the rest fold into the overflow menu. A positive integer — the contract rejects 0 and fractional values. Two kinds of action are routed to the overflow menu regardless of this budget and never occupy an inline slot: an action whose locations declare record_more without record_header, and any action with component action:menu. The host's own buttons (the record page's Edit) take no slot and never fold. The first inline action, or the one declaring variant primary, is the one filled primary button; the others are outline buttons. An action declaring variant danger is never the primary: inline it is a destructive button, and in the overflow menu it is a red row below a separator. |
| `mobileMaxVisible` | `number` | | The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer; when unset it is 2 in a record page's bottom action bar on a phone (counting the host's Edit) and 1 on any other header. The desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged. |
| `maxVisible` | `number` | | How many header actions render as inline buttons on desktop before the rest fold into the overflow menu. A positive integer, defaulting to 3 — the contract rejects 0 and fractional values. In a record page's header bar, actions that do not fit its width fold too, so a narrow drawer shows fewer. Two kinds of action are routed to the overflow menu regardless of this budget and never occupy an inline slot: an action whose locations declare record_more without record_header, and any action with component action:menu. The host's own buttons (the record page's Edit) take no slot and never fold. The first inline action, or the one declaring variant primary, is the one filled primary button; the others are outline buttons. An action declaring variant danger is never the primary: inline it is a destructive button, and in the overflow menu it is a red row below a separator. |
| `mobileMaxVisible` | `number` | | The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer, defaulting to 1, or 2 in a record page's bottom action bar on a phone, where the host's Edit counts as one; the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged. |

## `page:section` [#page-section]

Expand Down
2 changes: 1 addition & 1 deletion content/docs/ui/pages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ unknown or retired key (`description`, `icon`, `breadcrumb`, `showStar`) is refu
| `placedActions` | — | `true` asks for every action of the object placed at `record_header` / `record_more`, read live, in place of an `actions` list, so an action another package adds is drawn without editing the page. Refused beside an authored `actions` list: keep one. The platform's user, organization and approval request pages set it |
| `recordChrome` | `true` | Draw the title as the record chip (object label, copy-id button, the record's picture when the object names an `imageField`); `false` keeps a bare heading |
| `showCopyId` | `true` | The copy-record-id button in the chip |
| `maxVisible` / `mobileMaxVisible` | 1 in a record page's one-row header bar, 3 elsewhere / 2 in a phone record page's bottom bar, 1 elsewhere | How many actions render inline before the rest fold into the `⋯` menu |
| `maxVisible` / `mobileMaxVisible` | 3 on every header (in a record page's header bar the number, authored or not, is an upper bound: actions that do not fit the bar's width fold as well) / 2 in a phone record page's bottom bar (the Edit button counts as one), 1 elsewhere | How many actions render inline before the rest fold into the `⋯` menu |
| `aria` | — | ARIA attributes (`ariaLabel`, `ariaDescribedBy`, …) for the `<header>` element |

A named action renders only if its `locations` include `record_header` (inline) or
Expand Down
110 changes: 110 additions & 0 deletions docs/qa/platform-checklist/areas/records-forms.json
Original file line number Diff line number Diff line change
Expand Up @@ -7411,6 +7411,116 @@
"ref": "#35783"
}
]
},
{
"id": "records-forms.record-open-path-and-header",
"title": "An object's list opens a record one way — the name opens the full page, the hover icon beside it the side drawer — and the record's header is two rows: the way through the list (↑ ↓, 「第 N 条,共 M 条 · 视图名」, ✕) over the record (its name, chips and up to three actions), with the tabs right under it",
"since": "v18.7",
"status": "active",
"revision": 1,
"priority": "P1",
"surface": "browser",
"personas": [
"seeded admin (admin@objectos.ai / admin123)"
],
"fixtures": {
"app": "showcase",
"requires": [
"a fresh boot of the showcase (the live lane's `ui/e2e/live/ci/start-backend.sh`, or `pnpm dev -- --fresh --seed-admin`)",
"the showcase_account list (14 seeded accounts, a synthesized record page with a tab row) and the showcase_task list (its showcase_task_detail page authors three record_header actions: Mark Done, Log Time, Archive)"
]
},
"steps": [
"at 1280×900 open the showcase_account list and click the second account's name; read the URL and the header's two rows",
"reload the page; read the navigation row again; press ↓; then click the view's name (「All Records」) in the navigation row",
"on the list, hover the second row and click the 「在侧边打开」 icon beside the name; read the URL, the drawer's edges and its header; press ↓ in the drawer, then its 「整页打开」",
"paste the address of an account record into a fresh tab (no list behind it); read the navigation row; click ✕",
"open a backlog task from the showcase_task list and read the record row's buttons; open a task in the drawer at 820 px wide and read them again",
"at 390×844 with touch, open the account list and tap a record"
],
"acceptance": [
{
"clause": "the record's name opens the full page and nothing else does: no reader setting and no `navigation.mode` picks the drawer instead",
"oracle": "dom",
"verify": "after steps[0] the URL is …/showcase_account/record/<id> with no ?recordId=, and no drawer card ([data-record-drawer-card]) is drawn",
"evidence": "the URL and a screenshot"
},
{
"clause": "the page remembers the list it came from, across a reload: ↑ ↓ walk the list's rows in its order, the navigation row reads 「2 of 14 · All Records」, and the view's name goes back to the list",
"oracle": "dom",
"verify": "[data-record-top-bar-position] reads '2 of 14' and [data-record-top-bar-scope] 'All Records' before and after the reload; after ↓ the position reads '3 of 14'; the scope click lands on the list",
"evidence": "the navigation row before and after the reload"
},
{
"clause": "the icon beside the name, shown while the row is hovered, opens the record in a side drawer over the list, a floating card 8 px off the window's top, right and bottom edges, with 「整页打开」 and ✕ and no full-width state",
"oracle": "dom",
"verify": "the icon's opacity is 0 at rest and 1 on hover; after the click the URL carries ?recordId=, the list is still drawn, the card's box is 8 px from three edges with a rounded corner, and its frame holds exactly two buttons",
"evidence": "the drawer screenshot"
},
{
"clause": "the header is two rows on the page and in the drawer: a 40 px navigation row (the stepper and position, or the object when no list is behind it; ✕ at its far right) over a 48 px record row (icon, the name at 16 px, chips, actions)",
"oracle": "dom",
"verify": "[data-record-top-bar-rows='2'] holds [data-record-top-bar-nav] (40 px) above [data-record-top-bar-record] (48 px); the close button ends within 12 px of the row's right edge; with no list behind it there is no [data-record-top-bar-stepper] and the object crumb shows, and ✕ goes to the object's list",
"evidence": "the three figure-40 screenshots"
},
{
"clause": "the record row shows three authored actions by default, and folds those that do not fit its width into ⋯ rather than wrapping",
"oracle": "dom",
"verify": "on a backlog task Mark Done, Log Time and Archive stand inline beside Edit and ⋯; in the 820 px drawer every visible button of [data-record-top-bar-actions] shares one top",
"evidence": "both screenshots"
},
{
"clause": "the page's first row (its tab row, or a stage bar) starts right under the header, with no blank band",
"oracle": "dom",
"verify": "the tab row's top minus the header's bottom is at most 12 px, on the page and in the drawer",
"evidence": "the measured gap"
},
{
"clause": "on a phone there is no side-drawer icon; a tap opens the page, whose one-row bar still knows the list",
"oracle": "dom",
"verify": "no [data-testid='record-open-in-panel'] is drawn; after the tap the URL is the record's page and the bar reads '2 / 14', also after a reload",
"evidence": "the phone screenshot"
},
{
"clause": "the pins pass at the run subject sha",
"oracle": "test",
"verify": "run ui/e2e/live/record-open-path-35854.spec.ts and ui/e2e/live/record-topbar-35853.spec.ts with the live config (playwright.live.config.ts), and ui/packages/app-shell/src/views/ObjectView.recordOpenPath-35854.test.tsx and ui/packages/components/src/__tests__/record-top-bar-two-rows-35853.test.tsx from ui/ with vitest; each reports ≥1 test and 0 failed",
"evidence": "the Playwright and vitest summary lines, with the subject sha"
}
],
"negative": [
"a name click that opens the drawer, or a 「打开记录:抽屉 / 整页」 setting anywhere in the list's view settings, is a FAIL",
"a page opened from a list that loses its position or view name on a reload is a FAIL",
"a list view declaring navigation.mode 'none' (or preventNavigation) whose rows open a record is a FAIL: 'none' still means rows open nothing",
"a blank band of more than 12 px between the header and the tab row is a FAIL"
],
"traps": [
"hydration-race",
"shared-browser-tab"
],
"automated": {
"kind": "e2e",
"ref": "ui/e2e/live/record-open-path-35854.spec.ts (name → page, hover icon → drawer, provenance across a reload, phone), ui/e2e/live/record-topbar-35853.spec.ts (the two rows on the page and in the drawer, three actions, the width fold, the gap above the tabs, the phone bar); both in the live lane, not in the required `:ci` allowlist"
},
"source": [
"ui/packages/app-shell/src/views/objectViewRecordNavigation.ts",
"ui/packages/app-shell/src/views/objectViewOpenAsPage.tsx#OpenInSidePanelButton",
"ui/packages/app-shell/src/views/recordDrawerStack.tsx#useRecordPageReturn",
"ui/packages/components/src/custom/record-top-bar.tsx#RecordTopBar",
"ui/packages/components/src/custom/navigation-overlay.tsx",
"ui/packages/components/src/renderers/layout/containers.tsx#PageHeaderActions",
"ui/packages/app-shell/src/views/RecordDetailView.tsx",
"#35854",
"#35853"
],
"history": [
{
"revision": 1,
"date": "2026-11-20",
"change": "initial — the one open path (#35854, maintainer ruling 「废弃」 on the open preference and navigation.mode) and the two-row record header (#35853, with the gap above the tabs of #35745), read from the PR branch and driven live against the showcase",
"ref": "#35854"
}
]
}
]
}
9 changes: 5 additions & 4 deletions packages/spec/src/ui/component.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,9 @@ export const PageHeaderProps = strictObject({
* evidence: the renderer has always read them and the schema had not caught
* up. The header renderer (read points recorded in `liveness/page.json`, row `regions`) resolves
* `schema?.maxVisible ?? schema?.properties?.maxVisible` (and the `mobile*`
* twin), the fallbacks for an unset key are its own (they differ by host, as
* the two `.describe()` strings below state), and its comment says out loud
* twin), the fallbacks for an unset key are its own (3 on desktop, folded
* by width in a record page's header bar since #35853; the mobile one
* differs by host — as the two `.describe()` strings below state), and its comment says out loud
* that both are "overridable on the page:header". Closing this shape
* without declaring them would turn an invited affordance into a hard
* rejection — the lesson of commit 78f0be872, which is to enumerate by the RENDERER'S read
Expand All @@ -852,10 +853,10 @@ export const PageHeaderProps = strictObject({
* as the record picker's `limit` docblock records for its own 50.
*/
maxVisible: z.number().int().positive().optional().describe(
'How many header actions render as inline buttons before the rest fold into the overflow menu. Renderer default when unset: 1 in a record page\'s one-row header bar, 3 on any other header.',
'How many header actions render as inline buttons before the rest fold into the overflow menu. Renderer default when unset: 3 on every header. In a record page\'s header bar the number, authored or not, is an upper bound: actions that do not fit the bar\'s width fold as well, so a narrow drawer shows fewer.',
),
mobileMaxVisible: z.number().int().positive().optional().describe(
'The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page\'s bottom action bar on a phone, 1 on any other header.',
'The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page\'s bottom action bar on a phone, where the host\'s Edit counts as one, 1 on any other header.',
),
/** ARIA accessibility */
aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),
Expand Down
2 changes: 1 addition & 1 deletion scripts/sdui-manifest.record.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"source": "built-tree",
"generator": "scripts/gen-sdui-manifest-node.mjs",
"generatedAt": "2026-11-21",
"sha256": "3711e7efc78c869ee5c1d8e1b16c8cf718ac87a7c9db3bdb602483684e6065f9",
"sha256": "6d9807f35ed3bc4d4dc727fe6fe9ad76c8667cc5666daef03336b5df28bcda69",
"components": 106,
"inTree": {
"modulesRoot": "ui/apps/console",
Expand Down
Loading
Loading