Repository navigation
fix(console): a stage move refused with a 409 in a record drawer re-reads the record - #36394
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
RecordContext gains reread, the re-read every host provides; refresh stays the opt-in to the header's Refresh entry, still off drawers. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA Final head · 2026-11-22T09:58Z · |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT · head 维护者速读
席位核对
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Inputs read: card #36309 (body, triage 7075085970, claim 7075932398, os-dev-report 7077254463, claim amendment 7077275434), PR #36394 (body, 8 files, net diff against ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: FAIL |
… reread Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA Delta head · 2026-11-22T10:39Z · |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT(增量)· head 维护者速读
席位核对(增量,只核
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: This is a delta record. It follows FAIL 7077635194 at M1: closed ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Landing (seat 7, 2026-11-22T10:45Z): head |
…; a record's comments are on its full page (objectstack-ai#36406) <!-- 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#36225 Clause-②: no Metadata-protocol: none ## 维护者速读 - 在列表里从侧边打开一条记录(右侧预览)时,头部不再有评论按钮,预览里任何地方都打不开评论面板,「动态」页签里也不显示评论;要看或写评论,点预览右上角「展开成整页」,整页的评论按钮和评论栏照旧。 - 属于「记录详情页重做」专题,照维护者说的「预览里去掉评论按钮,评论只在整页里」(对齐 Attio 的预览)。 - 出错的话,影响的是预览里看不到评论;评论数据不动,整页照常能看能写,撤回这次改动即可恢复原样。 - 无  ## What changes The record drawn **embedded** (the side preview a list opens through 「在侧边打开」, the drawer a record page opens over itself, and the overlays `ObjectDataPage` / `InterfaceListPage` draw) no longer offers the comment panel: - `RecordDetailView.tsx`: `commentsPanelOffered` is now `commentsEligible && !commentsPhone && !embedded`. A new `commentsLeftToFullPage` (embedded, otherwise eligible) keeps the preview's 动态 stream giving the comments up (`RecordCommentsInPanelContext` and the stream count read `streamGivesUpComments`), so the preview shows no comment row and no composer anywhere. The preview does not read `sys_comment` at open for an icon count any more (the discussion rides the open's payload only where a surface holds the comments). - The drawer-only plumbing the panel needed is removed: the pane bar's comments slot (`RecordPaneBarComments`, `commentsSlot` on `RecordPaneBarApi`, the `comments` slot `RecordStackDrawer` handed `NavigationOverlay`), the plain-overlay trailing placement, the drawer placement (`cover` under a 760 px body, `beside` above it, `COMMENTS_PANEL_DRAWER_SPLIT_MIN_WIDTH`, `useElementWidth`) and the drawer's own open-or-closed preference. `commentsPanelPlacement` takes the window width only; the browser keeps one choice, the page's (`COMMENTS_PANEL_OPEN_KEY`). - Unchanged: the full page's icon, panel, composer and placement; the phone's comment page; list rows. - Docs: the comment-panel section of `content/docs/frontend/plugins/plugin-detail.mdx` and the plugin-detail README say the drawer has no panel; the `RecordCommentsInPanelContext` jsdoc names the preview case. - Changeset `.changeset/36225-preview-no-comments.md` (`@object-ui/app-shell` patch). It states that it replaces the lines of the pending objectstack#36075 entry that put the icon and panel in the drawer (the same form the pending objectstack#36076 entry uses); no existing changeset is edited. - Card item 3 (the wording of objectstack#36149's item 2, now 「右边只有『更多』」) is a card edit, not code: the coordinator already commented it there. First read (risk order): 1. `ui/packages/app-shell/src/views/RecordDetailView.tsx`, the comment-panel block near `commentsEligible` (the gate and `streamGivesUpComments`). 2. `ui/packages/app-shell/src/views/recordCommentsPanel.tsx` (placement narrowed to the page). 3. `ui/packages/app-shell/src/views/RecordDetailView.commentsPanel-36075.test.tsx`, the new `the side preview has no comments (objectstack#36225)` block. Two-minute verification: `pnpm dev`, open any object list, hover a row and press 「在侧边打开」: the preview header shows ↑ ↓, the position, ⤢ and ✕, then the record's name, 编辑 and ⋯, and no comments icon; 动态 shows no comment. Press ⤢: the full page's top bar shows the comments icon with its count, and the panel opens beside the record. ## Tests `RecordDetailView.commentsPanel-36075.test.tsx` (through the real `RecordDetailView`): - new `describe('the side preview has no comments (objectstack#36225)')`: no icon and no panel in the preview though the page was left with the panel open (the card's "after commenting" row); the preview's 动态 tab draws no comment and no composer; an object with a hand-written page: the preview draws the standard page, with no icon and no panel (replaces the objectstack#36150 case that pinned the drawer's icon). - CONTROL: a comment written in the full page's panel is posted on the record and shown there (the existing full-page cases stay). - Removed: the drawer-placement case ("a drawer too narrow to split …") and `recordCommentsPanel.drawerEscape-36075.test.tsx`, which mounted the panel inside the drawer, a placement this card retires. The panel's own Esc and @-list behaviour stay pinned in plugin-detail's `CommentsPanel` tests. - `recordCommentsPanel-36075.test.ts`: the page placement only. - `RecordDetailView.feedRecordScope.test.tsx` mounts the full page for its synthesized-page cases (they read the panel), and the harness's refused-`sys_comment` case mounts the full page. <details><summary>Readings (head 855a906 unless named)</summary> - Targeted ui suites, `ui/` vitest under the shared lock, `--maxWorkers=1`, 16 files (the comment panel, feed scope, harness, resolved threads, reply counts, feed loading and failure, discussion fallback and explicit composition, record-open requests and waves, timeline count, pane open-as-page, the list's record drawer, the top bar): `Test Files 16 passed (16)`, `Tests 229 passed (229)` at 9461c50; after the two test-only commits, `RecordDetailView.commentsPanel-36075.test.tsx`: `Tests 18 passed (18)`. - `pnpm run type-check` in `ui/packages/app-shell` and in `ui/packages/plugin-detail`: exit 0 each, after building the `@object-ui/app-shell^...` closure (exit 0). - Ablation through `scripts/ablation-replace.mjs` (anchor hit 1 to 0, blob c1a648b moved; restored, `git diff HEAD` empty): - A: `!embedded` dropped from the panel gate: 2 failed (no icon and no panel in the preview; the hand-written page's preview). - B: `commentsLeftToFullPage` dropped from `streamGivesUpComments`: 1 failed (the preview's 动态 draws no comment and no composer). - Browser, Chromium 1440 x 900, zh-CN, a fresh showcase backend and the Console dev server on this branch, object 客户 (`showcase_account`), record Initech, opened by 「在侧边打开」: preview `data-comments-button` 0, `data-comments-panel` 0, composer 0, also on its 动态 tab. ⤢ to the full page: icon 1; panel opened, a comment written, shown in the panel. Back to the list, the same record in the preview (the page's panel left open): icon 0, panel 0, the new comment not on screen, also on 动态. </details> Screenshots (Initech, this branch): - [preview](https://github.com/objectstack-ai/objectstack/blob/37428306c12e207770c8ebbfe7515db7e257a4a1/36225-20-preview.png?raw=true) - [preview 动态 after a comment on the full page](https://github.com/objectstack-ai/objectstack/blob/37428306c12e207770c8ebbfe7515db7e257a4a1/36225-42-preview-activity-after-comment.png?raw=true) - [the full page with its comment panel](https://github.com/objectstack-ai/objectstack/blob/37428306c12e207770c8ebbfe7515db7e257a4a1/36225-31-full-commented.png?raw=true) ## Acceptance notes - HotCRM 线索: NOT MEASURED in a browser (HotCRM runs against published packages, not this branch). The gate keys on the record being drawn embedded, never on the object or app, and the same view draws every app's preview. - The card's 「没有核对的」 item, where a comment notification lands: measured. The inbox row's link is `/{object}/{id}`, resolved under the current app (`resolveNotificationTarget`); opening `/apps/showcase_app/showcase_account/ID` lands on the full record page (`/record/ID`, no pane, comments icon present). It does not open the comment panel by itself: the panel opens as the reader left it. Nothing to change here for this card. - `NavigationOverlay` and `RecordTopBar` in `@object-ui/components` keep their optional `comments` slot (a published prop); the console no longer fills the overlay's. - A reader whose browser stored `os:record-comments-panel:drawer` keeps a key nothing reads. - Overlap: `scripts/pm/overlap-check.mjs` clean against origin/main, objectstack-ai#36343 and objectstack-ai#36394 (both share `RecordDetailView.tsx`). ## Verification <details><summary>Local gates</summary> - `node scripts/pm/dispatch-gates.mjs --commands` derived 71 families for this diff; all 71 run locally, each exit 0 (`check:skill-examples` and `check:type-check-debt` first answered exit 3, prerequisite not built, and were re-run after building `@objectstack/client-react`: exit 0). `--ran` reconciliation: `71 derived, 71 run, 0 NOT-MEASURED, 0 UNRUN`. - On the final head 855a906, after the test-only commits: `check:cross-package-test-inputs`, `check:test-source-alias`, `check:nul-bytes`, `check:tier-file-adoption`, `check:undeclared-dep-imports`: exit 0 each. - `pnpm --dir ui exec vitest run scripts/`: `Test Files 172 passed | 2 skipped (174)`. - The full farm and the required UI jobs are CI's. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Requested by Steedos · project thread
repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA
Fixes #36309
Clause-②: yes (widening) — measured: the claim expected
no;RecordContextValuegains the optional memberreread(builtdist/context/RecordContext.d.tscarriesreread?: () => void | Promise<void>;, exported through@object-ui/react's root); nothing removed or renamed. The seat amends the claim.Metadata-protocol: none
维护者速读
What changes
The card's step 1, measured: the record header's stage menu does draw in a drawer.
RecordDetailViewmounts the header's stage slot with noembeddedgate, and the new pin below finds the menu trigger, opens it and writes a Move in anembeddedview. The "split preview" no longer exists (NavigationOverlayModelistspage | drawer | new_window | none; the split face retired), so the embedded surfaces today are the list's record drawer (objectViewRecordOverlay'sRecordStackDrawer, andNavigationOverlayinObjectDataPage/InterfaceListPage) and the drawer a record page opens over itself (RecordPageDrawerHost). All mountRecordDetailViewwithembedded.Step 2, as ruled ("separate 'show a refresh button' from 're-read the record' instead of overloading
refresh"):@object-ui/react—RecordContextValuegainsreread, the record re-read with no affordance of its own;refreshis documented as what it is, the host's opt-in to the header's Refresh entry.rereadjoins the provider's memo dep list.@object-ui/plugin-detail— the stage path (useStageChange, shared by the header'sRecordStageMenuandrecord:path's stage press) re-reads after a move and after a 409 throughctx.reread, and throughctx.refreshwhen the host gives noreread(so a host that provides onlyrefreshbehaves as before).@object-ui/app-shell—RecordDetailViewhands the header's providerrereadon the page and in a drawer alike (the same'*'notice the Refresh entry publishes: a 409 is a write this client never saw);refreshstaysundefinedwhen embedded, so the drawer still draws no Refresh entry. On the record page the stage path's behaviour is byte-for-byte what it was.Tests
RecordDetailView.embeddedStageReread-36309in the shared harnessRecordDetailView.harness.test.tsx(the file's rule for newRecordDetailViewpins):ifMatchof read 2);× in a drawer, a 409 on Move re-reads the record …failing at thefindOnesecond-call assertion; both controls green. Green after.RecordStageMenu-35891.test.tsxandrecord-path.stageChange-28199.test.tsxhanded the stage pathrefresh={refresh}; they now handreread={refresh}(they only used the member the path called).RecordStageMenu-35891.test.tsx(#36309 a host with only refresh still re-reads; reread wins where both are given): a provider with onlyrefreshcalls it after a 409 on Move; CONTROL: with both,rereadis called andrefreshis not.RecordContext.valueShape.pin.test.tsxlistsreread(its compile-time half red the react type-check until it did, which is the pin working).Local readings on head 6e09b30 (round 1; round 2 readings are in the os-dev-report comment on the card)
pnpm --dir ui exec vitest run packages/react/src/context/__tests__/RecordContext.valueShape.pin.test.tsx packages/app-shell/src/views/RecordDetailView.harness.test.tsx packages/app-shell/src/views/RecordDetailView.headerRefresh.test.tsx packages/plugin-detail/src/__tests__/RecordStageMenu-35891.test.tsx packages/plugin-detail/src/renderers/__tests__/record-path.stageChange-28199.test.tsx packages/components/src/__tests__/page-header-refresh.test.tsx:Test Files 6 passed (6),Tests 160 passed (160).pnpm --filter @object-ui/react type-check: exit 0.@object-ui/plugin-detail,@object-ui/components,@object-ui/app-shelltype-check: exit 0 each (on 7341588, after a build of the app-shell dependency closure; the later head changes only a react test file).pnpm --dir ui exec vitest run scripts/:Test Files 172 passed | 2 skipped (174).dispatch-gates.mjs --commands): 38 run, all exit 0;--ran:38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED. Ratchets re-run on 6e09b30:check:type-check-coverage,check:type-check-debt,check:cross-package-test-inputs,check:test-source-alias,check:nul-bytes,check:published-files,check:undeclared-dep-imports,check:tier-file-adoption, all exit 0.1 failed | 2 passed; the failure is the drawer case at itsfindOnesecond-call assertion.Acceptance notes
RecordContextProviderhas two other producers,RecordDetailPanel(the board/calendar record panel) andrecordBinding; neither passedrefresh, so neither re-read after a stage write before, and neither draws a stage surface that writes (the panel draws the inline save bar, which takes its ownrefreshprop; the binding iscanEdit={false}). Unchanged.refreshkeeps its re-read (the stage path falls back to it);rereadis the added, optional member. Within this repoRecordDetailViewis the only producer of either.content/docs/frontend/and the react README document noRecordContextmember, so there is no docs page to update.overlap-check.mjsclean against feat(console): Change Owner on the record page, the list selection bar and the edit form (#35403) #36343 (sharesRecordDetailView.tsx) and feat(automation): the stage confirms name the flows a move would start (#35928) #36316 (shares the stage files; it adds norefreshcall there).Verification
Read first:
ui/packages/plugin-detail/src/renderers/recordPathStageChange.tsx(the fourrereadcalls),ui/packages/app-shell/src/views/RecordDetailView.tsx(headerRereadbesideheaderRefresh),ui/packages/react/src/context/RecordContext.tsx(the two members' contract).Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/views/RecordDetailView.harness.test.tsx -t embeddedStageReread— expect 3 passed.Browser screenshot: NOT MEASURED (no dev app driven in this run; the harness pin renders the real
RecordDetailViewembedded).🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA