Skip to content

feat(record-page): the side preview drops the comments icon and panel; a record's comments are on its full page - #36406

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-36225-preview-no-comments
Nov 22, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-36225-preview-no-comments

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA

Fixes #36225

Clause-②: no
Metadata-protocol: none

维护者速读

  • 在列表里从侧边打开一条记录(右侧预览)时,头部不再有评论按钮,预览里任何地方都打不开评论面板,「动态」页签里也不显示评论;要看或写评论,点预览右上角「展开成整页」,整页的评论按钮和评论栏照旧。
  • 属于「记录详情页重做」专题,照维护者说的「预览里去掉评论按钮,评论只在整页里」(对齐 Attio 的预览)。
  • 出错的话,影响的是预览里看不到评论;评论数据不动,整页照常能看能写,撤回这次改动即可恢复原样。
  • 无

右侧预览头部:没有评论按钮

What changes

The record drawn embedded (the side preview a list opens through 「在侧边打开」, the drawer a record page opens over itself, and the overlays ObjectDataPage / InterfaceListPage draw) no longer offers the comment panel:

  • RecordDetailView.tsx: commentsPanelOffered is now commentsEligible && !commentsPhone && !embedded. A new commentsLeftToFullPage (embedded, otherwise eligible) keeps the preview's 动态 stream giving the comments up (RecordCommentsInPanelContext and the stream count read streamGivesUpComments), so the preview shows no comment row and no composer anywhere. The preview does not read sys_comment at open for an icon count any more (the discussion rides the open's payload only where a surface holds the comments).
  • The drawer-only plumbing the panel needed is removed: the pane bar's comments slot (RecordPaneBarComments, commentsSlot on RecordPaneBarApi, the comments slot RecordStackDrawer handed NavigationOverlay), the plain-overlay trailing placement, the drawer placement (cover under a 760 px body, beside above it, COMMENTS_PANEL_DRAWER_SPLIT_MIN_WIDTH, useElementWidth) and the drawer's own open-or-closed preference. commentsPanelPlacement takes the window width only; the browser keeps one choice, the page's (COMMENTS_PANEL_OPEN_KEY).
  • Unchanged: the full page's icon, panel, composer and placement; the phone's comment page; list rows.
  • Docs: the comment-panel section of content/docs/frontend/plugins/plugin-detail.mdx and the plugin-detail README say the drawer has no panel; the RecordCommentsInPanelContext jsdoc names the preview case.
  • Changeset .changeset/36225-preview-no-comments.md (@object-ui/app-shell patch). It states that it replaces the lines of the pending objectstack#36075 entry that put the icon and panel in the drawer (the same form the pending objectstack#36076 entry uses); no existing changeset is edited.
  • Card item 3 (the wording of objectstack#36149's item 2, now 「右边只有『更多』」) is a card edit, not code: the coordinator already commented it there.

First read (risk order):

  1. ui/packages/app-shell/src/views/RecordDetailView.tsx, the comment-panel block near commentsEligible (the gate and streamGivesUpComments).
  2. ui/packages/app-shell/src/views/recordCommentsPanel.tsx (placement narrowed to the page).
  3. ui/packages/app-shell/src/views/RecordDetailView.commentsPanel-36075.test.tsx, the new the side preview has no comments (objectstack#36225) block.

Two-minute verification: pnpm dev, open any object list, hover a row and press 「在侧边打开」: the preview header shows ↑ ↓, the position, ⤢ and ✕, then the record's name, 编辑 and ⋯, and no comments icon; 动态 shows no comment. Press ⤢: the full page's top bar shows the comments icon with its count, and the panel opens beside the record.

Tests

RecordDetailView.commentsPanel-36075.test.tsx (through the real RecordDetailView):

  • new describe('the side preview has no comments (objectstack#36225)'): no icon and no panel in the preview though the page was left with the panel open (the card's "after commenting" row); the preview's 动态 tab draws no comment and no composer; an object with a hand-written page: the preview draws the standard page, with no icon and no panel (replaces the objectstack#36150 case that pinned the drawer's icon).
  • CONTROL: a comment written in the full page's panel is posted on the record and shown there (the existing full-page cases stay).
  • Removed: the drawer-placement case ("a drawer too narrow to split …") and recordCommentsPanel.drawerEscape-36075.test.tsx, which mounted the panel inside the drawer, a placement this card retires. The panel's own Esc and @-list behaviour stay pinned in plugin-detail's CommentsPanel tests.
  • recordCommentsPanel-36075.test.ts: the page placement only.
  • RecordDetailView.feedRecordScope.test.tsx mounts the full page for its synthesized-page cases (they read the panel), and the harness's refused-sys_comment case mounts the full page.
Readings (head 855a906 unless named)
  • Targeted ui suites, ui/ vitest under the shared lock, --maxWorkers=1, 16 files (the comment panel, feed scope, harness, resolved threads, reply counts, feed loading and failure, discussion fallback and explicit composition, record-open requests and waves, timeline count, pane open-as-page, the list's record drawer, the top bar): Test Files 16 passed (16), Tests 229 passed (229) at 9461c50; after the two test-only commits, RecordDetailView.commentsPanel-36075.test.tsx: Tests 18 passed (18).
  • pnpm run type-check in ui/packages/app-shell and in ui/packages/plugin-detail: exit 0 each, after building the @object-ui/app-shell^... closure (exit 0).
  • Ablation through scripts/ablation-replace.mjs (anchor hit 1 to 0, blob c1a648b1ae36 moved; restored, git diff HEAD empty):
    • A: !embedded dropped from the panel gate: 2 failed (no icon and no panel in the preview; the hand-written page's preview).
    • B: commentsLeftToFullPage dropped from streamGivesUpComments: 1 failed (the preview's 动态 draws no comment and no composer).
  • Browser, Chromium 1440 x 900, zh-CN, a fresh showcase backend and the Console dev server on this branch, object 客户 (showcase_account), record Initech, opened by 「在侧边打开」: preview data-comments-button 0, data-comments-panel 0, composer 0, also on its 动态 tab. ⤢ to the full page: icon 1; panel opened, a comment written, shown in the panel. Back to the list, the same record in the preview (the page's panel left open): icon 0, panel 0, the new comment not on screen, also on 动态.

Screenshots (Initech, this branch):

Acceptance notes

  • HotCRM 线索: NOT MEASURED in a browser (HotCRM runs against published packages, not this branch). The gate keys on the record being drawn embedded, never on the object or app, and the same view draws every app's preview.
  • The card's 「没有核对的」 item, where a comment notification lands: measured. The inbox row's link is /{object}/{id}, resolved under the current app (resolveNotificationTarget); opening /apps/showcase_app/showcase_account/ID lands on the full record page (/record/ID, no pane, comments icon present). It does not open the comment panel by itself: the panel opens as the reader left it. Nothing to change here for this card.
  • NavigationOverlay and RecordTopBar in @object-ui/components keep their optional comments slot (a published prop); the console no longer fills the overlay's.
  • A reader whose browser stored os:record-comments-panel:drawer keeps a key nothing reads.
  • Overlap: scripts/pm/overlap-check.mjs clean against origin/main, feat(console): Change Owner on the record page, the list selection bar and the edit form (#35403) #36343 and fix(console): a stage move refused with a 409 in a record drawer re-reads the record #36394 (both share RecordDetailView.tsx).

Verification

Local gates
  • node scripts/pm/dispatch-gates.mjs --commands derived 71 families for this diff; all 71 run locally, each exit 0 (check:skill-examples and check:type-check-debt first answered exit 3, prerequisite not built, and were re-run after building @objectstack/client-react: exit 0). --ran reconciliation: 71 derived, 71 run, 0 NOT-MEASURED, 0 UNRUN.
  • On the final head 855a906, after the test-only commits: check:cross-package-test-inputs, check:test-source-alias, check:nul-bytes, check:tier-file-adoption, check:undeclared-dep-imports: exit 0 each.
  • pnpm --dir ui exec vitest run scripts/: Test Files 172 passed | 2 skipped (174).
  • The full farm and the required UI jobs are CI's.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA

…; comments are the full page's

A record drawn embedded (the list's drawer or pane, a record page's drawer)
no longer offers the comments icon or the comment panel, and its activity
stream keeps giving the comments up, so the preview shows no comment and no
composer. The full page keeps its icon, panel and composer.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
…nd pane draw none

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
…tab row is drawn

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
… left with its panel open

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA

Final head · 2026-11-22T10:27Z · 855a906669a91d5a4416d3f7640f90c648fc9327. CI is complete on this head: 49 success, 10 expected skip, 0 failed, mergeable_state clean (os-dev-report 7077584112 on #36225). The area will not push again unless a review asks. A clean main sync before landing is the area's job.
Review owed: L1 (l1-review-checklist.md, L1-d, requested through the seat) at this head. Clause-②: no: no contract face, so no L2 is owed. check-governed-merges --pr 36406: NOT governed, 459 lines ≤ 3000, so the area lands it.
Out of scope, noted and not filed (forwarded to the seat):

  • A comment notification lands on the full record page but does not open the comment panel by itself.
  • @object-ui/components NavigationOverlay keeps its optional comments slot, which the console no longer fills.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 REWORK · head 855a906669a91d5a4416d3f7640f90c648fc9327 · 2026-11-22T10:34Z

维护者速读

  • 用户能看到什么变化:在列表里「在侧边打开」一条记录(右侧预览),以及记录页上再开的抽屉,头部不再有评论按钮,预览里任何地方都打不开评论面板,「动态」页签也不显示评论和评论框。要看或写评论,点预览头部「展开成整页」;整页的评论按钮、评论栏、评论框照旧,手机的评论页也不变。
  • 为什么做:卡 右侧预览里去掉评论按钮和评论面板:评论只在记录整页里(Attio 的预览也没有评论) #36225,维护者说「右侧展开预览时,attio 不显示评论」,协调席建议「预览里去掉评论按钮,评论只在整页里」,维护者同意立卡。
  • 出错会怎样:最多是预览里看不到评论,评论数据不动,整页照常能看能写;可以整体撤回。
  • 要你做什么:无。
  • 席位意见:REWORK,只有一项:changeset 头部漏了 @object-ui/plugin-detail。功能和测试我读下来都是对的,见下面。

要改的(1 项)

  1. changeset 头部要加 '@object-ui/plugin-detail': patch。 本 PR 改了 plugin-detail 的两处已发布内容:README.md(ui/packages/plugin-detail/package.json 的 files 是 dist、README.md、CHANGELOG.md、LICENSE,README 会随包发出去),以及 src/recordTimelineStream.ts 里 RecordCommentsInPanelContext 的 TSDoc(它由 src/index.tsx:265 公开导出,vite-plugin-dts 会把这段注释写进 dist/index.d.ts)。这两处必须改,不改就变成假话(旧 README 还写着抽屉窄于 760 px 时面板占满抽屉),所以不是撤回它们,而是在 .changeset/36225-preview-no-comments.md 的头部加上这个包,正文补一句:plugin-detail 的 README 和 RecordCommentsInPanelContext 的说明改为写明预览的情形,代码不变。l1-face 也标了这一项。这和今天 fix(fields): a person picked in a list cell shows their name at once; avatar initials are letters only #36324、fix(objectql): a package registered again stops serving an object extension its new manifest dropped #36325、fix(formula): list-equality prescribes a rewrite that works at each site, and judges a flow condition only where the run binds the typed row #36340 里撤销的标记不同:那几次只动了测试文件,测试不发布。只改 changeset 文本,我做增量审核时只核这一处加 CI。

席位核对(本轮已读,增量时不重读)

  • 形态:l1-face --pr 36406 只标了 changeset 一项(即上面第 1 项),其余 ok;draft、base main、Fixes #36225、Clause-②: no、Metadata-protocol: none。13 个文件 +175 −284,非受管。CI 49 项 success、10 项按设计跳过、0 失败。Fixes 成立:卡第 1、2 项在代码里交付;第 3 项(右侧预览收紧:宽度收到 460 可拖动;头部去掉「编辑」和「复制编号」;点子表记录在同一个预览里打开 #36149 第 2 项的措辞改为「右边只有『更多』」)是卡面编辑,协调席已在那张卡上留言;验收里的预览头部截图已附在正文。HotCRM「线索」没有在浏览器里量,dev 写明原因:开关只看记录是否以嵌入方式绘制,不看对象或应用,我认可。
  • Clause-②: no 属实:删掉的 RecordPaneBarComments、commentsSlot、useElementWidth、COMMENTS_PANEL_DRAWER_SPLIT_MIN_WIDTH,以及 commentsPanelPlacement / useCommentsPanelOpen 的签名变化,都只在 app-shell/src/views/ 内部;app-shell 的包导出只有 .(dist/index.js)和 ./styles.css,src/index.ts 只从 views/index.js 导出那几个视图,这些名字都不在公开面上。@object-ui/components 的 NavigationOverlay / RecordTopBar 保留可选的 comments 插槽,只是 console 不再填。
  • 实现读法(RecordDetailView.tsx):commentsEligible 收拢原来两处相同的条件;面板只在 !embedded 时提供,commentsButton 跟着为 null,所以窗格栏和普通抽屉头部(PageHeaderTrailingContext 现在只放 panelToggles)都没有按钮。新的 commentsLeftToFullPage 让预览的「动态」照样把评论让出去:RecordCommentsInPanelContext 与流的计数都改读 streamGivesUpComments。预览不再为按钮计数在打开时读 sys_comment(feedWanted 仍按 commentsSurfaceOffered)。浏览器里只剩一个开或关的记录 COMMENTS_PANEL_OPEN_KEY(沿用原来的 page 键,已开的读者不受影响);旧的 drawer 键留着没人读,dev 已在正文写明。
  • 一点说明(不改判):authoredRecordPageApplies 的两个例外(URL 里点名的页面,和 OBJECTS_KEEPING_AUTHORED_PAGE 里的 sys_approval_request、sys_user)在抽屉里仍画手写页,手写页里作者自己放的讨论块照旧显示。这和改动前一样(面板本来就要求 !assignedPage),本 PR 没有动它,也不在卡的范围内。
  • 文本逐句核:changeset 正文两段与 diff 一致(第一段:预览没有按钮、没有面板、「动态」只剩系统条目、整页和手机不变;第二段:替换 评论(一)电脑:评论从「动态」页签拿出来,做成记录页和抽屉右侧的独立评论栏;对一条评论的操作收到一处 #36075 条目里抽屉的那几句,760 px 的覆盖和拆分都没了,浏览器只记一个选择,没有 props、导出、元数据变化)。content/docs/frontend/plugins/plugin-detail.mdx 改的三处(面板只在整页头部打开、抽屉没有按钮和面板且「动态」不显示评论、只记一个开关、去掉抽屉 760 px 的句子)都与代码一致;那里多了一个空行,不影响渲染。README 新增的「console 在整页和抽屉里都包上 RecordCommentsInPanelContext」与 streamGivesUpComments 一致。
  • 测试证据:新的 the side preview has no comments (objectstack#36225) 三条:整页留着面板开、再开预览,预览里没有按钮和面板(在 document 上也查过);预览「动态」页签选中后没有评论、没有评论框、没有文本框;手写页的对象在预览里画标准页,COMMENTS_PANEL_OPEN_KEY 设为 open 也没有按钮和面板。对照:整页面板里写一条评论,sys_comment 带 thread_id 被创建并显示。dev 做了两次消融:去掉 !embedded,挂 2 条;去掉 commentsLeftToFullPage,挂 1 条,所以这些断言不是空的。删掉的 drawerEscape 测试和抽屉 cover 用例,测的是本卡取消的那种摆放;面板自己的 Esc 行为仍由 plugin-detail 的 CommentsPanel 测试钉住。这些用例我没有在本地重跑,读的是报告和 CI。
  • 落地条款:非受管;本项改完后做增量 L1,不涉及声明面 L2(Clause-②: no 不变);之后由区 ready + auto-merge。

…text docs ship in this change

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT(增量)· head d3ed9585f62be292dd1f26d8431673f36ad5f5e8 · 2026-11-22T10:58Z

维护者速读

席位核对(增量,只核 855a9066..d3ed9585 加 CI)

  • 本轮的 diff:一个提交,只改 .changeset/36225-preview-no-comments.md,+3;代码、测试、文档与上次审核的 head 逐字相同,上一轮的读法照旧有效。
  • 第 1 项已改好:头部加了 '@object-ui/plugin-detail': patch;正文新加的一句「plugin-detail 的 README 和 RecordCommentsInPanelContext 的说明改为写明预览的情形,那里没有代码变化」与 diff 一致。l1-face 的 changeset 一项现在是 ok。Clause-②: no、Metadata-protocol: none 不变,仍然属实。
  • nit:PR 正文 What changes 里那一条还写着 changeset 只有「@object-ui/app-shell patch」,方便时顺手补上 plugin-detail;这不是声明行,不改判。
  • CI @ d3ed9585:49 success · 10 expected skip · 0 failed · 0 pending;mergeable_state clean。
  • 落地条款:非受管;不涉及 L2;由记录区 ready + auto-merge。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Landing (seat 7, 2026-11-22T11:01Z): head 9719d7bc0b1d312cb5e5761535c56a628e06a9b1 · L1 ACCEPT 7078138872 (L1-d, delta at d3ed9585; d3ed9585..9719d7bc is one merge of main that brings in nothing the PR authored) · no L2 face (Clause-②: no, Metadata-protocol: none, no published schema or governed rule text) · check-governed-merges --pr 36406: NOT governed, 462 changed lines ≤ 3000 · CI on the head is still running; auto-merge enters the queue only once it is green. → pr_ready + automerge_enable (merge queue).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 22, 2026 11:01
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 8466fca Nov 22, 2026
60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36225-preview-no-comments branch November 22, 2026 11:40
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
… name first with one labelled action, and lists a child tab one row per record (objectstack-ai#36438)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbVF7sWPNE4HmjkgyaVxQYif)_
repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA

Fixes objectstack-ai#36149
Fixes objectstack-ai#36201

Clause-②: yes (widening) — new optional members only:
`RecordHeaderBar.preview` and `PageHeaderActionsProps.preview` on
`@object-ui/components`, `ObjectGridComponentProps.cardFace` on
`@object-ui/plugin-grid`; nothing removed or renamed
(`recordPreviewWidthKey` is app-shell internal, not on its package
entry)
Metadata-protocol: none

## 维护者速读

- 用户在列表里点开一条记录的右侧预览:预览从约 720 宽收到
460,可拖动;头部先显示完整记录名,只留一个主要按钮,「编辑」「复制编号」等都进了「更多」;子表页签每条记录一行(标题加一行摘要)。整页记录页不变。
- 属于「记录详情页重做」专题:右侧预览收紧,并解决动作按钮多时记录名被挤成几个字的问题。
- 出错时用户会在预览里找不到某个按钮,或子表显示成卡片行而不是表格;所有动作都还在「更多」里,可直接撤回本改动。
- 页签多时用「更多 N」下拉收起,和整页、手机一致(objectstack-ai#35595 已对所有界面裁定);不改成横向滑动。

## What changes

Both cards, one PR (1,119 changed lines incl. tests and docs, under the
1,500-line split threshold).

**Width (objectstack-ai#36149 item 1).** The record preview opens at
`RECORD_PREVIEW_DEFAULT_WIDTH` (`min(92vw, 460px)`) and its left edge
drags from 380 to 900 px (`navigation-overlay`'s `DRAWER_MIN_PX` /
`DRAWER_MAX_PX`). The dragged width is remembered in the browser under
ONE key, `RECORD_PREVIEW_WIDTH_KEY`, for both the list's preview
(`ObjectViewRecordOverlay`) and a record page's drawer level
(`RecordPageDrawerHost`). Shared width, as the coordinator recommended:
I found no measured reason for per-object widths. A drawer whose
`navigation` authors its width (`navigation.size` other than `auto`, or
a `navigation.width`, pixel or percent) does not use the shared key:
`recordPreviewWidthKey` gives it the object's old per-object key
(`recordOverlayWidthStorageKey`, unchanged). The list's preview reads
the view's `navigation`, then the object's; a record page's drawer reads
only its root record's object's `navigation`. That key is shared with
the object's calendar, gantt, kanban, tree and grid overlays and a
resizable `RecordDetailDrawer`, so the drawer opens at the authored
width until a width is dragged in it or in one of those overlays; a
width dragged in another object's preview never replaces it. Only for an
object that authors no size or width does the console's preview no
longer share a width with that object's calendar, gantt, kanban, tree or
grid overlay or its `RecordDetailDrawer`. The width and its key belong
to the drawer's root: child levels keep the root's width, and in the
list a record a lookup chip opens as the root takes the list's width and
key (the list object's, not the opened record's). Both hosts read the
root pane's width through one helper, `recordPaneWidth` (an authored
width as written, else the `navigation.size` bucket through
`overlayWidthFor`, else 460), so a record page's drawer now honours its
root object's authored `size`. And `useDrawerResize` drops the previous
width when its `storageKey` becomes absent or holds no usable value: a
record page's drawer that closed on a task at the shared 600 px opens a
contract next at its authored 720 px, not at 600. `consoleSidebarRail`'s
`RECORD_DRAWER_WIDTH` follows to 460, so the rail's list-width budget is
unchanged in kind.

**Every resizable drawer's range (`@object-ui/components`).** The range
lives in `NavigationOverlay`, so it applies to every drawer opened with
a `storageKey`: the calendar, gantt, kanban, tree and grid overlays, a
resizable `RecordDetailDrawer`, and the console's preview. One drawer
family, one range, kept shared on purpose and declared in the changeset.
Before, the drag ran from 360 px to 60% of the window; now it runs from
380 to 900 px. On a 1920 px window the widest drag drops from 1152 to
900 px. On a 1024 px window a dragged or remembered width can now reach
900 px, where 60% of the window (614 px) capped it before. It still
never overflows: the card's classes cap it at the window less 1rem, so
no viewport clamp was added. A remembered width under 380 px is not
clamped up; it is no longer used, and the drawer opens at its host's
width.

**Docs.** The plugin-view guide's 「The Console's record drawer」 section
gives 460 and 380–900 px, the authored-width exception (the list reads
the view's `navigation`, then the object's; a record page's drawer its
root object's) and that the width belongs to the drawer's root. It says
the header has no Edit button or copy icon (both in `⋯`), and that a
child tab lists one row per record. The platform checklist's ~720 px
drawer reads ~460 px.

**Header (objectstack-ai#36149 items 2–4, objectstack-ai#36201).** The preview's host bar now says
`preview: true` (`RecordHeaderBar.preview`), and `page:header` draws
into it this way:
- The record's name comes first. At most ONE labelled action is drawn:
the page's primary (`previewPick`: the first authored `variant:
'primary'`, else the first authored action). The host's buttons (Edit)
and every other action go into the `⋯` in their usual bands and order.
- That one action also folds into the `⋯` while the name would be cut
below 16 characters' width (`PREVIEW_NAME_MIN_EM`, measured by
`previewNameSqueezed` in the width fold's layout effect). It is not
drawn back when the pane widens, except on a fresh measurement (another
record, a resize), which is how the existing width fold already works.
- No copy-id icon after the name. `RecordDetailView` adds
`sys_copy_record_id` (「复制记录 ID」, existing i18n keys) to the `⋯`, preview
only. The name's full text is its `title` tooltip.
- Unchanged: the host's edit state (Cancel / Save stay in the row), an
approval state's own levers (`RecordHeaderStateContext.group`, approve /
reject), the stage tag, and a page's own header (Edit button and copy
icon stay there).

**Child tabs (objectstack-ai#36149 item 6).** In a preview, a child list's tab (the
enlarged related list) hands the list grid the new host prop `cardFace`
(`ObjectGridComponentProps.cardFace`). The grid then draws the phone's
card rows at any window width: the title, one summary line and the
status chip, one row per record. Before, it drew a table cut off at the
pane's edge. 「添加」 stays top-right in the tab's toolbar. A related list
outside a preview, and every non-tab related list, is unchanged.

**Already true on `main`, verified live, not rebuilt.** Item 7: clicking
a child record replaces the preview's content (one drawer, no stacked
preview). The leading area shows the back control and 「客户 Initech › 活动」,
and back returns to the parent with the 活动 tab still selected. Item 8:
header row 1 is unchanged. objectstack-ai#36147 (click a value to edit, PR objectstack-ai#36234) is
untouched.

## Tests

- `page-header-record-bar-35593`: new describe for the preview bar. One
labelled action and the rest in `⋯` in order (also with `maxVisible:
3`); no actions means only `⋯`; edit state keeps Cancel / Save; no copy
icon and the name has a tooltip; the name squeezed (120 of 300 px) folds
the primary. CONTROLS: a name with room keeps the action; a page bar
keeps its copy icon and never folds for the name; approval levers 通过 /
拒绝 are drawn in the preview.
- `RecordDetailView.drawerLevelEdit-33111`: the list's preview and a
record page's drawer level have no Edit button or copy icon. Their `⋯`
has Edit and Copy record ID, and copy writes the id. CONTROL: the record
page's own header keeps the Edit button and copy icon, with no copy menu
entry. Existing drawer Edit tests go through the `⋯`.
- `cardFaceHost-36149` (plugin-grid): `cardFace` at 1440 px draws card
rows (title + 「Renewal · Monday」 summary, no column headers). CONTROLS:
1440 px without it keeps the table; 390 px keeps cards.
- `RelatedList.previewCardFace-36149` (plugin-detail): a preview bar
hands the grid `cardFace`. CONTROLS: none for a page bar, none for no
bar, none for a non-tab list in a preview.
- Width: `navigation-overlay-drawer-27545`, `navigation-overlay-9299`
(380–900 clamp), `consoleSidebarRail.width-27593` (460 and the list
keeps its minimum).
- `recordPreviewWidth-36149` (app-shell): a width dragged in object A's
list preview is the width object B's list preview opens at, and the
width a record page's drawer opens object B at. CONTROLS: an object
authoring `navigation.width` opens at 720 px with 600 px in the shared
key, and a drag in its own pane writes its per-object key, not the
shared one. A list preview whose view authors `size: 'xl'` ignores the
shared width. `recordPreviewWidthKey` returns the shared key for none,
`{}` or `size: 'auto'`, and the per-object key for `size: 'xl'` or a
`width`. One mounted record-page drawer: a task at the shared 600,
closed, then a contract opens at its authored 720; the reverse, a
contract at its own dragged 500, closed, then a task opens at 460. A
record page's drawer level opens an object authoring `size: 'xl'` at
`recordPaneWidth`'s xl width. `recordPaneWidth` unit cases (none /
`auto` → 460, `'50%'` as written, a `width` beats a `size`, xl differs
from 460).
- `ObjectView.recordOpenPath-35854` (app-shell, the list host's wiring):
with 600 in the shared key, a view authoring `size: 'xl'` opens its
preview at its xl width, not 600 px. CONTROL: a view authoring no width
opens at 600 px.

<details><summary>Runs (ui vitest, verify lock)</summary>

- 169 test files across components + app-shell drawer/header suites on
`01f2ad0a0a` + the test fix: `Test Files 169 passed (169)`, `Tests 1701
passed (1701)`, lock `VERDICT command-exit 0`.
- 8 files (new grid/detail tests, related tab suites 28484 / 28865 /
35892, grid card suites 13150 / 35883, rail 27593) on `ae96065452`:
`Test Files 8 passed (8)`, `Tests 64 passed (64)`, `VERDICT command-exit
0`.
- Final head `ee38012ece` (after merging `origin/main` `ff60149900`):
all 55 `RelatedList.*` suites, the four grid card suites, the header,
overlay, drawer-level and rail suites, 64 files: `Test Files 64 passed
(64)`, `Tests 445 passed (445)`, `VERDICT command-exit 0`.
- Type-check on `ee38012ece`, after building the
`@object-ui/app-shell^...` closure: `type-check` exit 0 for
`@object-ui/components`, `@object-ui/plugin-grid`,
`@object-ui/plugin-detail` and `@object-ui/app-shell`.
- Head `d8900963e3` (merged `origin/main` with objectstack-ai#36406, plus this
rework), after building the `@object-ui/app-shell^...` closure: 96 files
(all 55 `RelatedList.*` suites, the grid card suites, header, overlay,
drawer-level, rail, `recordPreviewWidth-36149`,
`recordDrawerStack-26679` and 30 `ObjectView.*` suites): `Test Files 96
passed (96)`, `Tests 693 passed (693)`, `VERDICT command-exit 0`.
Type-check of components, plugin-grid, plugin-detail and app-shell in
one `&&` chain: `VERDICT command-exit 0`.
- Head `192a0febef` (the L1-d wording plus the S2 reset, S4 size bucket
and N1 pin), after building the `@object-ui/app-shell^...` closure: 13
files (`recordPreviewWidth-36149`, `ObjectView.recordOpenPath-35854`,
all six `navigation-overlay-*` suites, the three `recordDrawerStack*`
suites, `RecordDetailView.drawerLevelEdit-33111`, rail 27593): `Test
Files 13 passed (13)`, `Tests 117 passed (117)`, `VERDICT command-exit
0`. Type-check of components and app-shell in one `&&` chain: `VERDICT
command-exit 0`.
- Ablation (one-off, not kept), the S2 reset: the two `setWidth(null)`
resets it added on the paths a close and a reopen take (the no-key
branch and the key-holds-nothing branch) removed together, the pre-fix
shape (blob 671df74 → 5378b1f6, then the second anchor x1 → x0).
Result: `recordPreviewWidth-36149` failed 2 of 9, the forward and
reverse one-mounted-drawer cases. Restored: blob == HEAD, `git diff
HEAD` empty. Removing either line alone keeps them green: a close sends
the key through absent and the next open through a key holding nothing,
so each line covers the other in that sequence. A record opened while
the drawer is open is a child level on the same root, so the root key
never switches straight from one stored key to another.
- Ablation (one-off, not kept), the list host's wiring:
`widthKey={drawerWidthKey}` deleted from `ObjectView` (anchor x1 → x0,
blob 3852259 → be850715). Result: `ObjectView.recordOpenPath-35854`
failed 1 of 11, the `size: xl` view case. Restored: blob == HEAD, `git
diff HEAD` empty.
- Ablation (one-off, not kept): `storageKey={widthKey}` in
`ObjectViewRecordOverlay` switched back to the per-object
`drawer-width:` + the object's name through
`scripts/ablation-replace.mjs` (anchor x1 → x0, blob 1b4b33a →
2d6bbd9d). Result: `recordPreviewWidth-36149` failed 2 of 5, the A-to-B
list preview case and the list-to-record-page case. Restored: blob ==
HEAD, `git diff HEAD` empty.
- Ablation (one-off, not kept): `const useCardView = windowCardView ||
!!hostCardFace` mutated to drop `hostCardFace` through
`scripts/ablation-replace.mjs` (anchor x1 → x0, blob f3d0c84 →
55c538e5). Result: `cardFaceHost-36149` 「a desktop window with cardFace」
failed (1 failed | 2 passed). Restored: blob == HEAD, `git diff HEAD`
empty.

</details>

## Acceptance notes

- **Item 5, tabs: the ruled behaviour, shipped as-is.** The preview's
tabs are the same set as the full page (详情, one per child list with its
count, 动态) and never wrap. When they overflow, they fold into 「更多 N」,
the dropdown that objectstack-ai#35595 ruled for every face of the tab row, the side
preview included. So the card's "horizontal swipe" wording is answered
by that standing ruling, not deviated from. The seat confirmed this
reading; no swipe is built.
- **Item 7, wording of the back entry.** The card shows 「‹ 父记录名」. `main`
draws `←` plus 「客户 Initech › 活动」 (the trail ruled under objectstack-ai#26679). It does
the job (one preview, back to the parent, tab kept), so I left it
unchanged.
- **objectstack-ai#36201 「not restored when wider」.** The fold is decided per
measurement. Widening the pane re-measures (the width fold's
`ResizeObserver` clears the cap), so a wider pane can draw the primary
again if the name then fits. Never more than one labelled action in a
preview.
- **objectstack-ai#36201 screenshots: app-todo stands in for HotCRM.** The card asks
for the HotCRM lead 「Mira Costa - Atlas Construction」. HotCRM cannot run
in this container: its checkout has no installed dependencies, and
installing into that shared checkout is outside this card. The app-todo
task (5 `record_header` actions) proves the same three points. The full
name is readable (「Schedule dentist appointment」 is cut to 「Schedule
den...」 before and whole after). At most one labelled action is drawn
(Clone Task, for a short name). The rest are in `⋯`.
- **objectstack-ai#36201's 「a record with no custom actions has the same header as
today」 is superseded by objectstack-ai#36149.** Edit and the copy icon left the
preview header, so such a record's preview header is the name, the stage
and `⋯`. This follows from folding the two cards into one PR, not from
an omission. The full page's header is unchanged.
- Comment icon: objectstack-ai#36406 removed it from the preview; it has merged and
this branch carries it.
- Out of scope: the spec `navigation.size` describe still says `auto`
derives the width from the field count and the viewport, which has not
been true since objectstack-ai#27545. Filed as objectstack-ai#36468.

## Verification

Live: `objectstack dev --seed-admin --fresh` (app-crm, app-todo) +
Console vite, Chromium 1440×900 @2x, zh-CN. "Before" = this branch's
touched sources restored to `97b9d1e63d` in the working tree, then
restored to HEAD (`git diff HEAD` empty).

Header, CRM opportunity: before 720 wide, copy icon, 「编辑」 / after 460,
name + stage + `⋯`

![before
header](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/1-before-header.png?raw=true)
![after
header](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/1-after-header.png?raw=true)

Several actions (app-todo task, 5 `record_header` actions): before, the
name is cut to 「Schedule den...」 behind Clone Task / Mark Complete / 编辑.
After, the full name with every action in `⋯`. With a short name, one
labelled action (Clone Task). The `⋯` holds the actions, then 编辑, 复制记录
ID, 删除.

![before many
actions](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/2-before-many-actions.png?raw=true)
![after long
name](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/2-after-many-actions-long-name.png?raw=true)
![after short
name](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/2-after-many-actions-short-name.png?raw=true)
![after more
menu](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/2-after-more-menu.png?raw=true)

Child tab (account Initech → 活动 2): before a cut-off table / after one
row per record. Then a child opened in the same preview, and back with
the tab kept.

![before child
tab](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/3-before-child-tab.png?raw=true)
![after child
tab](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/3-after-child-tab.png?raw=true)
![child in same
preview](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/4-after-child-opened-in-same-preview.png?raw=true)
![back to
parent](https://github.com/objectstack-ai/objectstack/blob/560b99324842b611d97822137d5b4ff588435ad7/issue-36149/4-after-back-to-parent.png?raw=true)

Read first (by risk): `PageHeaderActions` (the `previewRow` /
`previewPick` / `hostKeepsRow` split and the width-fold effect),
`useDrawerResize`'s restore effect in `navigation-overlay` (the
key-switch reset touches every resizable drawer), `RelatedList`'s
`previewFace` → `enlargedGridHost`.

Two-minute check: open any list, click a row. The preview is 460 wide,
has no 「编辑」 button and no copy icon, and 「更多」 holds 「编辑」 and 「复制记录 ID」.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA

<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jRaJbQ4vqdv4J5peqA -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

右侧预览里去掉评论按钮和评论面板:评论只在记录整页里(Attio 的预览也没有评论)

2 participants