Repository navigation
feat(record-page): on a wide full page the details are pinned left beside the record's tabs; the right summary rail is retired (#35890) - #36136
Conversation
Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
…ad of the retired rail Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
…anel) Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T20:56Z. The brief handed to the isolated declaration-face reviewer for PR #36136 (owed by its Contract review brief — PR #36136 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP 维护者速读代码按你 14:24 的裁决做的:只要放得下「左栏 320 + 右边 400」,字段就钉在左边,空间紧时左栏自动从 400 缩到 320。右侧摘要栏去掉了,第一个页签改名「详情」,「审批中 · 当前步骤」也加上了。我读的部分没有发现问题。 席位核对 — REWORK (L1-c, evidence) · repo:objectstack#1 · head
|
…anel PR 2) Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Read: card #35890 (body and all four comments: triage 7046638302, claim 7063852989, maintainer ruling 7064066204, reminder 7065828359), epic #35590 (body), the PR body and file list (41 files, +1198 / -2269), the net diff ① Derived judgmentsPublic surface, package by package (published:
Behaviour against the card and ruling (read, not reviewed beyond the contract): pins only on a full page, with another tab, and without a body table (#35889). The left column is 400, narrows to 320 and is draggable with a separator (role, orientation, value attributes, arrow keys, Home, End). The first tab is 「详情」. Narrowing out writes the implied tab with ② Semver level
③ Boundary flags
Nits (no effect on correctness or the contract):
Implemented-by: VERDICT: FAIL |
…the rail's i18n keys stay published (#35890) L2 M2: `requested` accepts ids in the reader's hidden lists, with a test that fails without the fix. L2 M1: every key the retired rail read stays in all 11 packs, unread. Changeset names the i18n widening and the deprecation of recordPageTierHasRightColumn. e2e spec renamed to record-tabs-35595.spec.ts. pages.mdx: the 动态 paragraph says where comments live on desktop and phone. Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUZTwDqtEFzNFCVTri Browser evidence for the L1-c and L2 deltas (console against the CRM example, account Globex Ltd: 活动 1, 联系人 1, 线索, 商机 4, 动态; zh-CN, light; numbers from The page frame is
No case draws a 1440 with the nav open and the panel open does not pin. The content is 708, under the ruled 744 (320 + 24 + 400), so the page uses the tab row and keeps the list that was shown: the address became Drawer and phone. Neither pins, and both keep their one-column tab row. Two things reach them: the rail is gone there too, and the first tab reads 「详情」. The same push carries:
Generated by Claude Code |
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTfxZyB5T41DdoPaBy
… page's record:chatter on the 动态 tab lists the system history alone while the comment panel holds the comments The rail card change goes with RecordSummaryRail.tsx. The author's record:chatter / record:discussion block, now drawn on the 动态 tab, drops comments and replies, the composer and the Comments-only filter, counts without the comments and is headed 动态, while RecordCommentsInPanelContext is on and the page is the default or slotted one. The platform's own stream, the tab label, an authored page and the phone without a comment surface are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXV5qLuX94Bn6aqb4y
…objectstack-ai#36129) repo:objectstack#1 · os-sales · session_01L6bhgTKEPqtmiK9SGpHsmW Fixes objectstack-ai#35892 ## What changes On a record page, a related list opened as its own tab (and the same list in the record drawer) now works like the child object's list page: - **Head row.** The child list's tile and title on the left, **+ Add** on the right. The **Open in list** (↗) button is gone. - **Condition row.** The list page's own Sort (several levels) and Filter: `@object-ui/plugin-list` exports it as `ListConditionsBlock`, and because `plugin-detail` sits below `plugin-list`, the record page hands it to the tab through a new slot, `RelatedListConditionsSlotContext` (`@object-ui/plugin-detail`), the way `RecordBodyTableEditorSlotContext` hands in the edit-state editor. It is a host element, not a registered node type, so the registered-types ratchet (every registered type is authorable) is untouched. No view switch, view settings or search. Its labels fold to icons by the row's own width (narrow tab, drawer, phone); no horizontal page scroll. - **Grid.** The list page's grid host keys: column menu, select-first cells with the list page's cell editing wherever the reader may edit the child object (`listInlineEdit` affordance), row selection with the floating bulk bar, and the footer row. Bulk delete is offered where the host hands a row delete and the child object's `relatedRowDelete` row of the affordance map allows it (the write census names the new site). It asks once, counting the rows, then sends the selection (up to every matching row) to the data source's `bulkDelete` in one call; only a data source without one falls back to the row delete the list was handed, all rows settled together, as the list page settles them. The tab then shows how many rows were deleted and how many failed, in the list page's own words (`objectActions.bulkDeleteSuccess` / `bulkDeletePartial`). Footer calculations run over every matching row (`findParams`), not the loaded ones. A status-grouped tab draws no footer row. - **Loading.** Rows load as the reader scrolls (a growing window of 50, sentinel 320px ahead) instead of a pager. - **Counts.** The tab title keeps counting every child; a filter never changes it. The footer counts the rows the filter keeps. A filter that matches nothing says so and keeps the condition row. - **What lasts.** Sort, filter and footer picks last while the reader stays on the record: across its tabs and between its page and drawer. They are keyed by the reader as well as the record (as the list page's draft is keyed by its reader), so another account signed in on the same tab starts from the default. A reload or another record clears them; a drawer opened over another record counts as another record, so the tab behind it starts from the default again, which is the ruling's "another record". **Discard** appears once something changed and puts the tab back; there is no Save. The list page's Discard and this one are one component, `ConditionDiscardButton` (`app-shell`'s `ListDraftActions` now draws it; same look and behaviour as objectstack-ai#36026). - A header sort pick joins an existing multi-level sort by the list page's rule, now shared as `withHeaderSortPick` (`@object-ui/core`). - The record page (`app-shell` `RecordDetailView`, which the drawer draws too) fills the slot with the block, lazy-loaded with the first tab that draws it. Supersedes the remembered related-tab sort of objectstack-ai#35601 (取代 objectstack-ai#35601 的记住排序), on ruling objectstack-ai#35892 (comment) (session-only). Column widths and order for the related tab move to the reader's browser, as the list page keeps them, on ruling objectstack-ai#35892 (comment): `RelatedList` no longer reads or writes them in `sys_user_preference`; the `RelatedListPreference` type stays (no narrowing). Keeping widths after sign-out is objectstack-ai#36110, not this PR. **Upgrade note** (also in the changeset): the header sort and the column widths and order an earlier version remembered for a related tab no longer apply (子表页签里以前记住的排序不再生效). The tab opens in its declared order and its widths start from the default once. Nothing stored is deleted. The default sort and columns of every related list are unchanged. ## Why objectstack-ai#35892 (epic objectstack-ai#35590): the related tab was a reduced list with a pager and an exit to the list page; the reader had to leave the record to sort, filter or total the children. ## Verification Evidence: `/mnt/project-files/build-seat1/35892/` (index `README.md`, shots in `shots/`), from `examples/app-crm` with this branch's console build, Acme Corp → Opportunities (70 children). Light and dark at 1440, 720, 375, plus the record pane opened from the list (app-crm has no drawer navigation). Measured in the real console: - Sort + filter chips, Discard after a change and gone after Discard; kept after another tab and back; cleared by reload. - Tab title 70 while the footer says 14 records under a filter. - Scroll loads 50 → 70. - Footer Sum 3,349,000.00 equals the API total over all 70 rows. - 375: labels fold to icons, no horizontal page scroll. **objectstack-ai#36023 leftover 2 (三项实测, in the tab at 1440):** 1. Enter while editing Deal Value (9000 → 9100): `PATCH crm_opportunity {"amount":9100}`, toast "1 row saved", the selection stays on the same cell. 2. Tab while editing (9100 → 9000): `PATCH {"amount":9000}`, the selection moves one cell right. 3. Enter on Expected Close: the calendar opens directly under the cell (cell bottom 345px, popover top 347px, same left edge) with Today / Tomorrow / Next week / Clear; picking the 15th sends `PATCH {"close_date":"2026-12-15"}`, the cell reads "Dec 15" and the calendar closes. The edited record was restored afterwards. Tests: - New: `RelatedList.tab-35892.test.tsx` (13, including a host that supplies no condition row, the batch delete in one call, a partial failure on both paths, and a second reader starting from the default), `relatedTabConditions-35892.test.ts` (5), `ListConditionsBlock-35892.test.tsx` (5). - Rewritten: `RelatedList.enlargedListGrid-28865.test.tsx` (growing window, scroll load, footer, column widths no longer stored server-side), `RelatedList.enlargedToolbar-27524.test.tsx` (no ↗, header sort not written, remembered sort not read). - `vitest run packages/plugin-detail`: 398 files / 3664 tests passed. plugin-list, i18n, app-shell views, core: see the checks. - Builds of `@object-ui/plugin-list`, `plugin-detail`, `app-shell`, console: pass. ESLint on the changed files: 0 errors. Eager ui-components budget unchanged in kind (339.5 / 346.7 KB). Overlap (`scripts/pm/overlap-check.mjs` at 5b76d7a): merges cleanly with `origin/main` (main merged in at 5bad102, which also took objectstack-ai#36096: the `@object-ui/core` import line of `ui/packages/plugin-list/src/ListView.tsx` keeps both `isObjectExportOffered` and `withHeaderSortPick`) and with objectstack-ai#36131, objectstack-ai#36128, objectstack-ai#36123, objectstack-ai#36114. With objectstack-ai#36136 one line conflicts: the `@object-ui/plugin-detail` import line of `ui/packages/app-shell/src/views/RecordDetailView.tsx`, where this PR adds `RelatedListConditionsSlotContext` (plus the `./relatedListConditions.js` import) and objectstack-ai#36136 adds `stepDisplayText` to the `./RecordApprovalsPanel.js` import. Whichever lands second keeps both. Clause-②: yes Metadata-protocol: none Clause-② is a widening: new exports `ListConditionsBlock` and `ListConditionsHostProps` (`@object-ui/plugin-list`), the slot `RelatedListConditionsSlotContext` and `RelatedListConditionsProps` (`@object-ui/plugin-detail`), new exports `ConditionDiscardButton` and its type `ConditionDiscardButtonProps` (`@object-ui/plugin-list`) and `withHeaderSortPick` (`@object-ui/core`), new i18n keys in every locale pack (`listConditions.chips.discard`, `listConditions.chips.discardHint`, `detail.relatedNoMatches`, `detail.deleteRowsTitle`, and the count family `detail.deleteRowsConfirmation` with the plural slots each pack needs); nothing removed or renamed. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [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: its generated artifacts are regenerated and committed. (not touched) - [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. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgTKEPqtmiK9SGpHsmW <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgTKEPqtmiK9SGpHsmW --> --------- Co-authored-by: Claude <noreply@anthropic.com>
… page only; a phone and the side drawer draw the standard page (objectstack-ai#36150) (objectstack-ai#36174) <!-- 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 objectstack-ai#36150 Clause-②: no Metadata-protocol: semantic Skills-docs: follow-up objectstack-ai#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 → objectstack-ai#36180 (schema face); `skills/objectstack-ui/rules/record-page.md` rules 4 and 5 and the `record_more` advice → objectstack-ai#36179 (domain:skills). - **Changeset**: `@object-ui/app-shell` minor, both declaration lines. ## Why Card objectstack-ai#36150 (child of epic objectstack-ai#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 objectstack-ai#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 objectstack-ai#35897 (ruled) | | `sys_organization` | three related tabs with set columns | the three stay; the other lookups to the organization also become tabs until objectstack-ai#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. - **objectstack-ai#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 (objectstack-ai#36136, objectstack-ai#36129, objectstack-ai#36114, objectstack-ai#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>
…reads and counts the unresolved ones; ✓ and Edit on others' comments appear only where the server admits them (objectstack-ai#36075) (objectstack-ai#36178) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuKfHUa83V2ZjrX6UrED642U)_ repo:objectstack#1 · os-sales · session_01L6bhgT8AtWDue4oTFNAE6H Fixes objectstack-ai#36075 Clause-②: yes (widening): `@object-ui/react`'s `DiscussionContextValue` adds three optional members, `onResolveComment(itemId, resolved)`, `moderatesComments` and `updatesOthersComments`. `@object-ui/types`' `FeedItem` adds five optional members: `resolved`, `resolvedById`, `resolvedByName`, `resolvedAt`, `mentionsViewer`. `@object-ui/plugin-detail` adds exports `useRecordVerdict` (three-state; a definite allow is `allowed` with `record.visible`; `useRecordEditable` reads as before except that `allowed: false` beside a visible record now reads not editable), `threadResolvable`, `threadResolved`, `threadInvolvesViewer`, `filterCommentThreads`, `unresolvedThreadCount`, `DEFAULT_COMMENT_THREAD_FILTER` and the type `CommentThreadFilter`; `RecordCommentsData` adds `resolvable`, `onResolveComment`, `moderates` and `updatesOthers`, and its `count` is now the unresolved threads; `CommentItemActions` adds `onResolve` and `resolved`; `CommentHoverActionsProps` adds `resolved`; `RecordCommentThreadProps['comments']` may carry `onResolveComment`, `moderates` and `updatesOthers`. `@object-ui/i18n` adds ten `detail.*` keys to every pack. Nothing existing is removed or re-typed. Metadata-protocol: none ## 维护者速读 - 评论栏里,每串评论的第一条在鼠标移上去时多了一个对勾。点一下这一串就标成「已解决」,从列表里消失,头部评论图标上的数字减一。再点一次可以恢复成未解决。 - 谁能点对勾:自己发起的串,谁都能点。别人发起的串,只在服务器会接受时才显示对勾。现在只有管理员能点别人发起的串。原因是平台有一条底线规则:普通成员只能改自己创建的行,评论也算,而且这条规则在评论自己的规则之前执行。实测在开发环境里,普通成员标别人的串返回 403,标自己的返回 200。你 13:25Z 的裁定 A(能看记录的人都能标)要等后端单独一个 PR 才能真正生效,这个 PR 不改服务端。 - 评论栏右上角多了一个筛选按钮,里面两个勾选:「显示已解决」打开后,已解决的串也显示出来,上面一行灰字「已由 某某 解决」,再点它的对勾就恢复。「只看我参与的」只留我发起的、我回复过的、提到我的串。筛选不记在浏览器里。全部都已解决时,评论栏说「没有未解决的评论」,并给一个「显示全部评论」的按钮。 - 往已解决的串里再回复,这一串自动变回未解决。图标上的数字现在是未解决的串数。 - 「更多」里的编辑和删除: - 自己的评论照旧(普通成员默认只有编辑:平台默认不给成员删评论的权限,这是另一张决定卡)。 - 别人的评论:删除给能编辑这条记录、并且有评论删除权限的人。编辑还要服务器同意改别人写的行,现在也只有管理员。 - 判断都问服务器,只有明确说「可以」才显示,没回来或出错就不显示。所以普通成员不会看到点了会被拒的按钮。 - 服务端权限一行没改。老部署(评论表里没有「已解决」这一列)不显示对勾和筛选,数字数全部串,和以前一样。手写的记录页和手机端不变。 ## What changes **Resolved threads** (`@object-ui/plugin-detail` `src/comments/`, the backend is objectstack-ai#36071 / objectstack-ai#36104) - `commentThreads.ts`: `threadResolvable` (a real top-level comment, and the host set `resolved`: a reply whose parent is gone cannot be resolved, the server refuses it), `threadResolved`, `threadInvolvesViewer` (the viewer started the thread, replied in it, or is mentioned in it: objectstack-ai#36071's `threadsInvolvingUser` rule, read off the host's viewer-relative marks), `filterCommentThreads` with `DEFAULT_COMMENT_THREAD_FILTER` (`showResolved: false`, `onlyMine: false`), `unresolvedThreadCount`. - `useRecordComments`: `count` is the unresolved threads; `resolvable` says some thread here can be resolved; hands `onResolveComment` and `moderates` on from the context. - `CommentThread`: ✓ on the thread's first comment only (`onResolve`, reading 「恢复」 and pressed when resolved), on a thread the viewer started, and on anyone's only with `updatesOthers` (see the row floor below). A resolved thread carries `data-comment-thread-resolved` and a 「已由 X 解决」 line (`data-comment-resolved-mark`) above its first comment, the comment muted while collapsed. The resolver's name is the host's (`resolvedByName`), else the entry in a mention list the composer already loaded (never read for this), else plain 「已解决」. A refused resolve is swallowed here (the host has said so). - `CommentsPanel`: the filter menu (`ListFilter`, left of ✕) with two checkbox items, offered only while `resolvable`; held in state while the panel is open, never stored. With every thread filtered out it says 「没有未解决的评论」 (or 「没有你参与的评论」) and offers 「显示全部评论」. - `CommentHoverActions`: `resolved` turns the ✓ into the reopen control (`aria-pressed`). Its test hook changes value with it: `data-comment-action="resolve"` on an open thread, `"reopen"` on a resolved one. The panel's other new hooks are `data-comments-filter`, `data-comments-filter-option="show-resolved" | "only-mine"`, `data-comments-empty="filtered"` and `data-comment-thread-resolved`; they are test hooks and carry no contract. **Edit and Delete on other people's comments** (card item 6) - The comment hook (`plugin-audit` `comment-access-hooks.ts`, "Parent EDIT") lets a comment's author, or a caller whose by-id update of the parent record the explain engine admits, edit or delete a comment. The page asks the same question: `useRecordVerdict(object, id, 'update')`, a three-state reading of the verdict `useRecordEditable` fails open on (same cache, same in-flight sharing, same staling; `useRecordEditable` is now `useRecordVerdict(...) ?? true`). A definite allow is `allowed === true` together with `record.visible === true`, as the server admits a by-id write (L2 S3); an answer with `allowed: false` beside a visible record (an on-behalf-of session whose delegator is gone) now reads not editable for `useRecordEditable` too, which is the server's answer. `moderatesComments` is `true` only on a definite allow, and is asked once the panel is open, so a record whose object sets `userActions.edit: false` still sends no explain on open (objectstack-ai#13045). The page's own edit gates (approval lock, `userActions.edit`, predicates) are not the server's comment rule and do not join. - `CommentThread` offers Delete on a comment that is the viewer's own or, with `moderates`, anyone's; Edit on the viewer's own or, with `moderates` AND `updatesOthers`, anyone's; still only where the host hands `onEditComment` / `onDeleteComment` (the `sys_comment` grants). **The row floor (measured; the interim this PR ships)** - The platform's wildcard floor `owner_only_writes` (`default-permission-sets.ts`, `update`, `positions: ['org_member']`, `created_by == current_user.id`) runs before the comment hook. `sys_comment` widens it for `delete` only (`sys_comment_moderation`); `update` is left under the floor on purpose. So the hook's resolve rule (objectstack-ai#36104, ruling 7063285032) and its parent-editor rule are never reached for a rank-and-file member on someone else's row. - Readings on the CRM example with the security service on (one org, two `org_member` members; scripts and JSON in the evidence folder `floor/`): - a member who reads the record PATCHes `{ is_resolved: true }` on the admin's thread: **403** `PERMISSION_DENIED`; on another member's thread: **403**; on their own: **200**; - a member who may edit the record PATCHes `{ body }` on another member's comment: **403**; - explain `sys_comment` `update` by id answers `record.visible: false` for a member on another person's comment, `true` on their own and for the admin. - The interim: `RecordDetailView` asks ONE explain, `update` of the first top-level comment the viewer did not write (`updatesOthersComments`), when the reader first reaches into the open panel (pointer or focus), so opening the record and opening the panel still read nothing more (objectstack-ai#28470). The floor answers the same for every such row. ✓ and Edit on others' rows need its definite allow; pending, a refusal, an error, no explain service and a stale answer offer them on the viewer's own rows alone. Delete keeps its own gates (`feedCommentDelete` and `moderatesComments`), which the floor's delete widening already matches. - Not here: making ruling 7063285032 true for members is a server change (a resolve-only path past the floor), a separate backend PR after Sales answers the decision on editing others' comments. Delete was verified with a principal holding the `sys_comment` delete bit (the admin); `member_default` grants members none, so a member's More holds Edit only (a second decision card). **The record page** (`@object-ui/app-shell` `RecordDetailView`) - The comment read already returns every column (no select, on both the record-page payload and the fallback `find`), so the rows' `is_resolved`, `resolved_by`, `resolved_at` map onto the feed item (`commentResolutionOf`), only where the row carries `is_resolved`. The resolver is named from the viewer or an author of the same discussion; any other resolver is named by ONE `sys_user` read of exactly those ids (`$filter: { id: { $in } }`, `$select: ['id', 'name']`), sent after the discussion is drawn and never twice for an id (L2 S2: the record-page payload has no expand for it, and the 50-user mention roster missed resolvers past it). A refused read leaves 「已解决」. `mentionsViewer` comes from the row's stored `mentions` (`rowMentionsUser`: a JSON id list, ids or `{ id }` objects). - `handleResolveComment`: `dataSource.update('sys_comment', id, { is_resolved })` and nothing else (the one update ruling 7063285032 admits for any reader), offered under the `sys_comment` update grant; the row changes from the stored record the server answers with, a refusal toasts `detail.commentResolveFailed` and changes nothing. - A reply into a resolved thread shows its first comment reopened (`threadRootIdOf`), as the platform stores it; a new comment is unresolved where the deployment stores resolution. - The icon's count is `unresolvedThreadCount` over the rows the page already holds from its one open request (objectstack-ai#28470), not objectstack-ai#36104's `COUNT` read: that would be a second request for an answer already on the page. **Strings**: `detail.reopenThread`, `threadResolved`, `threadResolvedBy`, `filterComments`, `showResolvedComments`, `commentsInvolvingMe`, `noUnresolvedComments`, `noCommentsInvolvingMe`, `showAllComments`, `commentResolveFailed` in all eleven packs (zh-Hant regenerated) and the provider-less defaults. **Docs**: the plugin-detail README and `content/docs/frontend/plugins/plugin-detail.mdx` describe resolved threads, the filter, the count, and Edit / Delete for record editors. ## Why Card objectstack-ai#36075 items 3, 6, 7 and 8, owed by this second PR after objectstack-ai#36114 (the panel, `Part of objectstack-ai#36075`) and objectstack-ai#36104 (the resolved backend, objectstack-ai#36071) merged: resolve and reopen a thread, the 「显示已解决」 / 「只看我参与的」 filter, the icon counting unresolved threads, and Edit / Delete 「只对自己的评论,或有权限的人」. ## Side effects reviewers should know - No server change and no permission change. Resolving rides the backend objectstack-ai#36104 shipped, and moderating uses the server's existing parent-editor rule, each offered only where the server's row floor admits it today (above). - A deployment without the explain service shows ✓ and Edit on the viewer's own rows only, administrators included. - The moderation verdict fails CLOSED where `useRecordEditable` fails open: a deployment whose explain engine does not answer (501, network) shows Edit / Delete on the viewer's own comments only, though its degraded server mode might admit more. A permitted moderator there loses an affordance, never sees a refused one. - The old `RecordActivityTimeline` (hand-written pages, the phone) is unchanged: own Edit / Delete only, no resolve. - Overlap: `overlap-check.mjs` against main and 5 open PRs that share a file: clean, except objectstack-ai#36136, which already conflicts with main on `RecordDetailView.tsx`'s `@object-ui/plugin-detail` import line; this PR adds its two names on a separate import so it adds nothing to that conflict. - Not in this PR: 「复制链接」 in the More menu (in the mock, not in the card's items), and reactor names on hover. ## Verification **New tests (all pass)** - `plugin-detail/src/comments/CommentsPanel.resolved-36075.test.tsx` (16): resolved threads hidden by default; ✓ on a top-level comment only; 「显示已解决」 with 「Resolved by Ada」 and the reopen control; 「只看我参与的」 keeps started / replied / mentioned; without `updatesOthersComments`, ✓ only on the viewer's own threads; the resolver named from a mention list already loaded, never read for it; all resolved → the note and 「Show all comments」; no ✓ and no filter where rows carry no `resolved`; no ✓ without the write; a moderator's Edit / Delete on another's comment; a moderator whose update of others' rows is refused gets Delete, not Edit; `updatesOthersComments` alone is not moderating; the CONTROL without moderation; none without the host's writes; the count is unresolved threads, and every thread with no resolution stored. - `plugin-detail/src/useRecordVerdict-36075.test.tsx` (6): true / false; `allowed: false` beside a visible record reads false, a visible record with no `allowed` reads `undefined`; `undefined`, never true, while pending, on non-OK, offline, and no record verdict; nothing asked when disabled; CONTROL `useRecordEditable` still fails open; one shared question. - `app-shell/src/views/RecordDetailView.commentsResolved-36075.test.tsx` (15), the real `RecordDetailView`: the icon counts 1 of 2 threads and the resolved one appears under 「显示已解决」 named; a resolver the page cannot name read by id, once, and named; no user read when every resolver is named; ✓ writes exactly `{ is_resolved: true }` on the top-level row, the thread leaves, the count goes; a refused ✓ toasts and changes nothing; reopen writes `{ is_resolved: false }` and the count returns; a reply into a resolved thread reopens it; another member's comment offers Edit / Delete on an explain allow, not on a refusal, not on an answer with no record verdict; ✓ on another member's thread beside a moderation refusal (N3); the row floor: ONE `sys_comment` explain, only once the reader reaches into the open panel; refused → no ✓ and no Edit on others' rows, Delete still, own rows unchanged; admitted → ✓ and Edit; no answer → own threads alone. - Reverse checks: with the moderation gate made fail-open (`!== false`), 「not offered on a guess」 fails; with the row-floor gate made fail-open, 「not on a guess: no answer offers ✓ on the viewer's own threads alone」 fails; with the old `record.visible`-only reading, the `allowed: false` case fails. - `RecordDetailView.recordOpenOneRequest-28470` pins that opening the panel reads nothing more; the probe waits for the reader to reach into the panel for that reason. **Local runs** (at `c268e113`, base main `6aacad95`): every `app-shell/src/views/RecordDetailView.*`, `recordDrawer*`, `recordCommentsPanel*` file and the whole `plugin-detail/src` (504 files, 4,517 tests): all pass but one at the first reading, `hiddenAffordanceVerdicts-13045` (the moderation verdict was asked on open where `userActions.edit: false` asks none); fixed by asking it once the panel opens, then that file and the comment files re-run green (7 files, 65 tests). `type-check` (src and tests) clean for types, react, plugin-detail and app-shell; ESLint on every changed file: 0 errors; `check:i18n-keys`, `check:i18n-drift`, `check:i18n-stale-fill`, `check:new-line-citations` pass; `check:i18n` / `check:i18n-coverage` answer exit 3 locally (they need a full `pnpm build`), CI reads them. **Local runs at the new head**: `plugin-detail/src` and every `app-shell/src/views/RecordDetailView.*`, `recordDrawer*`, `recordCommentsPanel*` file: 504 files, 4,509 passed; the one failure (`recordOpenOneRequest-28470`, the probe on panel open) is fixed by asking on engagement, and those files plus `plugin-detail/src/comments` re-ran green (104 files, 837 tests). `type-check` clean for react, plugin-detail and app-shell; ESLint 0 errors on the changed files. **Browser evidence** (seat-side folder `/mnt/project-files/build-seat1/36075/pr2/`): - the first set (`README.md`, light and dark: the panel, the filter, the count, 「已由 林晓 解决」, admin's Edit / Delete on a member's comment); - `floor/`: the row-floor readings above; - `interim/` (`README.md`, light and dark), on the CRM example with the security service on: - a reading member on another member's thread: Reply and emoji only; on their own: ✓, and More → 编辑; - a record-editing member on another member's thread: Reply and emoji only; - the admin: ✓, and More → 编辑 / 删除; - E1: a member resolves their own thread, count 2 → 1, after reload 1, 「已由 林晓 解决」, reopen → 2; - S2: 「已由 Dev Admin 解决」 from one `sys_user?filter=["id","in",[…]]&select=id,name&top=1` read. ## 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. - [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-5vdwwn`. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgT8AtWDue4oTFNAE6H)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgT8AtWDue4oTFNAE6H <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgT8AtWDue4oTFNAE6H --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…hreads first, replies inside, the box docked at the foot, a long press for actions (objectstack-ai#36076) (objectstack-ai#36208) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuLteuRKBSRXDK9REnG68QAD)_ repo:objectstack#1 · os-sales · session_01L6bhgTfxZyB5T41DdoPaBy Fixes objectstack-ai#36076 Clause-②: yes (widening) — `@object-ui/plugin-detail` exports `CommentsPage` and `CommentsPageProps`; `CommentThread` takes a third `mode` (`'page'`) and optional `itemInteraction`, `heldId` and `onHeldActions`; `CommentItem` an optional `interactionProps`; `CommentComposer` and `RichTextCommentInput` an optional `layout` (`'default' | 'phone'`). `@object-ui/app-shell` reserves the console URL parameter `comments` (`RECORD_COMMENTS_PARAM`, listed in `RESERVED_URL_PARAMS`). `@object-ui/i18n` gains four `detail.*` keys in every pack. Nothing is removed or re-typed; the desktop is unchanged. Metadata-protocol: none ## 维护者速读 - 手机上打开一条记录,右上角多了评论图标,旁边是未解决的评论串数。点了进**整页**评论,盖在记录页上;左上「‹ 记录名」或系统返回键回到记录页,记录页滚到哪还在哪(实测返回前后都是 74)。 - **两层**:列表只列第一层评论,有回复的下面是回复人头像加「N 条回复」;点一条进这一串,原评论在上,回复按时间往下,左上「‹ 评论」回列表。 - **输入框固定在屏幕底部**,键盘弹起时站在键盘上面。平时一行,点了展开,下面一排:提到人、加粗、斜体、列表、代码,右边发送。在列表里发的是新评论,在一串里发的是回复(两个框各留各的草稿)。页面上没有「Ctrl+Enter」字样。 - **长按一条评论**(或系统的长按菜单),从底部升起面板:第一行六个表情,下面「标记已解决」(只在第一层)、「编辑」「删除」(红色,点了先确认)。每一项出现的条件和电脑端悬停那排完全一样,手机没有另判权限。 - 列表右上角筛选:「显示已解决」「只看我参与的」,和电脑端同一个菜单。手机上「动态」页签只剩系统记录。 - **删除的门**:objectstack-ai#36186+objectstack-ai#36191 已合并并合入本分支。手机长按面板和电脑端用同一套判定:普通成员能删自己没有回复的评论,能给自己看得到的任何评论串标记已解决。 - 不改电脑端,不改任何权限和服务端。 ## What changes **The phone's comment page** (`@object-ui/plugin-detail`, `src/comments/`) - `CommentsPage`: a full-screen page (`role="dialog"`, fixed over the host) that reads `useRecordComments()`, the same discussion, writes and gates as the desktop panel. Props: `threadId` (`null` = the list), `onOpenThread`, `onBack`, `backLabel`, `onEngage`. - The list draws each thread with `CommentThread mode="summary"`; a tap on a comment outside its own controls, Enter on a focused comment, or its 「N 条回复」 opens the thread. A thread that is not held (deleted, stale link) shows the list. - The thread draws `CommentThread mode="page"` (new): its comment, then every reply, with no reply box of its own; 「回复」 there puts the caret in the docked box. - Two docked `CommentComposer layout="phone"` boxes (list and reply), each keeping its own draft; the list's stays mounted while a thread is open, so its draft and the list's scroll survive a visit to a thread. - The page follows the on-screen keyboard through `visualViewport` (top and height while the keyboard covers more than 80 px), the same reading as `PhoneListPanels`' sheet; the inline style is positional only. - Esc returns one level (`data-owns-escape`); the focus lands on 「‹」 when a level opens. - `useCommentPress`: 500 ms hold, cancelled past 10 px of travel; the click that ends a hold is swallowed. `onPressStart` fires at the press itself (pointer down, context menu, Enter/Space), and the page hands it `onEngage`, so the host's question about the comment's actions is on the wire before the hold completes. `contextmenu` opens the same sheet (Android's own long press, the keyboard's menu key, a right click). One record of the press serves every comment. - `CommentActionSheet` (vaul `Drawer`): six reactions (the viewer's own marked `aria-pressed`), then Mark resolved / Reopen, Edit, Delete (destructive). A row is drawn only where the comment's `CommentItemActions` hands its handler: these are the object `CommentThread.actionsOf` builds for the desktop's hover row, so every gate is the thread's. The sheet is never a snapshot of the press: `CommentThread` takes `heldId` and reports the held comment's current actions to `onHeldActions` each time what they offer changes, so a verdict that lands while the sheet is up adds its rows (L1-c REWORK 7070700220). A comment with no action raises nothing. - `CommentsFilterMenu`: the desktop panel's filter menu, extracted unchanged so both surfaces draw the same one. - `CommentItem.interactionProps`: spread on the comment's box with `select-none` and no iOS callout, except while it is being edited. - `RichTextCommentInput layout="phone"`: the editor first, then one row (mention, bold, italic, list, code; send at the right end, round, 44 px), no preview, the names without their shortcut (`detail.formatBold`, `detail.formatItalic`), 16 px text. A press on the row keeps the caret (and the keyboard) in the box. The default layout is untouched. **The record page** (`@object-ui/app-shell`) - `commentsPageOffered` in `RecordDetailView`: the same rule as `commentsPanelOffered` (feeds on, a standard page, a record id) on a phone and not embedded. `commentsSurfaceOffered` (either one) now drives what `commentsPanelOffered` drove: the discussion rides the open's payload, the 动态 stream gives the comments up (`RecordCommentsInPanelContext`) and its count leaves them out. - `?comments=` (list) / `?comments=<id>` (thread), read from the router: opening and a thread push an entry flagged `__commentsPushed` in history state (the entry's other state kept); 「‹」 pops a flagged entry and otherwise replaces the URL one level up (a reload or a shared link). The page is mounted inside the record's `DiscussionContextProvider`, over the record, which stays mounted, so nothing is read again and the scroll is kept. Closing returns the focus to the top bar's comments icon. - The phone's `RecordTopBar` gets the `comments` slot (`CommentsButton` at 44 px). - The explain probes: `moderatesComments` is asked while the panel or the page is open; `updatesOthersComments` on the first press on a comment (the page's `onEngage`, fired at pointer down), as on the desktop's first reach into the panel. Opening the record asks nothing more. **Strings**: `detail.addReactionEmoji`, `detail.commentThread`, `detail.formatBold`, `detail.formatItalic` in all eleven packs (zh-Hant regenerated) and the provider-less defaults; the rest reuse existing keys (`detail.sendComment` already existed). **Docs**: `content/docs/frontend/plugins/plugin-detail.mdx` (### On a phone) and the plugin-detail README (### The phone's comment page). **Pending release notes**: `.changeset/36075-record-comments-panel.md` (from objectstack-ai#36114) is left as it stands on main. Its line "the phone keeps the comments in its 动态 tab" is answered in this PR's own changeset, which says that on a phone the comments live on the phone's page and that this replaces that line. `36075-comments-resolved.md` ("…and the phone keep their feed as before") is left as it stands too; the same sentence of this PR's changeset answers it. ## Small calls made here (dev-thread rule, Sales 22:19:27Z) 1. The full page is a URL parameter over the record route, not a new route: the record stays mounted (no re-read, scroll kept), precedent `?related=`. 2. No 「回复」 row in the long-press sheet: in a thread the docked box is the reply; in the list a tap opens the thread. 3. No 「预览」 on the phone toolbar; the card's row lists mention, bold, italic, list, code and send. 4. The filter is the desktop's dropdown, not a bottom sheet. 5. A long press on a comment with no available action opens nothing (a read-only discussion). 6. Thread title 「评论串」; the list keeps 「评论」. ## Overlap - objectstack-ai#36136 (wide-screen pinned details): MERGED (48c732c) and merged into this branch; the only conflict was the `@object-ui/plugin-detail` import line in `RecordDetailView.tsx` (main's list plus `CommentsPage`). After the merge `tsc` for app-shell is clean and every `RecordDetailView.*` and `plugin-detail/src/comments` test passes (103 files, 873 tests), as does `i18n` (105 files). - objectstack-ai#36200 (objectstack-ai#36186+objectstack-ai#36191 comment doors): MERGED (d12ac84) and merged into this branch with no conflict. The phone sheet draws from the same `actionsOf`, so it takes the new ✓ gate (any thread the viewer reads) and the own-comment delete door (`ownCommentDeletesOnly`: own comment with no reply only) with no code change; one CommentsPage test expectation moved from `['delete']` to `['resolve','delete']`, and a new test pins the door on the phone sheet. - objectstack-ai#36151 (phone record bottom bar, not pushed yet) and objectstack-ai#36147: same file, different blocks. ## Verification **New tests (all pass)** - `plugin-detail/src/comments/CommentsPage.test.tsx` (18): the list shows top-level comments with 「2 replies」, no reply; a tap on a comment or its count opens the thread, a tap on a reaction is the reaction's; Enter opens; 「‹」 names the record; the docked box writes a comment, toolbar order @ B I list code Send, no 「Ctrl」 in the page; a thread shows comment then replies and replies to its comment; a missing thread shows the list; the list draft survives a thread visit; long press on own comment: 6 reactions (own one pressed), resolve, edit, delete, and the release opens nothing, `onEngage` once; another's comment: no edit or delete; a reply: no resolve; a sheet reaction toggles, Delete reaches the host; a press that travels is a scroll; contextmenu opens the sheet; read-only raises nothing and docks no box; a moderator's press on another's comment engages at pointer down, the sheet opens with Mark resolved and Delete, and when `updatesOthersComments` turns true with the sheet up Edit joins (fails on the pre-fix head); behind the own-comment delete door Delete is on the viewer's own reply only, not on their comment with replies nor on another's reply; resolved threads hidden by default with the filter offered. - `app-shell/src/views/RecordDetailView.commentsPanel-36075.test.tsx`, new top-level describe (6), the real `RecordDetailView` at 375: the top-bar icon with 「2」, a press pushes `?comments=` (flagged) and draws the list over the still-mounted record; tap → `?comments=c-ada` with the reply, 「‹」 → list → record, focus on the icon; a link straight to a thread: 「‹」 replaces one level up twice; the 动态 tab draws no comment and no 「Ctrl」; no icon with feeds off; a moderator's first long press on Grace's comment with the `sys_comment` explain answered late: no comment explain before the press, asked at the press, the sheet shows Delete, then Edit and Delete once the answer lands (fails on the pre-fix head). **Local runs** (after merging main `cbd582f4`): every `app-shell/src/views/RecordDetailView.*`, `plugin-detail/src/comments` and `i18n` test file, 209 files, 2,830 tests pass. Before the merge, a wider set (all `RecordDetailView.*`, `recordCommentsPanel*`, `ObjectView.phone*`, `app-shell/src/__tests__`, all of `plugin-detail` and `i18n`): 640 files, 6,991 tests pass. `tsc` (src and tests) clean for plugin-detail and app-shell. ESLint on the changed files: 0 errors (warnings only of the kinds already in these files). `overlap-check.mjs`: clean against main; objectstack-ai#36136 conflict as above. After the L1-c fix: all of `plugin-detail` (405 files, 3,745 tests) and the host comments file (16 tests) pass; ESLint 0 errors on the touched files. **Browser evidence** (CRM example on `objectstack dev --fresh`, console on Vite from this branch, zh-CN, 375×812 touch, light and dark; seat-side folder `/mnt/project-files/build-seat1/36076/`, script and readings in its README) | Shot | Reading | |---|---| | Record page | icon 「3」 at the top bar's right | | List | 「‹ Globex Ltd」 · 评论 · filter; three first-level comments, 「2 条回复」 under the first | | Thread | comment, then both replies; URL `?comments=<id>` | | Composer expanded | @ B I list code, round send at the right; the box's bottom at 812 (the viewport's) | | Long press, own comment | six reactions, 标记已解决, 编辑, 删除 (red) | | After 👍 | 「👍 1」 under the comment, marked as own | | Back to the record | scrollTop 74 before, 74 after | | 动态 tab | 「动态 (0)」, no comment, no box | Not shown in the browser (the run's only account is an administrator, who moderates): a member's long press on someone else's comment; pinned by the unit test above. The iOS keyboard cannot be emulated in headless Chromium. ## 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 on the changed files. - [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). Branch name is the harness-assigned `claude/project-thread-uzlelf`. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgTfxZyB5T41DdoPaBy)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgTfxZyB5T41DdoPaBy <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgTfxZyB5T41DdoPaBy --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…st, a group's own fields and the pinned details column (objectstack-ai#35902, objectstack-ai#35942) (objectstack-ai#36222) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuVUBehQPXWLrrSjKtHkXE93)_ repo:objectstack#1 · os-sales · session_01L6bhgWCfqdb19A74hDYnKp Part of objectstack-ai#35902 Fixes objectstack-ai#35942 Part of objectstack-ai#36188 Clause-②: no Metadata-protocol: none Skills-docs: updated here Security-touching: no Area: b1-RS. Claims: objectstack-ai#35902 7072867188 (slice 2; it redoes slice 1, whose branch never reached GitHub), objectstack-ai#35942 7072873584 (folded), objectstack-ai#36188 7072882981 (this PR is its skills half; the seven platform-checklist JSON items are PR B, `Fixes objectstack-ai#36188`, after this merges, because a checklist JSON beside skills paths takes a PR off the low-risk skills arm). ## 维护者速读 - AI 按技能搭建记录页时,现在知道页签由父对象的 `relatedLists` 决定:没写就照旧全部显示;写了就只显示列出的,按列的顺序;附件、审批、动态用对象名 `sys_attachment`、`sys_approval_request`、`sys_activity` 列进来;一项可写 `{ list, label, columns }` 给这张子表自己的标题和列。 - 以前技能教「把任务排第一」写 `relatedLists: ['task']`,按现在的规则这会把其他页签全藏掉。技能和评测改成「列出要保留的全部页签,任务排第一」。 - 主从子表默认是页签(objectstack-ai#35921 之后),技能不再说「默认是正文表」;父对象分组指向子表才进字段区,而且只在使用者明确要求时才写。 - 第 1 片(分组用 `fields` 列成员、不再有阶段条和关键字段条、阶段在名字旁的状态标签里)当时没推上来,这次一起补上,关掉 objectstack-ai#35942。 - 右栏、⊟ 开关的文字删掉,改成今天的布局:宽的整页把字段钉在左栏,其余页签在右边。 - 新增三条评测:「去掉附件页签」「税号排在行业后面」「报价单的明细放在金额上面」;指南文档记录页一节加了父单的完整报价单例子。 - 代价:只改技能文字、评测、指南和一个 changeset,不动运行时;四个技能文件都没超上限,上限一个没动(同文件删过期文字来付)。 ## What changes **`skills/objectstack-ui/rules/record-page.md`** (3954 → 3951 B, 988 / 991 tokens) - Step 1: the stage is the status tag beside the title, whose menu moves it; no stage bar or key-field strip (`highlightFields` feed hover cards, pickers, related-list columns) (objectstack-ai#35938, objectstack-ai#35942). `fieldGroups` are the Details sections, each listing its members in `fields`; absent, the fields whose `group` names it (objectstack-ai#35925). Layout: a full page fitting 320 px of details beside 400 px of tabs pins the details left, the other tabs right; unless the details hold a child table or there is no other tab; otherwise one column, Details first (objectstack-ai#36136, `recordPagePinsDetails`). The old 760 / 1120 px two- and three-column text, the right column and the Overview tab are gone. - Step 2 is now "The parent's `relatedLists` is the tab list" (objectstack-ai#35923): without it nothing changes; declared, only the named lists show, in order (unlisted approvals and the stream still follow); the built-ins by object name; "tasks first" lists every tab to keep; leaving out `'sys_attachment'` drops attachments; `{ list, label, columns }`; a built-in is a bare name; a child list another package adds is hidden by a `relatedLists` that does not name it. Kept from the old step 2: `relatedList: false`, `relatedListFilter`, the default list view `sort`. A parent group `{ key, label, relatedList: 'quote_line' }` (no `fields`) places a child table among the fields, written only when asked (objectstack-ai#35902's open question); its tab stays unless a declared `relatedLists` omits it (objectstack-ai#35889's note, seat reading 7048340194, as shipped by objectstack-ai#35923). The old "`'primary'` default for a master_detail" and "`relatedLists: ['task']`, no page file" are removed (objectstack-ai#35921, objectstack-ai#35923). - Step 6: the ⊟ right-column switch is removed (objectstack-ai#36188); the details column's dragged width joins the reader's choices. - Paid for in the same file: step 1's retired layout text, step 3's "the synthesizer fills the rest", step 5's removal release ("removed in @objectstack/spec 18.3.0 (ADR-0087 D2)": the refusal carries its fix), step 6's "(drawer or full page, for a drawer-mode object)" and the deprecated `width` / `drawerWidth` aside, step 1's "the other tabs right", step 4's "a filtered split (Open vs Closed)" and step 5's "(`new_window`, `none` are the other members)" and "Field count never decides". - The `os:check` example is a quote (`sharingModel: 'private'`) with a group listing its `fields` and a `relatedLists` entry carrying its own label and columns. **`skills/objectstack-data/rules/relationships.md`** (16790 → 16812 B, 4203 / 4203), Detail-page related lists: every child is a tab by default, a `master_detail` child too; `false` hides; `'primary'` makes a body table with no tab; a parent group naming a `master_detail` child places its table there too (written only when asked), and its tab stays unless a declared `relatedLists` omits it; the parent's `relatedLists` is the tab list (pointing at objectstack-ui Record Page), with the built-ins and the entry form; an entry's `label` / `columns` win over `relatedListTitle` / `relatedListColumns`. Paid for by the old tri-state bullets, the "Suppress a noisy association" comment, and a shorter refusal aside ("bar a platform or sibling-artifact name", "one into a package is stored, placing nothing"). **`skills/objectstack-data/references/examples-objects.md`** (6894 → 6876 B), Field Groups: a group lists its members in `fields`; `Field.group` is the older spelling, still read; the two refusals named; the example lists members on the groups. **`skills/objectstack-ui/rules/navigation.md`** (10251 → 10219 B): "`fieldGroups` + `Field.group`" is "`fieldGroups`", twice. **Evals** (`skills/objectstack-ui/evals/record-page.json`, README; measured, not ratcheted): - Case 1 (tasks first) now expects the full tab list, `task` first, and refuses `relatedLists: ['task']` and a group naming the task list. Its old answer ("already a full-width body table") is wrong since objectstack-ai#35921. - Case 4: remove the attachments tab: the full list without `'sys_attachment'`. - Case 5: a Tax ID field after Industry in the group's own `fields`, with no `group` on the field. - Case 6: a quote's line items above its Amount section instead of a tab: a group `{ key: 'lines', label, relatedList: 'quote_line' }` between the two, and a `relatedLists` naming the tabs kept without `quote_line` (an undeclared parent keeps a group-placed table's tab). - `must_not_contain` tokens are code shapes (`relatedLists: ['task'],`, `'sys_attachment',`, `group: 'basic' }` …), so an answer that names the wrong shape in prose is not failed. - No case's `must_not_contain` token appears in its own reference answer; every `must_contain` token does (checked by script). **Guide (`content/docs/ui/pages.mdx`, Record pages)**: the synthesized default says every related list is a tab by default, the header's status tag carries the stage with no stage bar or strip, and an unplaced `'primary'` table sits after the field sections drawn open (it said "after the first field section"; `bodyTablePlacement` since objectstack-ai#35742). New subsection "Declaring the tabs and the field groups": `relatedLists` as the tab list with the built-ins and entries, a group's `fields`, a group placing a child table (its tab stays unless a declared `relatedLists` leaves it out), and epic objectstack-ai#35896's full quote example (`os:check`, with `sharingModel: 'private'`; a comment says `quote_line` is in both places on purpose, so it is drawn in the details and keeps a tab with its own columns). The layout paragraph gets its own heading, "How the page is laid out". "A one-word change on the relationship field" now reads "a declaration on the parent (a field group naming the list)". **Changeset** `.changeset/35902-skills-related-lists-tabs.md`: `'@objectstack/skills': patch`, both declaration lines. ## Small calls made in this thread - No ratchet ceiling moves: a `scripts/check-skills-token-ratchet.mjs` edit is outside the low-risk skills arm. All four files fit under their current ceilings. - The skill says "no package places its own list yet" rather than naming the follow-up card: the published catalog refuses internal ids (`check-doc-authoring`). - The Inline Editing section of `relationships.md`, `skills/objectstack-ui/rules/list-views.md:370` and `skills/objectstack-ui/SKILL.md:48` still teach that `inlineEdit: true` alone puts the child rows on the parent's form; since objectstack-ai#35921 a parent field group decides and `inlineEdit` only picks grid or form. Not in this PR (it is form entry, not the record page's tabs, and it spans three more files): follow-up for the seat to card. - `content/docs/ui/field-grouping-and-order.mdx` was not touched: the brief names the record-page section. ## Verification (readings against `main` 48c732c, head 7b3f52e) - Reviews on 4885e48: L1-c REWORK 7073387487 (two must-fixes, both in 7b3f52e); Fable rules L2 PASS 7073403529 (N1 narrowed in 7b3f52e, N2 closed by L1-c's fix 1, N3 = L1-c's fix 2, N4 left). - `node scripts/check-skills-token-ratchet.mjs`: 60 authored files within ceilings. - `pnpm check:skill-links` (270 links, 139 fragments), `check:skill-identifier-liveness` (549 citations), `check:doc-authoring` (75 published skill files with no internal ids; 516 doc files clean): green. - `pnpm --filter @objectstack/spec check:skill-examples`: 348 marked examples type-check across 3 surfaces (EXIT 0), the new record-page, examples-objects and pages.mdx blocks among them. - `pnpm --filter @objectstack/lint run check:doc-security-posture`: 41 `ObjectSchema.create` examples carry an `os validate`-clean posture (the first head missed `sharingModel` on both quote examples; CI caught it, fixed in 4885e48). - The examples through `defineStack` (cross-reference validation): the guide's quote with `quote_line`, `task` and `account` accepted; control: the same quote without `quote_line` is refused (`relatedLists[0] 'quote_line' matches no inbound relationship of 'quote'`); the rule's short quote with a `quote_line` child accepted; the data skill's account accepted. - `node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-emjngv`: skills/** ×6 (all `.md` or `evals/*.json`), plus a changeset and one `content/docs` `.mdx`, 296 changed lines; the arm's `--pr` reading follows on the PR. ## Follow-ups - PR B: the seven checklist items (`docs/qa/platform-checklist/areas/records-forms.json` ×6, `attachments-storage.json` ×1), `Fixes objectstack-ai#36188`, in a new session after this merges. - objectstack-ai#35902 stays open for the objectstack-ai#35901 batch (extension placement), the repo example and HotCRM. - `inlineEdit` skills text (above). ## 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. (skills and doc gates above) - [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 Chinese summary) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgWCfqdb19A74hDYnKp <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgWCfqdb19A74hDYnKp --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…ts the system history alone while the comment panel holds the comments (objectstack-ai#36193) (objectstack-ai#36221) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuCeTM2qYEuA9dNQrrsVbmgv)_ repo:objectstack#1 · os-sales · session_01L6bhgXV5qLuX94Bn6aqb4y Fixes objectstack-ai#36193 > **Premise.** > 1. What the card reads now: objectstack-ai#36136 (48c732c) retired the overview's right rail, so the 「最近动态」 card is gone and the overview lists no comment. The card's 「讨论 (3)」 face came from a slotted page whose `discussion` slot holds `record:chatter`; after objectstack-ai#36136 that author's block is drawn on the 动态 tab only, where it still drew 「讨论 (4)」, the 全部动态 filter, every comment and reply and a comment box, beside the comment panel showing the same comment (before: `pr36136/timeline-tab-panel-open-*`). > 2. Reading (seat, 2026-11-21 23:06Z): the card's 「不改动态页签」 means the platform's own 动态 tab (its label and the stream the platform draws). The target is the author-placed chatter/discussion block, which now happens to sit inside that tab. > 3. `Clause-②: no` (a UI face of an existing block; no contract, permission or spec key). ## What changes - `renderers/record-chatter.tsx`: while `RecordCommentsInPanelContext` is on and the block is on the default/slotted page (`useDefaultRecordPage()`), a `record:chatter` / `record:discussion` block draws the system entries only: comments and replies filtered out before `applyFeedConfig`, no composer (`onAddComment` withheld, `commentsShown: false`, which also drops the Comments-only filter), a refused or failed comment read not reported (the panel's to say), heading 「动态」 (`detail.timeline`) and empty line `detail.noActivity`. The `(N)` count is the filtered items, so it leaves comments out. - `RecordChatterPanel.tsx`: optional `titleLabel` / `emptyLabel` props (default 「讨论」 / 「暂无评论」, unchanged for every other caller); a caller-named heading takes the stream's `Activity` icon instead of `MessageSquare` (L1-c nit, 3efc293). - Test `renderers/__tests__/record-chatter.commentsInPanel-36193.test.tsx` (6). Not changed: the platform's own `record:activity` stream, the 动态 tab's label (still 「动态」, no count), an authored (`kind: 'full'`) page. **Phone, after objectstack-ai#36208 (merged into this branch at `abe8f8b5`):** objectstack-ai#36208 sets `RecordCommentsInPanelContext` to the panel OR the phone comment page, so on the phone too the author's block on the 动态 tab now drops its comments; the phone's comments live on their own page. Before objectstack-ai#36208 the phone had no comment surface and kept them. ### Small calls (seat may overrule) 1. Heading is 「动态」, matching the platform stream's heading in the same tab; the 全部动态 filter stays (its Comments-only entry goes). 2. The switch is "comment panel offered", not "open", as objectstack-ai#36114 uses for the stream. ## Why Card objectstack-ai#36193 (epic objectstack-ai#36062 phase 1 wrap-up): with the comment panel open the same comment showed twice, and a resolved thread stayed in the record body. ## Verification - New test 6/6. Ablation (renderer + panel reverted to main): 4 red, the 2 CONTROL cases green. - plugin-detail chatter / timeline / RecordPageColumns / renderers suites: 123 files, 1,274 tests green. app-shell suites naming `record:chatter` / discussion slots / the comment panel: 14 files, 221 tests green. - Browser: HotCRM main on `objectstack dev`, console on Vite from this branch, zh-CN, 1440, dpr 2, one comment + one reply on Wayne Enterprises, a local uncommitted slotted `crm_account` page with `slots.discussion: [record:chatter]`. Evidence in the project folder `build-seat1/36193/`: - before (main after objectstack-ai#36136): `pr36136/timeline-tab-panel-open-{light,dark}.png`: 「讨论 (4)」, the comment and 「1 条回复」 beside the panel. - after: `after/timeline-tab-panel-open-{light,dark}.png`: 「动态 (2)」, two system rows, no comment box; `after/overview-panel-open-*`: no comment on the overview; tab row 「… 活动 5 动态」 unchanged. - phone: `after/phone-timeline-tab-light.png`: still 「讨论 (4)」 with the comment (no comment surface on the phone yet). - Drawer: the comment panel is offered in the drawer too (objectstack-ai#36114), so the author's block in the drawer's 动态 tab follows the same rule as on the page. - Overlap: `overlap-check.mjs` clean against main (c30ce97, after objectstack-ai#36208) and open heads. Clause-②: no Metadata-protocol: none ## 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 three 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. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgXV5qLuX94Bn6aqb4y <!-- signed: repo:objectstack#1 · os-sales · session_01L6bhgXV5qLuX94Bn6aqb4y --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…r resets the column to its default width (objectstack-ai#36474) <!-- 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#36226 Clause-②: no — no public type or accept set; one interaction on an existing control Metadata-protocol: none ## 维护者速读 - 宽屏打开记录整页时,左边字段栏和右边页签之间的分隔线,双击就回到默认宽度 400,并且记住;以前只能拖动或用方向键调。 - 属于「记录页对标 Attio」专题:这张卡的五条里只差「双击复位」这一条,其余四条(可拖的分隔线、拖动范围、按人按对象记住宽度、评论栏不动)此前的记录页改版已经做完,这次在控制台里逐条实测并附了截图。 - 碰到的只是在宽屏记录整页双击分隔线的人;出错最多是双击没反应或宽度不对,拖动和键盘照常能用,这次改动可以直接撤回。 - 无 ## What changes - The record full page's pinned left column (the details beside the tabs on a wide full page) already has a divider, `DetailsWidthHandle`, that drags, moves with the arrow keys and Home / End, and keeps the width per reader and per object. A **double-click** on it now keeps `RECORD_PAGE_DETAILS_WIDTH` (400), the same constant the page falls back to when nothing is kept (the console's workspace preference passes it as the fallback; the plugin's own clamp uses it for an absent width). So the reset writes the default as the kept width, and the next record of that object opens at 400. - The double-click clears any in-flight drag and its preview first, so a press still down when it lands does not go on to preview or commit a width. - Card items 1, 2, 4 and 5 were already delivered by objectstack-ai#36136 and objectstack-ai#35890: the divider, its limits, the remembered width, and the comment panel left unchanged. They are measured in the Console below. This PR adds item 3, the double-click reset. The card's own numbers (a right rail of 320, dragged between 280 and 560) describe the rail that objectstack-ai#36136 removed. The default reset to here is objectstack-ai#35890's 「左栏宽 400」, not a new number. - README (the package ships it): the record-page section's layout table and its tab-row paragraph now describe today's layout, as read from `RecordPageColumns` and `recordPagePinsDetails`: - pinned on a full page whose content is at least 744 px wide (with another tab, and no related table among the fields), the details tab first everywhere else; - no right column at any width; - one field per row except on a details-only full page; - the tab order ends with 动态 last; - the divider, with its drag, keys, double-click and host-kept width. The old 1120 / 760 px right-column tiers and "there is no tabbed tier" are gone. Two later paragraphs (the related panels' count-first loading, and "One header serves every tier") were not re-measured and are carried to objectstack-ai#36493. Read first, by risk: 1. `ui/packages/plugin-detail/src/RecordPageColumns.tsx`: the `onDoubleClick` on `DetailsWidthHandle`. It commits the unclamped default, never `clamp(400)`, so a narrow window does not store a smaller width as "the default". 2. `ui/packages/plugin-detail/README.md`: the rewritten table under "One record page, laid out by its width". 3. `ui/packages/plugin-detail/src/__tests__/RecordPageColumns.test.tsx`: the new `it` in the objectstack#35890 describe, with a host stand-in that re-reads its store on every mount. ## Console evidence This branch's Console (vite) runs against a fresh `examples/app-crm` backend (`--fresh`, seeded). The browser is headless Chromium at 1440×900 @2x, zh-CN, signed in as the seeded admin. The page is 客户 (`crm_account`), a synthesized record page. Readings come from the separator's `aria-valuenow` and the column's measured width. | Step | 客户 record page | Reading | |:--|:--|:--| | Before the drag | [01-before-drag](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/01-before-drag.png?raw=true) | 400 (max 664 at 1440) | | After dragging +160 | [02-after-drag](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/02-after-drag.png?raw=true) | 560 | | Another 客户 record | [03-other-account-keeps-width](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/03-other-account-keeps-width.png?raw=true) | 560, kept | | A 联系人 (`crm_contact`) record | [04-contact-default](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/04-contact-default.png?raw=true) | 400, the default: the width is kept per reader and per object | | Back on 客户, double-click | [07-after-double-click](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/07-after-double-click.png?raw=true) | **400** | | Reload, then the first 客户 record again | (no shot) | 400 and 400: the reset is kept |  **Comment panel.** At 1920×1080 @2x with the comment panel open beside the page, [before](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/09-1920-comments-open-before-drag.png?raw=true) and [after](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/10-1920-comments-open-after-drag.png?raw=true) a drag of +120: the column goes 400 → 520, then a double-click returns it to 400. The comment panel measures 380 px at each of the three readings. At 1440 with the panel open, the page content is under 744 px, so the page does not pin and there is no divider to drag ([05-comments-open](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/05-comments-open.png?raw=true)): the details are the 「详情」 tab and the panel is still 380. **Narrowing the window.** At 1280, 1100, 1000, 900, 800, 700 and 600 px wide, the document never scrolls sideways (`scrollWidth` equals `clientWidth` at each). The column stays 400 down to 900, where the divider's max is 412. At 800 and below the page is no longer pinned ([08-narrow-900](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/08-narrow-900.png?raw=true), [08-narrow-800](https://github.com/objectstack-ai/objectstack/blob/74ac3018d3457fe7270c9df654d1386daf71ebfc/issue-36226/08-narrow-800.png?raw=true)). The only sideways scrollers inside the page are the related lists' own grids, which scroll by design. **HotCRM's 客户 page: NOT MEASURED live.** The box had about 1 GB of memory free during this run, shared by five devs, and an earlier dev ran out of memory building the crm closure. A static reading of HotCRM `origin/main` (689166c): it authors no record page for `crm_account`. Its only `crm_account` page, `account_workbench`, is a list interface page, and its authored record pages are project, quote, contract, lead and case. So HotCRM's 客户 record page is this same synthesized page and component. ## Tests `aria-valuenow` on the separator, read from the new test: | step | before this PR (handler ablated) | this PR | |:--|:--|:--| | drag 400 → 520 | 520 | 520 | | double-click | 520 | **400** | | move + release after the double-click | n/a (the test is already red) | 400 (no preview, nothing kept) | | remount from the kept store | n/a | **400** | <details><summary>Green on 56118cb: RecordPageColumns.test.tsx (no code or test change since)</summary> ```text cd ui && pnpm exec vitest run --maxWorkers=1 packages/plugin-detail/src/__tests__/RecordPageColumns.test.tsx Test Files 1 passed (1) Tests 36 passed (36) ``` </details> <details><summary>Ablation (once): the reset's commit removed, the pin reds, then restored</summary> ```text node scripts/ablation-replace.mjs --file .../RecordPageColumns.tsx --anchor 'onCommit(RECORD_PAGE_DETAILS_WIDTH);' --delete --hold anchor count now: 0 FAIL ... > a double-click on the handle keeps the default 400 again, ends a drag, and the default holds on the next open (objectstack#36226) AssertionError: expected '520' to be '400' // Object.is equality Tests 1 failed | 35 passed (36) ablation-replace: ok restored: blob == HEAD (a35b425) and `git diff HEAD` is empty ``` </details> ## Acceptance notes Each card acceptance line, read on the layout after objectstack-ai#36136 and objectstack-ai#35890: - 「拖到头右边栏是 280 和 560」 has no meaning on this layout, because the right rail it measures is gone. The divider now sits between the pinned details column and the tabs. Its limits are a 320 px minimum for the column and room for 400 px of tabs (664 at 1440). - 「双击分隔线:右边栏回到 320」 becomes: the details column returns to 400, objectstack-ai#35890's default. - 「字段区不足 480 时右边栏自动让出宽度」: the column yields to keep the tabs 400 px, never below 320, and the page unpins below 744 px of content. Measured above, with no sideways page scroll. - The other lines (another record of the same object keeps the width, another object stays at the default, the comment panel's width is unchanged, the screenshots) are measured above. HotCRM is NOT MEASURED live, for the reason given above. - Keyboard reset: not added. No separator in `ui/` resets from the keyboard. The record drawer's resize handle and the Gantt splitter both reset on double-click only, so there is no convention to follow. - A reading, not filed: the pinned details column's `scrollWidth` exceeds its `clientWidth` by 6 px at 1440 and 900. It draws no horizontal scrollbar in this Chromium, and this PR does not touch that layout. ## Verification Two minutes: on a wide window (content at least 744 px), open any record as a full page. Drag the divider between the fields and the tabs, then double-click it. The fields column snaps back to 400 px. Open another record of the same object and it is still 400. <details><summary>Local gates</summary> - On a3cbe23, `dispatch-gates --commands` derived 38 families, and 35 exited 0. `check:query-options-erasure` and `check:type-check-debt` timed out on the shared box, and `pnpm --dir ui exec vitest run scripts/` was not run. All three are NOT MEASURED locally and left to CI. - On 4344541 the derived set is unchanged. Re-run for the README: `pnpm --dir ui check:new-line-citations` (0 new citations), `check:nul-bytes`, `check:published-files`, `check:closed-ceremony-text`, `check:skill-identifier-liveness`, `check:watch-hint-literal`, `check-comment-mask-corpus` and `check:doc-authoring`. All exited 0. - `plugin-detail` type-check and its whole suite: not run locally (shared lock), left to `Type Check UI` and `Test UI`. </details> 🤖 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>
Fixes #35890
Requested by Sales · project thread
repo:objectstack#1 · os-sales · session_01L6bhgUZTwDqtEFzNFCVTri
Part of epic #35590 (record page redo). One PR for the card.
Clause-②: yes (widening):
RecordPageColumns(exported from@object-ui/plugin-detail) gains the optional propsfullPage,detailsWidth,onDetailsWidthChangeandonShownTabChange, andonEnlargeRelatedan optional second argument{ replace?: boolean }.rightColumnandrailstay on the props as@deprecatedno-ops, so no caller breaks. New exports:RECORD_PAGE_DETAILS_WIDTH,RECORD_PAGE_PIN_MIN_WIDTH,recordPagePinsDetails;recordPageTierHasRightColumnstays exported and is now@deprecated.@object-ui/i18n: two new keys in every pack (detail.approvalPendingStep,detail.detailsColumnResize), anddetail.recordTabOverviewchanges its text (概览 / Overview → 详情 / Details); every key the retired rail read stays in every pack, unread. TheRecordSummaryRailmodule was internal (never exported from the package entry) and is deleted.Metadata-protocol: none
维护者速读
?related=的链接打开。What changes
When the page pins. Ruling on the card (comment 7064066204, option 0 of the reviewed decision card): a full page pins its details when its content fits left 320 + gap 24 + right 400 (744 content px). The left column is 400 px (or the reader's dragged width) and narrows by itself to 320 px to leave the tabs 400 px; narrower than that, the page falls back to the tab row. This replaces the card's line 「沿用出现右栏的宽度」. Pinning is measured on the page content's own width (
clientWidth, ResizeObserver), never on the window, so the comment panel of #36075, which gives way at window widths of 1280 and up, narrows the page and the page re-decides by itself.What that means on common windows, measured in the console against the CRM example (
measure-l1c.json; the page frame is the window minus the nav minus the host's 48 px margin, and the content is the frame minus its 48 px padding; at 1280 and 1366 the nav is collapsed, at 1440 it is open at 256 px; comment panel 380 px,beside):The earlier 1440 row (record area 1184, tabs 412) assumed no host margin; the measured frame is 48 px narrower, so with the nav open and the panel open the content is 708, under 744, and the page uses the tab row. Windows of about 1416 to 1475 with the nav open and the panel open land here. This follows the ruled threshold as written, and Sales accepted it: with the sidebar expanded, opening the comment panel can return the fields to the tab row, and collapsing the sidebar restores three columns (note 7069882604, with #36112 F1). These windows hold for today's sidebar threshold (expanded from 1416). Once #36112 PR B makes the sidebar start expanded from 1280 (ruling 7069868269), the band with the sidebar expanded becomes about 1280 to 1475, so 1280 and 1366 also go to the tab row when the panel opens; collapsing the sidebar still restores three columns. The 1416 comment in
recordPageColumns.tsis updated by #36112 PR B.Layout, pinned.
[details 320–400+ px] [24 px separator] [tabs minmax(0,1fr)]. The details render at one field column (DetailsColumnCapContext= 1). The tab row moves into the right column and drops 「详情」; the open tab is the address's?related=when it names one, otherwise the first tab (implied, never written). Each column scrolls on its own when the page has a scroll parent with room (usePinnedHeight). Esc does not close a tab while pinned (there is no "back to details" to go to).The separator.
role="separator",aria-orientation="vertical",aria-valuenow/min/max; pointer drag previews and commits on release; ←/→ move 16 px, Home/End go to the ends. The width is therecord.columns.details-widthworkspace preference (per object,{ width, v: 1 }), which replaces the retiredrecord.columns.related(⊟) preference.Narrowing out. When a pinned page narrows below the threshold on the same record and the address names no tab, the implied tab is written to the address with
replace, so the reader stays on what they were looking at and Back history does not grow.Not pinned. A page with no other tab draws the details alone, with no tab row. A page whose details hold a related table among the fields (#35889) does not pin. Drawer, split pane and phone (
fullPagefalse or too narrow) keep the one-column tab row and never pin. What reaches them: the rail is gone there too, and the first tab reads 「详情」. Measured: drawer at 1440 (details 622 across, 「详情」 shown) and phone at 375 (details 327 across, 「详情」 shown), both with no rail.Rail retired.
RecordSummaryRailis deleted with the ⊟ panel toggle, its⌘⇧,shortcut and therecord.columns.relatedpreference; the attachment-count hook and approval-pending test move torecordTabBadges.ts. ThePanelTogglesplumbing stays (empty) for #36075. The hidden-list foot line under the rail goes too; hidden lists and the reset are in the tab row's 「更多」 menu. The "default order changed" hint stays, under the tab row. A hidden list still opens, from its 「更多」 item or from?related=naming it (requestedaccepts ids inresolved.hidden; test red without the fix).Other card items. The overview tab is labelled 「详情」 in every locale (
detail.recordTabOverviewtakes thedetail.detailsword). The in-approval tag readsIn approval · {{step}}(detail.approvalPendingStep, 11 locales) for non-approvers when the request names a step, using the approvals panel's ownstepDisplayText.Host.
RecordDetailViewpassesfullPage={!embedded}, the width preference andonShownTabChange. When the shown tab is the 动态 timeline (implied or chosen), the full activity window is read, as it was when the tab was chosen. Feed reads at open are unchanged (the page payload still asks discussion + activity top 5 for the tab's count), to stay out of #36075's way. Merged withmainafter #36114 and #36178 (the comment panel, PRs 1 and 2), keeping both sides: the rail's 最近动态 card that #36114'sRecordCommentsInPanelContextnote spoke of no longer exists.overlap-check.mjsat push (241f4b21): clean againstmain, #36187, #36123 and #35923; it conflicts with #36183 (#36047 slice 2, the text-size sweep) inRecordSummaryRail.tsx(deleted here), the e2e spec (renamed here) and two plugin-detail tests. Whichever lands second resolves it; #36183 re-runs its mapping script onmain.Docs.
content/docs/ui/pages.mdx(Record pages › The synthesized default) now describes the tab row, the pinned layout and when related rows are read, instead of the right column.Acceptance notes (card checklist)
RecordPageColumns.test.tsxpinned block;recordPageTiers-26678at 1440 / 1100 / 800 px)[data-record-summary-card])approvalDeclaredActionstest, machine name and label)?related=crm_activity.account)?related=. ✔ (readerArrangement-35595, red without the fix)⌘⇧,; the hidden-list foot line (its job is in 「更多」); the rail's three-row previews of each related list (a list now reads its rows when its tab opens).Why
Sales asked for the record page they remembered: on a wide full page, the main form on the left and the child tables in tabs on the right (#35890, under epic #35590). The width rule was put to Sales after a decision review because the card's 760 px reading and the 1120 px reading both broke the comment panel layout on common laptops; option 0 keeps three columns (fields | tabs | comments) on every common laptop, which is the figure Sales approved on #36075.
Verification
079c7723(shared box, underos-verify-lock): plugin-detail, i18n, app-shell Record*, recordCommentsPanel, relatedListConditions and workspacePreference: 647 files / 6,742 tests pass; app-shell type-check (src and tests) clean. On241f4b21: plugin-detail + i18n 509 files / 5,677 tests pass, both type-checks clean,record-tabs-35595.spec.ts6/6 locally. Earlier, onfbe6e33d:vitest run packages/plugin-detail packages/i18n: 500 files / 5,598 tests pass (31 skipped, existing).vitest run packages/app-shell/src/views/Record packages/app-shell/src/utils/workspacePreference: 133 files / 1,005 tests pass. The whole app-shell suite did not fit the 28-minute local window; CI is the full reading.type-check(src and tests) clean for plugin-detail, i18n and app-shell; ESLint--quieton every changed file: 0 errors;check:test-source-aliasOK.RecordPageColumns.test.tsx(new pinned describe: threshold 744, auto-narrow 824→400 / 800→376 / 744→320 / 743→not pinned, drag, keyboard, drawer never pins, body table, narrowing writes the implied tab with replace,onShownTabChange),RecordDetailView.recordPageTiers-26678(host at 1440 / 1100 / 800 / 720 / 390, embedded,?related=timelinepinned and not, width preference round-trip),workspacePreference.test.ts(details-width codec). Deleted with the code they pinned:RecordPageColumns.switches-27052,RecordDetailView.panelToggles-27052.recordOpenWaves-13010,recordOpenOneRequest-28470,timelineCount-28737,harness › relatedCountsFirst-27056,accessibleNames-12625,topBar-27524,phoneFace-27058,feedLoadFailure-29188.ui/e2e/record-tabs-35595.spec.ts(renamed fromrecord-tabs-rail-35595.spec.ts).Human Minimum
packages/specholds no runtime logic. (Nopackages/specchange.)pnpm lintpasses (changed files,--quiet).main, one pull request..changeset/35890-record-details-pinned.md), and both declaration lines are filled in here and in the changeset.packages/spectouched: not touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri