Repository navigation
Commit eef8373
feat(plugin-detail,app-shell,components): record page v3 layout (#27310)
Part of #27055 — this lands the record page v3 layout. The two fenced
read points stay for #27069: the related cards' default order (primary
first, then derived order, without reading `relatedLists`) and the body
tables' placement (after the first field group, without a `fieldGroups`
placement entry).
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:没有指定页面的对象,记录页换成 v3
布局。详情区无边框,空区段折成一行。时间线合成一条流,带「全部/活动/讨论/变更」筛选。关联区是紧凑卡片,读者可拖动、折叠、隐藏,还能 ⤢
原地放大。主从子表直接嵌在详情里。
- 为什么改:执行 #27055 已批准的 v3 设计。删掉了 ADR-0085 判死的页面开关和 rightRail
插槽,把三处重复的历史、动态、讨论入口并成一个。
- 风险与回滚:只改渲染层,作者写的元数据不变。BuildPageOptions 删字段属于 TS
层面的破坏性变更,控制台内部没有调用方传这些字段。回滚就是 revert 本 PR。读者的卡片排列存在已有的
workspacePreference 里,回滚后不会被读取,没有副作用。
- 先看:ui/packages/app-shell/src/views/RecordDetailView.tsx(放大的 URL
往返、排列偏好、字段变更并入时间线),ui/packages/plugin-detail/src/synth/relatedArrangement.ts(排列合并规则),ui/packages/plugin-detail/src/RecordPageColumns.tsx(三栏模板和放大视图)。
- 两分钟验证:打开下方证据分支里的
contact-1440-three-columns.png,应看到「详情|时间线|关联卡片」三栏,时间线里有一条灰色的字段变更行和两条评论。
- 需要你做的:人工评审并合并。本 PR 改动 5828 行,超过 3000 行的人工合并线。
## What changes
The synthesized default record page (an object with no assigned record
page) takes the v3 layout. Authored pages are untouched apart from the
shared header and the renderer faces noted below.
- **Header.** One filled primary action, two outline actions, the rest
in `⋯`. Refresh is the first item of `⋯` (no separate ⟳ button). Up to
six highlights, as an equal grid.
- **Details.** Frameless sections in one to three columns. All-empty
sections fold into one line at the foot. The created / updated / owner /
id line closes the details column.
- **Timeline.** One stream merging comments, `sys_activity` rows and
audit field changes, newest first. The composer is on top, the chips are
All / Activity / Discussion / Changes, system entries are one muted
line, and a "View all N →" button shows the rest. The History tab, the
Activity tab and the discussion footer are retired on this page.
- **Related column.** Compact cards (title, count, +, ⤢, up to three
rows of name plus one chip, no table header, no View All footer) in a
fixed 320 px column. The columns are 1.25fr : 1fr : 320px.
- **Reader arrangement.** Drag (desktop), Move up / Move down / Collapse
/ Hide from the card menu, and "N hidden · Show" at the foot. It is
stored in the #27052 workspace preference under
`record.related.arrangement`, scope `object:<name>`. The value is `{ v,
order, collapsed, hidden, basedOn, seen }`. A default-order change shows
"Default order updated · Restore default". A new relationship lands
after its nearest default neighbour with a "New" badge for 48 hours. The
tabbed tier's Related tab follows the same arrangement.
- **Enlarge in place.** ⤢ opens the list full width under
`?related=<object>.<field>`. Esc or ‹ Back returns.
- **Body tables.** A `master_detail` FK declaring `inlineEdit`, or
`relatedList: 'primary'`, is drawn as a table after the first field
group. It opens on ten rows with a totals line and has ⤢.
- **Tabbed tier** (drawer, narrow widths): Details / Timeline / Related
/ (Approvals). Timeline is second for an object whose timeline is on by
default (#27052's derivation), last otherwise. Attachments sit in
Related.
- **BuildPageOptions** loses `hideHighlights`, `hidePath`,
`showReferenceRail`, `hideReferenceRail`, `hideRelatedTab`,
`relatedLayout`, `recordChrome`, `showActivity`, `history` and
`slots.rightRail` (TypeScript-only break, named in the changeset with
its ADR-0087 marker).
Fence read points for #27069:
- **Default order.** `synthParts` related ordering in
`RecordDetailView.tsx`, commented as the fence.
- **Body-table placement.** `bodyTablePlacement` in
`buildDefaultPageSchema.ts`, commented as the fence.
## Tests
- New suites cover the face, the arrangement merge rules, the card stack
(drag, menu, collapse, hide, enlarge, tabbed tier), body tables,
body-table placement, and the timeline stream including its newest-first
window. A last suite pins the retired hints as compile errors.
- Existing pins moved with the page: History and discussion-footer reads
now open the Timeline tab, the header menu has Refresh first, the
highlight cap is six, and the meta line sits in the details column.
| Suite (local, under the verify lock) | Result |
|---|---|
| `@object-ui/plugin-detail` | 331 files: 329 passed, 1 skipped, 2
failed on the first run and passed on rerun after the pin fixes |
| `@object-ui/components` | 446 passed, 1 skipped |
| `@object-ui/app-shell` | 1858 files: 1856 passed, 1 skipped, 1 failed
on the first run and passed on rerun after the fix |
| console `approvalRequestsDataSource.recordPage` | passed |
| type-check components / plugin-detail / app-shell | clean |
## Acceptance notes
- **Screenshots** are on the never-merged branch
`claude/issue-27055-evidence-20261028`:
https://github.com/objectstack-ai/objectstack/tree/claude/issue-27055-evidence-20261028/evidence/27055
- Shots: contact 1440 three columns, contact 1100 two columns, contact
drawer, account 1440, opportunity 1440, related column after a drag, and
the enlarged state.
- There is no product object in this repo, so the opportunity (with its
Line Items body table) stands in.
- **Three columns at 1440** need the app sidebar collapsed. The tier
threshold (1280 px page container, #26678) is unchanged.
- **Accounts and contacts** fold the timeline by #27052's object-derived
default. The shots turn the reader's switch on; the switch semantics are
unchanged.
- **Deviations:**
- The arrangement value carries a `seen` member, a first-seen stamp per
id, as the clock for the 48-hour "New" badge.
- Body-table totals are a summary line over the page's rows, not an
in-table row.
- Body-table collapse is per view, not persisted.
- The host's Edit stays a labelled filled button outside the
three-action cap.
- The enlarged list keeps the full list page's "View All" link, for
sort, filter and export. Only the card footer is gone.
- **Out of scope, carrier #27069:**
- The spec describe of `relatedList: 'primary'` still says "promoted to
its own tab".
- The spec describe of `enable.trackHistory` still says "Show the record
History tab".
- The generated reference docs repeat both describes.
- These live under `packages/spec/**`, which this card does not touch.
The hand-written security doc line is updated here.
## Verification
- **Gates.** Every gate `dispatch-gates.mjs --changed` derives for this
diff ran on the final tree. The `--ran` reconciliation verdict is below.
- **Console type-check.** It fails locally only on plugin packages
outside the build closure (`plugin-gantt`, `plugin-map`,
`plugin-markdown`, `plugin-timeline`, `plugin-tree` have no `dist`
here). No error is in a file this PR touches. CI builds the full graph.
- **Browser.** Checked in a real browser against the app-crm example on
a fresh database. The console dev server ran from this branch.
<details><summary>Gate reconciliation (66 derived, 66 run, all exit
0)</summary>
```
Run reconciliation — 66 derived, 66 run, 0 NOT-MEASURED, 0 UNRUN.
dispatch-gates --ran: 66 derived famil(ies) accounted for — 66 run, 0 NOT-MEASURED
changed lines: 5828 (+4516 / -1312; 78 files) vs the human-merge threshold 3000: OVER
```
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q4EjjN14dHBs3CJce73zNm
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jack Zhuang <50353452+hotlong@users.noreply.github.com>1 parent 73725c2 commit eef8373
80 files changed
Lines changed: 4524 additions & 1320 deletions
File tree
- .changeset
- content/docs/protocol/objectql
- ui
- apps/console/src/services
- content/docs/guide
- e2e
- packages
- app-shell/src
- utils
- views
- metadata-admin/previews
- components/src
- __tests__
- renderers/layout
- i18n/src
- __tests__
- locales
- plugin-detail
- src
- __tests__
- renderers
- __tests__
- synth
- __tests__
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
578 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
579 | 581 | | |
580 | 582 | | |
581 | 583 | | |
582 | 584 | | |
583 | 585 | | |
584 | 586 | | |
585 | 587 | | |
586 | | - | |
| 588 | + | |
587 | 589 | | |
588 | 590 | | |
589 | 591 | | |
| |||
598 | 600 | | |
599 | 601 | | |
600 | 602 | | |
601 | | - | |
| 603 | + | |
602 | 604 | | |
603 | 605 | | |
604 | 606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
138 | 145 | | |
139 | 146 | | |
140 | 147 | | |
| 148 | + | |
141 | 149 | | |
142 | 150 | | |
143 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
151 | 156 | | |
152 | 157 | | |
153 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
154 | 177 | | |
155 | 178 | | |
156 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
0 commit comments