Repository navigation
Commit 1208cc8
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuKobRqmoXkrWkHE4z9tvY3k)_
repo:objectstack#1 · os-sales · session_01L6bhgVHYk1S4MD4WibYGKk
Fixes #36150
Clause-②: no
Metadata-protocol: semantic
Skills-docs: follow-up #36179 —
skills/objectstack-ui/rules/record-page.md rules 4 and 5 (the
`record_more` advice); skills edits ride a domain:skills PR
## 维护者速读
- 手写的记录页(`kind:
'full'`)现在只在电脑整页上生效。手机整页、电脑右侧抽屉(以及分栏预览、界面页预览)一律画平台标准页:字段一列、每张子表一个页签、动态在最后。抽屉里「整页打开」打开的仍是手写页。
-
按您的两条裁决:审批请求页和用户页三处都保留自己的页;页面区块里的动作(`record_section`)标准页不画,演示应用任务的「重算工时」加了
`record_more`,手机和抽屉里在「⋯」里能找到;队列成员、审计日志「同一记录的变更」、发票的打印按钮只在电脑整页有(后续卡由席位立)。
- 不变:插槽页(HotCRM 线索、工单的告警,项目的甘特图)三处照旧;网址点名的页面(打印页等)照旧;电脑整页一点不变。
- HotCRM 主干已经没有手写整页(hotcrm#2671),所以 HotCRM
三处都没有变化,作对照;手写页的三处效果用演示应用的项目页拍。
## What changes
- **One reader of where an authored page applies**,
`authoredRecordPageApplies` in the new
`ui/packages/app-shell/src/views/recordPageSurface.ts`: true on the
desktop full page, false on a phone (`usePhoneViewport`) and in every
embedded view. Two exceptions are the host's, named there and nowhere
else: a page named in the URL (`…/record/:id/page/:pageName`, which only
the full-page route reads, objectui#12715), and
`OBJECTS_KEEPING_AUTHORED_PAGE` = `sys_approval_request`, `sys_user`
(maintainer rulings 7066490078). There is no author switch.
- **`RecordDetailView`**: `usePhoneViewport()` moves up to where the
page is assigned, and `assignedPage` is `null` where the authored page
does not apply, so the view takes the synthesized standard page there.
Inside the view everything downstream (columns, phone header, comments,
related lists) keys off `assignedPage`. Slotted pages never populate
`assignedPage` and keep their slots everywhere.
- **The record route's object scope** (`console/appObjectScope.ts`, L2
M1): `declaredRecordPage` reads the same `authoredRecordPageApplies`, so
on a phone the record route takes the synthesized page's arm (the
objects pointing at the record's, from the bundle or the registry)
instead of only the objects the authored page binds; the standard page's
child tabs are then all there. `AppContent` and
`useAppObjectScopePrefetch` hand it `usePhoneViewport()`, so the scope
follows the width across 768 as the view does. A page named in the URL
and the two kept platform pages still read their page's objects.
- **Showcase**: `showcase_recalc_estimate` declares `['record_section',
'record_more']` (ruling 7066506909). The authored Task Detail header
lists its action ids and leaves it out, so the full page still draws it
once, in the section bar; the standard page reaches it under ⋯.
`record-action-location-hosts.test.ts` now holds: the authored header
lists the record_header / record_more set less the section bar's
actions; no action is both a section action and an inline header one;
every section action is reachable under ⋯ on the standard page.
- **Docs**: `content/docs/ui/pages.mdx` gains "Where an authored page
applies" (a window narrower than 768 px counts as the phone; an
interface page's preview is embedded).
- **Not in this PR** (L2 S1, seat): the spec describes of `kind`,
`isDefault`, `apps` and the `slots.tabs` remedy → #36180 (schema face);
`skills/objectstack-ui/rules/record-page.md` rules 4 and 5 and the
`record_more` advice → #36179 (domain:skills).
- **Changeset**: `@object-ui/app-shell` minor, both declaration lines.
## Why
Card #36150 (child of epic #35590; maintainer 2026-11-22
「自定义记录页在手机和右侧预览里不生效、统一用标准页」). The card's item 5 list (page-only things,
and what each becomes off the full page) was posted on the card before
the build; the two questions it raised were ruled (7066490078,
7066506909).
### Item 5, and how each was handled
| Page | Page-only | Off the desktop full page now |
|---|---|---|
| showcase project | Tasks inline-edit grid tab, three sections, own
highlights, footer discussion | standard page: Tasks as the
master-detail child tab, ungrouped fields, the object's own highlights,
discussion in 动态 (the comment panel once #36114 lands) |
| showcase task | review banner, Recalculate Estimate (section bar),
three sections, path | banner gone; Recalculate under ⋯ (`record_more`
added); stage menu in the header |
| showcase settings | two sections | ungrouped |
| showcase invoice (default print page) | letterhead, print line items,
Print button | standard page, no Print button (full page only, ruled) |
| `sys_approval_request` | `record:approval_decision` | **kept on every
surface** (ruled) |
| `sys_user` | Security tab, effective access, AI assistants, verify
banner, picker | **kept on every surface** until #35897 (ruled) |
| `sys_organization` | three related tabs with set columns | the three
stay; the other lookups to the organization also become tabs until
#35897 |
| `sys_queue` | Members list paired by text value | full page only
(ruled; follow-up card by the seat) |
| `sys_audit_log` | "Changes to the same record" list, five sections |
list full page only (ruled; same follow-up); ungrouped |
| HotCRM main | no authored full page since hotcrm#2671 | no change on
any surface |
## Side effects reviewers should know
- **Seventeen `RecordDetailView.*` test files mounted the drawer
(`embedded`) only as a harness for an authored page**
(`feedGrant-12082`, `feedCommentEditDelete-12268`,
`reactionRecords-12078`, `authoredActivityThreading-12249`,
`reactionWriteFailure-10899`, `withheldMentions-28218`,
`discussionFallbackPipeline-8983`, `discussionExplicitComposition-7298`,
`commentWriteFailure-10899`, `reactionsCommentRowsOnly-11035`,
`reactionKeepIds-11019`, `feedRecordScope`, `topInset-35745`,
`oneProvenanceFooter-12307`, `appendInset-27520`,
`replyCountOnRead-12144`, `feedLoading`). They now mount the full page,
with a one-line note where `embedded` was; no assertion changed. One
case changed meaning: `harness` › recordPagePlacesNoComponent-32478 "the
record drawer explains it the same way" now pins that the drawer draws
the standard page and no explanation, since the authored page does not
apply there.
- **#36114** (desktop comment panel) is merged; `main` is merged into
this branch. Its pin "no icon on a hand-written page"
(`commentsPanel-36075.test.tsx`) now mounts the full page, where an
authored page keeps its discussion and shows no icon; a new case beside
it pins the opposite on the drawer: an authored-page object's drawer
draws the standard page and offers the panel (L1-c item 1).
- The phone reading is the window width (`usePhoneViewport`, below 768):
a desktop window narrowed below 768 also takes the standard page.
## Verification
- New `AppContent.authoredPagePhoneScope-36150.test.tsx` (6), through
the real `AppContent` and `MetadataProvider`, the view a double printing
the objects it is handed: desktop reads the authored page's objects, a
child it does not bind left out (CONTROL); a phone reads every object
pointing at the record's, that child included; the width crossing 768 on
an open record moves the scope; a media-query change that leaves the
window wide (what printing fires) keeps the authored page's scope (L2
N4); on a phone a page named in the URL and the `sys_user` page still
read their own objects. **Red before**: with the scope handed `phone =
false`, 2 of 6 fail (phone, width crossing).
- New `RecordDetailView.authoredPageDesktopOnly-36150.test.tsx` (19, one
added for N4: the authored page survives a print-style media-query
change), through the real `RecordDetailView`: an authored page draws on
the desktop full page; the standard page with its tab strip on the phone
(375) and the drawer, the authored block gone; on the drawer the
object's `record_more` action is in ⋯. CONTROL: no authored page, the
standard page on all three. Exceptions on the phone and the drawer: a
slotted page keeps its slot; `sys_approval_request` and `sys_user` keep
their page; a page named in the URL draws on the phone. **Red before**:
with the reader returning `true`, 4 of 18 fail (the unit pin, phone,
drawer, ⋯).
- Local: every `app-shell` `RecordDetailView.*`, `recordDrawer*`,
`ObjectView*` and `console/__tests__/AppContent*` file, plus every other
`ui/` test file naming `RecordDetailView`, `recordDrawer` or
`RecordPageDrawerHost`: 319 files, 3,003 tests, all pass.
`examples/app-showcase` `record-action-location-hosts.test.ts` 14/14;
`objectstack validate` passes. ESLint on every changed file: 0 errors.
`overlap-check.mjs`: clean against main and the 4 open PRs that share a
file (#36136, #36129, #36114, #35923). `type-check` for app-shell did
not run locally (the ui packages' declarations are not built in this
container); CI is the reading.
- Browser, showcase on this branch (server 18.6.0, console from this
branch's `ui/` on Vite), zh-CN, light and dark, shots in the project
evidence folder `build-seat1/36150/`:
| Surface | Showcase project | Showcase task |
|---|---|---|
| Desktop full page, 1280 | authored: tabs 详情 / 任务 / 相关 2 / 附件, footer
讨论 | authored: path, review banner slot, 重算工时 in the section bar, once |
| Drawer from the list, 1280 | standard: 概览 / 字段动物园 1 / 成员 1 / 任务 2 /
客户简报 / 附件 / 动态 | standard: 概览 / 动态; ⋯ holds 打开文档, **重算工时**, 重算所选 … 整页打开
|
| Phone, 390 | standard: 概览 / 字段动物园 1 / 成员 1 / 任务 2 / 更多 3, fields one
column, bottom bar | standard; ⋯ holds 记录工时, 归档, **重算工时** … |
- HotCRM main (`1468877`, on 18.6.0) as the no-change control, lead: the
standard page with its tabs on all three surfaces (it is a slotted
page), its record actions in the header / ⋯ (转化线索, 安排跟进, 记录通话 …).
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (ESLint on the changed
files, 0 errors).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the 维护者速读 block is the
maintainer's summary, in the maintainer's language).
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
Branch name is the harness-assigned `claude/project-thread-0slbpo`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgVHYk1S4MD4WibYGKk)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgVHYk1S4MD4WibYGKk
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgVHYk1S4MD4WibYGKk -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1705ec9 commit 1208cc8
30 files changed
Lines changed: 863 additions & 47 deletions
File tree
- .changeset
- content/docs/ui
- examples/app-showcase
- src/ui
- actions
- pages
- test
- ui/packages/app-shell/src
- console
- __tests__
- views
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
261 | 283 | | |
262 | 284 | | |
263 | 285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | | - | |
51 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| |||
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
186 | | - | |
187 | | - | |
188 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
189 | 194 | | |
190 | | - | |
| 195 | + | |
191 | 196 | | |
192 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
193 | 207 | | |
194 | 208 | | |
195 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
490 | 494 | | |
491 | 495 | | |
492 | 496 | | |
| |||
546 | 550 | | |
547 | 551 | | |
548 | 552 | | |
| 553 | + | |
549 | 554 | | |
550 | 555 | | |
551 | 556 | | |
| |||
0 commit comments