Repository navigation
Commit d2caaec
feat(spec,ui): object pinOverview keeps the wide record page from pinning its overview (#38679)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9NN6Y1G4JwByAn5p4uFhymm)_
Fixes #37792
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up #38680
## 维护者速读
-
桌面完整记录页上,对象现在可以声明「概览不钉在左栏」:这样的页面在任何宽度下都把概览当第一个页签并默认打开,字段按宽度排成最多三列,概览里有子表时也一样;不声明的对象完全照旧。
- 这是记录页布局开关卡的第一张,替记录详情页长正文被挤在窄栏里的场景解决(另一张是把字段分组放成页签的卡)。
- 只影响声明了这个开关的对象的桌面完整页;侧边预览和手机不受影响(已在示例应用里实拍核对);撤回就是删掉这一行声明。
- 要你做什么:无。
## What changes
- **spec** — `ObjectSchema.pinOverview: z.boolean().optional()`
(ADR-0085's Note of 2026-11-27, a ruled exception). Absent or `true`:
the pin stays derived; `false`: the desktop full standard record page
never pins. A non-boolean value is refused at parse (`invalid_type` at
`['pinOverview']`). `ObjectExtensionSchema` does not declare it and
carries a `guidance` entry, so an extension that writes it is refused
with a message naming `ObjectSchema.pinOverview`; it is not in
`CUSTOM_ARRANGEMENT_KEYS`. The object metadata form offers it as a
boolean row (the reconciliation gate requires every authorable root key
to be offered or ledgered); an untouched switch writes nothing.
- **ui** — `recordPagePinsDetails` takes an optional fourth argument
`pinOverview` (`false` never pins). `RecordPageColumns` takes an
optional `pinOverview` prop: on a full page of an object that declares
`false` it never pins, the overview is the first tab and open by
default, and the field area uses the width-based columns
(`DetailsColumnCapContext` 3) as an overview-only page does, at any
width and also when the overview holds a related table or every other
tab is hidden. Without `fullPage` (drawer, pane) it is not read.
`RecordDetailView` threads the served object's `pinOverview` into
`RecordPageColumns` on the desktop full page only (not on a phone, which
keeps its one-column field list). The `recordPageColumns.ts` header now
says the layout is derived with one declared exception, citing ADR-0085.
- **metadata-core** — `OBJECT_REFERENCE_POSITIONS` classifies
`pinOverview` as `keep` (a boolean, no field name), so the FLS scrub
covers every top-level key.
- **Liveness ledger** — `packages/spec/liveness/object.json` row
`pinOverview: live` with consumer evidence (`recordPagePinsDetails`,
`RecordPageColumns`) and producer (`RecordDetailView`).
- **Generated** — `authorable-surface/data.json`, the reference pages,
`liveness/state-counts/object.md`, and the platform-objects
metadata-form translation bundles (zh-CN, ja-JP and es-ES translated by
hand, the locales the echo ledgers judge; the other locales carry the
current source fill, refilled when the help text changed so
`check:i18n-stale-fill` stays clean).
- **Docs** — `content/docs/ui/pages.mdx` (how the page is laid out) and
the `@object-ui/plugin-detail` README.
- **Changeset** — `.changeset/37792-object-pin-overview.md`:
`@objectstack/spec`, `@object-ui/plugin-detail`, `@object-ui/app-shell`,
`@objectstack/platform-objects`, `@objectstack/metadata-core` minor.
Existing tests changed, each forced by the new key and each with the
history line the earlier bumps carry:
`packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts`
(the served `object` property count, 53 → 54), and in
`packages/platform-objects/src/apps/translations/`
`object-collapsed-sections-echo-decisions.test.ts` (open leaves 132 →
134: the row's label and help text) and
`object-lifecycle-panel-echo-decisions.test.ts` (translated labels 867 →
868: the row's label).
## Tests
- `packages/spec/src/data/object.test.ts` — new describe
`ObjectSchema.pinOverview — the record page layout switch`: absent /
`true` / `false` parse end to end (and through `create()`); `'false'`,
`0`, `1`, `null`, an object are refused as `invalid_type` at
`['pinOverview']`; `ObjectExtensionSchema` refuses the key with a
message naming `ObjectSchema.pinOverview`.
- `ui/packages/plugin-detail/src/__tests__/RecordPageColumns.test.tsx` —
new top-level describe `RecordPageColumns — pinOverview, the object's
layout switch` in the existing harness file: the decision function; a
wide full page pins when absent or `true`; with `false` it does not pin,
the tab row starts with the overview, the overview is selected, the
field cap is 3; the side preview (no `fullPage`, 1600 px) draws the same
shape with and without `false`; a narrow full page (600 px) and a wide
full page whose overview holds a body table (1600 px) are not pinned
either way and get cap 3 with `false` (cap 1 without), the table under
the same cap.
## Acceptance notes
- Browser verification done (dogfood-verification skill) on
`examples/app-showcase` at 1440×900 (`os dev --fresh --seed-admin`, the
console from `ui/` source over the dev proxy), with `pinOverview: false`
added to `showcase_account` for the run only (not in this diff).
Screenshots in the project's shared files,
`objectstack-seat3/37792-shots/`:
- `false-full-1440.png` — Stark Industries full page, `false`: not
pinned, tabs `overview*` then the related tabs and `timeline`, fields in
two columns by width; its overview holds two body tables (Invoices,
Projects), the L2 S1 case.
- `default-full-1440.png` — the same page with the key absent: not
pinned (body tables), fields as the one-column field list, as before
this PR.
- `false-side-preview-1440.png` — the side preview (410 px) of the same
record with `false`: the one-column field list, tabs `overview*`,
Contacts, More.
- `default-contact-full-1440.png` — a contact full page with the key
absent: pinned (`details tabs`), the first related tab open, as before.
- The ADR-0085 Note's `Built by` line is not in this PR (it stays off
governed surfaces); the seat carries it on #38438 after merge.
## Verification
Two-minute check: `pnpm --dir ui exec vitest run
packages/plugin-detail/src/__tests__/RecordPageColumns.test.tsx -t
pinOverview` — 5 tests pass.
Read first: `ui/packages/plugin-detail/src/RecordPageColumns.tsx` (the
`pinned` / `detailsFillPage` hunk),
`packages/spec/src/data/object.zod.ts` (the key and the extension
guidance), `packages/spec/src/data/object.metadata-form.ts` (the boolean
row).
<details><summary>Local runs</summary>
At head `8a7c8499cc` (`origin/main` at 5ac1ee0 merged at `59e942b5d5` —
one hand resolution, the zh-CN positive control of
`object-lifecycle-panel-echo-decisions.test.ts`, 869 by its derivation,
main's 868 line kept above ours — then the ja-JP help text's レコードページ):
`bash scripts/pm/os-regen-merge.sh` steps 1–3, then the spec rebuilt,
`check:generated` 14 of 14 up to date with no regen diff, i18n bundles
in sync, `pnpm --filter @objectstack/platform-objects test` 130 files /
2221 tests passed, the metadata-protocol count test passed; `node
scripts/pm/dispatch-gates.mjs --commands` at `8a7c8499cc`: 128 derived,
128 run, every one exit 0; `--ran`: 128 run, 0 NOT-MEASURED.
At head `880f85619b` (the ja-JP / es-ES translations on top of
`011164551c`): `pnpm --filter @objectstack/platform-objects test` — Test
Files 130 passed, Tests 2221 passed (7 echo-ledger tests were red at
`011164551c`); `node scripts/check-i18n-bundles.mjs` in sync;
`check:i18n-stale-fill` clean. The derived gate list is the same 128
commands; the six it holds over changesets and i18n
(`check-changeset-no-major`, `check-empty-changeset` and its self-test,
`check:changeset-gate-self-tests`, `check:i18n`,
`check:i18n-stale-fill`) were re-run here, exit 0; the other 122 are
carried from `011164551c` (the commit touches no file they read);
`--ran`: 128 run, 0 NOT-MEASURED.
At head `011164551c` (the L2 S1 round on top of `482b7f3c70`), each
heavy run under `scripts/pm/os-verify-lock.sh`:
- `pnpm --filter @objectstack/spec exec vitest run src/data` — Test
Files 194 passed, Tests 6943 passed, 1 todo.
- `pnpm --dir ui exec vitest run packages/plugin-detail/` — Test Files
423 passed, 1 skipped; Tests 4007 passed, 18 skipped.
- `pnpm --filter @object-ui/plugin-detail type-check`, `pnpm --filter
@object-ui/app-shell type-check` — exit 0.
- `pnpm --filter @objectstack/spec check:generated --fix` then without
`--fix` — 14 of 14 artifacts up to date; `node
scripts/check-i18n-bundles.mjs` — in sync after `--write`;
`check:i18n-stale-fill` — clean.
- Ablation (`scripts/ablation-replace.mjs`): `detailsFillPage` without
`|| pinOverview === false` → 2 tests fail (the field cap stays 1 where
`false` asks for 3); restored, blob equals HEAD.
- `node scripts/pm/dispatch-gates.mjs --commands` at `011164551c`: 128
derived, 128 run, every one exit 0; `--ran`: 128 run, 0 NOT-MEASURED.
At head `482b7f3c70` (round 1, after merging `origin/main` at 1fef2ed):
`pnpm --filter @objectstack/spec test` — Test Files 913 passed, Tests
28904 passed, 1 todo; `pnpm --filter @objectstack/spec typecheck` — exit
0. Two derived tests went red on the new key and are fixed in this PR
(forced test edits, named here):
`packages/metadata-core/src/object-schema-fls-references.test.ts` (the
new key classified `keep` in `OBJECT_REFERENCE_POSITIONS`, source
change, test unchanged) and
`packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts`
(served `object` property count 53 → 54, with the history comment the
earlier bumps carry). `check-plugin-teardown-shape --self-test` needs an
unshallowed clone (exit 3 on a shallow one).
</details>
<!-- signed: repo:objectstack#3 · os-steve ·
session_01ADHkmS5m6C7eVVzJhUPsav -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5a77a70 commit d2caaec
39 files changed
Lines changed: 364 additions & 13 deletions
File tree
- .changeset
- content/docs
- references/data
- ui
- packages
- metadata-core/src
- metadata-protocol/src
- platform-objects/src/apps/translations
- spec
- authorable-surface
- docs/references
- api
- system
- liveness
- state-counts
- src/data
- ui/packages
- app-shell/src/views
- plugin-detail
- src
- __tests__
- synth
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
300 | 321 | | |
301 | 322 | | |
302 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
| 825 | + | |
| 826 | + | |
825 | 827 | | |
826 | 828 | | |
827 | 829 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
419 | 421 | | |
420 | 422 | | |
421 | | - | |
| 423 | + | |
422 | 424 | | |
423 | 425 | | |
424 | 426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
0 commit comments