Skip to content

fix(console): a stage move refused with a 409 in a record drawer re-reads the record - #36394

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-36309-embedded-stage-reread
Nov 22, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-36309-embedded-stage-reread

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread
repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA

Fixes #36309

Clause-②: yes (widening) — measured: the claim expected no; RecordContextValue gains the optional member reread (built dist/context/RecordContext.d.ts carries reread?: () => 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. RecordDetailView mounts the header's stage slot with no embedded gate, and the new pin below finds the menu trigger, opens it and writes a Move in an embedded view. The "split preview" no longer exists (NavigationOverlayMode lists page | drawer | new_window | none; the split face retired), so the embedded surfaces today are the list's record drawer (objectViewRecordOverlay's RecordStackDrawer, and NavigationOverlay in ObjectDataPage / InterfaceListPage) and the drawer a record page opens over itself (RecordPageDrawerHost). All mount RecordDetailView with embedded.

Step 2, as ruled ("separate 'show a refresh button' from 're-read the record' instead of overloading refresh"):

  • @object-ui/react — RecordContextValue gains reread, the record re-read with no affordance of its own; refresh is documented as what it is, the host's opt-in to the header's Refresh entry. reread joins the provider's memo dep list.
  • @object-ui/plugin-detail — the stage path (useStageChange, shared by the header's RecordStageMenu and record:path's stage press) re-reads after a move and after a 409 through ctx.reread, and through ctx.refresh when the host gives no reread (so a host that provides only refresh behaves as before).
  • @object-ui/app-shell — RecordDetailView hands the header's provider reread on the page and in a drawer alike (the same '*' notice the Refresh entry publishes: a 409 is a write this client never saw); refresh stays undefined when 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

  • New block RecordDetailView.embeddedStageReread-36309 in the shared harness RecordDetailView.harness.test.tsx (the file's rule for new RecordDetailView pins):
    • in a drawer, a 409 on Move re-reads the record and the second Move carries the new version (ifMatch of read 2);
    • CONTROL: the drawer draws no Refresh entry;
    • CONTROL: on the record page the same 409 re-reads, the second Move carries the new version, and the Refresh entry is still offered.
  • Red on the base before the fix (commit 4253dfd, test only): × in a drawer, a 409 on Move re-reads the record … failing at the findOne second-call assertion; both controls green. Green after.
  • Fixture spelling: RecordStageMenu-35891.test.tsx and record-path.stageChange-28199.test.tsx handed the stage path refresh={refresh}; they now hand reread={refresh} (they only used the member the path called).
  • New block in RecordStageMenu-35891.test.tsx (#36309 a host with only refresh still re-reads; reread wins where both are given): a provider with only refresh calls it after a 409 on Move; CONTROL: with both, reread is called and refresh is not.
  • RecordContext.valueShape.pin.test.tsx lists reread (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-shell type-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).
  • Derived gate families (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.
  • Red on the base (4253dfd, pin only): 1 failed | 2 passed; the failure is the drawer case at its findOne second-call assertion.

Acceptance notes

  • RecordContextProvider has two other producers, RecordDetailPanel (the board/calendar record panel) and recordBinding; neither passed refresh, 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 own refresh prop; the binding is canEdit={false}). Unchanged.
  • No narrowing: a host that passes only refresh keeps its re-read (the stage path falls back to it); reread is the added, optional member. Within this repo RecordDetailView is the only producer of either.
  • content/docs/frontend/ and the react README document no RecordContext member, so there is no docs page to update.
  • Overlap: overlap-check.mjs clean against feat(console): Change Owner on the record page, the list selection bar and the edit form (#35403) #36343 (shares RecordDetailView.tsx) and feat(automation): the stage confirms name the flows a move would start (#35928) #36316 (shares the stage files; it adds no refresh call there).

Verification

Read first: ui/packages/plugin-detail/src/renderers/recordPathStageChange.tsx (the four reread calls), ui/packages/app-shell/src/views/RecordDetailView.tsx (headerReread beside headerRefresh), 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 RecordDetailView embedded).

🤖 Generated with Claude Code

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
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 22, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA

Final head · 2026-11-22T09:58Z · 6e09b3005f86b036ce8a330a881fecf4b043423a — CI complete on this head with no failed suite (os-dev-report 7077254463). The area will not push again unless a review asks; a clean main sync before landing is the area's.
Review owed: L1 (l1-review-checklist.md, L1-d, requested through the seat) at this head, plus the Clause-②: yes (widening) declaration review at TIER_DEFAULT: @object-ui/react's exported RecordContextValue gains optional reread (claim amendment 7077275434 on #36309). Ask 1 measured: the header stage menu draws in the list record drawer and the record page's own drawer; the split preview no longer exists.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT · head 6e09b3005f86b036ce8a330a881fecf4b043423a · 2026-11-22T10:09Z

维护者速读

  • 用户能看到什么变化:在记录抽屉里(列表打开的抽屉,或记录页叠开的抽屉)移动阶段时,如果被别人先改了而收到 409,现在会重新读一遍记录,第二次「移动」就带上最新的版本号,不会再被同样拒绝一次。抽屉里仍然没有「刷新」菜单项。
  • 为什么做:卡 Stage menu in a drawer or the split preview: after a 409 the record is not re-read, so a second Move sends the same stale version #36309。原来阶段菜单在 409 后调用的是 refresh,而记录页在抽屉里故意不提供 refresh(为了不画刷新项),所以抽屉里永远不会重读。
  • 出错会怎样:最多是重读多发一次或没发,不影响已保存的数据,可以整体撤回。记录页上的行为不变。
  • 要你做什么:无。
  • 席位意见:L1 ACCEPT。Clause-②: yes (widening),RecordContextValue 加了一个可选成员 reread,声明面的 L2 由席位在跑;非受管,由记录区落地。

席位核对

  • 形态:l1-face --pr 36394 CLEAN;draft、base main、Fixes #36309。卡第 1 步要求测量:正文测得阶段菜单在抽屉里确实会画出来(RecordDetailView 画头部阶段槽时没有 embedded 判断);「分屏预览」已经不存在,NavigationOverlayMode 只剩 page | drawer | new_window | none。卡第 2 步做了,两条钉也有:抽屉里 409 后重读并且第二次带上新版本;对照是抽屉里没有刷新项。所以用 Fixes 是对的。改动 8 个文件,+216 −13;check-governed-merges 判定 NOT governed,229 行。
  • 实现读法:refresh 现在只代表「宿主要不要在头部画刷新项」,抽屉里仍然不传;新的 reread 只负责重读,记录页上和抽屉里都提供,值就是同一个 handleManualRefresh,发 '*' 范围的通知,和刷新项发的一样。useStageChange 里四处 ctx?.refresh?.() 都换成了 ctx?.reread?.()(移动成功后、409 后、补填对话框 409 后、补填完成后),头部阶段菜单和 record:path 的阶段按钮共用这一段。我在 plugin-detail、react、components 里搜了还在读 RecordContext.refresh 的地方,只剩 page:header 用它来决定画不画刷新项(containers.tsx:3155),没有留下别的旧调用。RecordContextProvider 的 memo 依赖里也加上了 value.reread。
  • 给 L2 的一点:changeset 最后一句写明「只传 refresh 的宿主,现在只会画出刷新项,阶段组件不会再调用它」。对在 Console 以外挂 RecordContextProvider 的宿主来说,这是 refresh 的调用方少了一个,不只是加了一个成员。是否要在 Clause-② 里按 semantic 记,请 L2 判断,我这里不改判。
  • changeset 逐句核:三段都和 diff 一致。
  • 测试证据:harness 里新增一个 describe,共 3 条:抽屉里 409 重读并带新版本、抽屉里没有刷新项(对照)、记录页上同样重读且保留刷新项(对照)。dev 先在 base 上单独提交了测试(4253dfd),结果 1 红 2 绿,红的正是抽屉那条,修复后转绿。RecordContext.valueShape.pin 列入了 reread;两个 plugin-detail 测试夹具从 refresh 改写成 reread。这些用例我没有在本地重跑,读的是报告和 CI。
  • 门禁 check-runs @ 6e09b300:45 success · 13 expected skip · 0 failed · 0 pending;mergeable_state clean。
  • 接受的偏差:浏览器截图标为 NOT MEASURED,卡上没有要求截图,我照收。
  • 范围外去向:无。
  • 落地条款:非受管,229 行 ≤ 3000;等席位的 L2 PASS,之后由 f7-record ready + auto-merge。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 6e09b3005f86b036ce8a330a881fecf4b043423a
Local-runs: none

Inputs read: card #36309 (body, triage 7075085970, claim 7075932398, os-dev-report 7077254463, claim amendment 7077275434), PR #36394 (body, 8 files, net diff against main at merge base b3bcfefcb87), and the check-runs on the head: every one concluded success or skipped, none pending (Check Changeset, Type Check UI, Test UI 1 to 16 of 16, Lint UI, Governed Surface Queue Guard, PR-body guards and the rest). Face confirmed: the diff's paths decide no schema or rules face, so the changeset's Clause-②: yes (widening) line routes it to the declaration face.

① Derived judgments

  1. @object-ui/react RecordContextValue (and so RecordContextProviderProps) gains an optional reread, the same function type as refresh, and reread joins the provider's memo dep list. Widening of the public type surface: right. Nothing is removed or renamed, and refresh keeps its type.
  2. @object-ui/react RecordContextValue.refresh jsdoc moves from "Re-fetch the record from the source" to "the host's opt-in to the header's Refresh entry ... not the way a renderer re-reads the record". The type is unchanged, but the documented meaning narrows. page:header (components/src/renderers/layout/containers.tsx:3155) already read it as the affordance opt-in on main, so for that reader nothing changes: right.
  3. @object-ui/plugin-detail useStageChange (renderers/recordPathStageChange.tsx, four sites) now calls ctx?.reread?.() where main called ctx?.refresh?.(), after a successful Move and after a 409 CONCURRENT_UPDATE. It is shared by the exported RecordStageMenu (plugin-detail/src/index.tsx:107) and the registered record:path renderer. Wrong as declared, must-fix. On main, useStageChange was the only published reader of RecordContext.refresh as a re-read; git grep on both trees finds no other. A host that mounts the published RecordContextProvider with refresh only loses both re-reads. That host pattern is documented ("A host that mounts RecordContextProvider itself", plugin-detail/README.md). After a 409 its page now repeats exactly the defect this card fixes: the dialog keeps the old row, and the second Move sends the stale ifMatch. After a successful Move, the host's record is no longer re-read either. The changeset says so itself ("passing only refresh now draws the Refresh entry without the stage surfaces calling it"). That is a behaviour taken away from a published consumer, so it is a narrowing, and the Clause-②: line and the changeset carry no (narrowing) arm, no BREAKING banner and no ADR-0087 disposition. Remedy, either one:
    • (a) recommended, which keeps the declaration true: in useStageChange, resolve the re-read as ctx?.reread ?? ctx?.refresh once and call that at the four sites. The card's ruled split holds. RecordDetailView provides reread on the page and in a drawer, and leaves refresh undefined in a drawer, so the drawer still draws no Refresh entry and still re-reads. Only a host that predates reread takes the fallback, and it gets exactly what it got on main. Add one pin (a provider with refresh only still re-reads after a 409), reword the refresh jsdoc and the changeset's last paragraph to match, and the line stays Clause-②: yes (widening).
    • (b) keep the code and re-declare the narrowing. That is BREAKING, it needs an ADR-0087 marker in the changeset, and it moves the review to the narrowing face at CONTRACT_REVIEW_TIER. This record cannot accept it at TIER_DEFAULT.
  4. @object-ui/app-shell RecordDetailView hands the header provider reread={headerReread} (= handleManualRefresh, the same '*' notice as the Refresh entry) on the page and in a drawer, while refresh={headerRefresh} stays undefined when embedded. Right. On the record page the stage path calls the same function it called before. The package is private: true, so nothing is published from it.
  5. The fixture respelling of refresh={refresh} to reread={refresh} in RecordStageMenu-35891.test.tsx (two sites) and record-path.stageChange-28199.test.tsx (two sites) is right for the code as written: those fixtures exercised the member the stage path calls. It is also the tell for item 3. Each fixture is a host that passed refresh alone and had to change to keep its behaviour. Under remedy (a) the new pin covers the old spelling.
  6. Value-shape pin RecordContext.valueShape.pin.test.tsx: reread is listed in MEMO_DEP_KEYS, BASE and CHANGED. That covers the new member in all three halves: the compile-time Equal over keyof RecordContextValue assertion, the "exactly the declared keys" runtime check, and the re-memoizes when reread changes case. Right. The dev's report records the react type-check going red (TS2344) before the listing, which is the pin working.
  7. The behaviour pin RecordDetailView.embeddedStageReread-36309 (shared harness): the drawer case asserts the second findOne and the second Move's ifMatch of read 2, and is reported red on base commit 4253dfd. The page CONTROL keeps the Refresh entry. The drawer CONTROL checks for no Refresh entry. Right.
  8. SQL push-down: no data-access change. reread drives the same single-record findOne the Refresh entry already drives, with no new id materialisation and no in-app join. Nothing to find.

② Semver level

  • Changeset .changeset/36309-embedded-stage-reread.md: patch on @object-ui/react, @object-ui/plugin-detail and @object-ui/app-shell. Metadata-protocol: none is right: RecordContextValue is a host TypeScript API, and no metadata key, value or type changes. A non-protocol change ships patch by rule, so the level matches the kind. A private app-shell entry has precedent on main (for example 33865-package-create-toast.md). Check Changeset is green.
  • Clause-②: line: yes (widening) is right for the type surface, and the claim amendment 7077275434 matches it. It is incomplete for the behaviour (① item 3). It stands as written only once remedy (a) lands. Under remedy (b) it must carry the (narrowing) arm, with the BREAKING banner, the migration (passing refresh only becomes passing reread too) and the ADR-0087 disposition.

③ Boundary flags

  • open_questions: empty.
  • Deviation (1), Clause-② measured yes (widening) where the claim expected no: answered. The claim's own condition provided for this, and amendment 7077275434 is on the card. It is still short of the narrowing in ① item 3.
  • Deviation (2), the overlap check first ran after the pin-only push: no effect. Every later push ran it, and the head is clean against feat(console): Change Owner on the record page, the list selection bar and the edit form (#35403) #36343 and feat(automation): the stage confirms name the flows a move would start (#35928) #36316.
  • Deviation (3), narrowed local build: answered by the head's check-runs, all green.
  • Out-of-scope note: RecordDetailPanel and recordBinding pass neither refresh nor reread. Answered: neither draws a stage surface that writes, so nothing changes for them. Remedy (a) leaves them where they are.
  • Card ask 1 (does the menu draw embedded): measured yes by the drawer pin. The "split preview" no longer exists (NavigationOverlayMode is page | drawer | new_window | none, components/src/custom/navigation-overlay.tsx:134). Answered.
  • Nit, no effect on correctness: the drawer CONTROL opens the More actions trigger only if (trigger). With no trigger, the data-page-refresh absence holds trivially. It is still true to the intent, since a Refresh entry with no trigger cannot be reached. If a later head keeps it, carry on a follow-up card.
  • Escalation: none needed if remedy (a) lands. If the seat or the dev prefers remedy (b), the PR moves to the narrowing face, and its record is owed at CONTRACT_REVIEW_TIER, not by this seat.

Implemented-by: claude/issue-36309-embedded-stage-reread
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA

Delta head · 2026-11-22T10:39Z · 4afc7fb7e13aab7a79464eb6f4b65f2d12035335. CI is complete on this head: 47 success, 15 expected skip, 0 failed, mergeable_state clean (os-dev-report 7077879511 on #36309).
Delta since 6e09b300: remedy (a) of L2 FAIL 7077635194. useStageChange re-reads through one helper, (ctx?.reread ?? ctx?.refresh)?.(), at all four former sites. A new pin shows that a provider with refresh alone still re-reads after a 409; its control shows that a provider with both calls reread, not refresh. The ablation with the ?? ctx?.refresh fallback removed reds exactly that pin. The refresh / reread jsdoc and the changeset's last paragraph now say a refresh-only host keeps its behaviour. The PR body was patched to match. Clause-②: yes (widening) stands. The diff now touches 4 files beyond the 6e09b30 tree.
Review owed: the seat's delta L2 at TIER_DEFAULT and L1-d's delta at this head, both requested through the seat.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT(增量)· head 4afc7fb7e13aab7a79464eb6f4b65f2d12035335 · 2026-11-22T10:42Z

维护者速读

  • 用户能看到什么变化:和上一轮一样,在列表的侧边抽屉里移动记录阶段后,抽屉里的记录会重新读取;遇到别人同时改过(409)时也会重读,第二次操作按最新数据判断。本轮补上:只提供「刷新」的宿主照旧会重读,行为不变。
  • 为什么做:卡 Stage menu in a drawer or the split preview: after a 409 the record is not re-read, so a second Move sends the same stale version #36309;本轮执行席位 L2 7077635194 的补救方案 (a)。
  • 出错会怎样:最多是阶段移动后记录没有自动重读,需要手动刷新;不碰数据,可以撤回。
  • 要你做什么:无。
  • 席位意见:ACCEPT。上一轮 L2 指出的未声明收窄已消除,Clause-②: yes (widening) 现在属实。

席位核对(增量,只核 6e09b300..4afc7fb7 加 CI)

  • 本轮的 diff:两个提交,4 个文件 +60 −10:recordPathStageChange.tsx、RecordContext.tsx 的说明、changeset 最后一段、RecordStageMenu-35891.test.tsx 新增两条用例。
  • 补救已落实:useStageChange 里四处 ctx?.reread?.() 都换成一个辅助函数 (ctx?.reread ?? ctx?.refresh)?.(),分别在移动成功后、直接移动遇到 409 后、带字段的移动遇到 409 后、对话框关闭后。我在 head 上 grep 过,渲染器里没有别处再直接调 reread,所以只传 refresh 的宿主在每条路径上都照旧重读,上一轮那条「refresh 少了一个调用方」的收窄不存在了。两个都传时用 reread,Console 的抽屉不会因此画出刷新项。
  • 文本逐句核:changeset 新的最后一段(只传 refresh 的宿主行为不变,有 reread 用 reread,否则用 refresh;无需迁移;只想重读、不要刷新项的宿主只传 reread)与代码一致;RecordContextValue.refresh / reread 两段 jsdoc 也一致。Clause-②: yes (widening)(新增可选成员 reread)现在没有收窄的部分,声明属实。
  • 测试证据:新的「只有 refresh」用例:409 后 refresh 被调用 1 次;对照用例:两个都给时调用 reread,refresh 没有被调用。f7-record 报告的消融:去掉 ?? ctx?.refresh 后正好挂这一条。我没有在本地重跑,读的是报告和 CI。
  • nit:recordPathStageChange.tsx:62 那行说明改完后比周围长出一截,没有重新换行,不影响任何东西。
  • CI @ 4afc7fb7:47 success · 15 expected skip · 0 failed · 0 pending;mergeable_state clean。
  • 落地条款:非受管;席位的增量 L2 PASS 后,由记录区 ready + auto-merge。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 4afc7fb7e13aab7a79464eb6f4b65f2d12035335
Local-runs: none

This is a delta record. It follows FAIL 7077635194 at 6e09b300, and it reads the diff 6e09b300..4afc7fb7 (commits cb5d537980f and 4afc7fb7e13, merge base with main still b3bcfefcb87). It also reads the PR body as it now stands and the head comment 7077942968. Check-runs on this head: 47 success, 15 skipped, none failed or pending.

M1: closed

① Derived judgments

  1. M1, the undeclared narrowing for hosts that pass refresh only, is closed. In useStageChange (plugin-detail/src/renderers/recordPathStageChange.tsx), one helper rereadRecord runs (ctx?.reread ?? ctx?.refresh)?.(). All four former sites call it: after a Move, after a 409 on the plain path, after a 409 on the collect-fields path, and after the collect-fields Move. git diff finds no direct ctx?.reread call left.
    • A host that passes only refresh now gets exactly what it got on main. So the published RecordStageMenu and record:path lose nothing at the consumer, and the change is a widening only.
    • The card's ruled split still holds. RecordDetailView is untouched in this delta. It provides reread on the page and in a drawer, and leaves refresh undefined in a drawer, so the drawer re-reads through reread and draws no Refresh entry.
    • On the record page both members are the same handleManualRefresh, so nothing changes there either.
  2. New pin #36309 a host with only refresh still re-reads; reread wins where both are given in RecordStageMenu-35891.test.tsx, placed before the keyboard block:
    • With refresh only, a 409 on Move calls refresh.
    • CONTROL: with both members, a 409 calls reread and not refresh.
    • This covers both arms of the fallback. The dev reports that removing ?? ctx?.refresh reds the first case. That comes from the dev's comment and was not re-run here.
  3. Jsdoc: refresh now says it is the Refresh-entry opt-in and also re-reads the record when no reread is provided. reread names the fallback. The documented meaning of refresh no longer narrows, and the earlier ① item 2 concern goes with M1.
  4. The changeset's last paragraph now reads "keeps its behaviour ... Nothing to migrate". The PR body is patched the same way (lines 24, 35 and 51). Both match the code.
  5. The fixture respelling to reread={refresh} from the prior head is unchanged. It is still right: those fixtures now take the reread arm, and the new pin covers the refresh arm.
  6. Nothing else in the delta touches the public surface. The value-shape pin stays as judged at 6e09b300: it covers reread, and no key was added since.
  7. SQL push-down: no data-access change. Nothing to find.

② Semver level

  • The changeset is unchanged in its frontmatter: patch on @object-ui/react, @object-ui/plugin-detail and @object-ui/app-shell, with Metadata-protocol: none. Right for a non-protocol change.
  • Clause-②: yes (widening) in the PR body and the changeset is now complete and right. The type surface gains the optional reread, and with the fallback no published behaviour is taken away. No (narrowing) arm, BREAKING banner or ADR-0087 disposition is owed. The claim amendment 7077275434 still matches.

③ Boundary flags

  • Nit carried from the prior record: the drawer CONTROL in RecordDetailView.harness.test.tsx opens More actions only if (trigger). This delta does not change it.
    • Judged: the absence of data-page-refresh is still the right assertion. With no trigger, no Refresh entry can be reached. With a trigger, the menu is opened before the check. So the control cannot pass while a reachable Refresh entry exists.
    • It does not say which of the two cases it ran, which makes it weaker evidence than it looks. Non-blocking: carry on a follow-up card. The fix is to assert the trigger exists in the drawer, or to assert its absence, so the branch is pinned.
  • Nit, no effect on correctness: the new jsdoc line in recordPathStageChange.tsx (about line 62) runs past the file's wrap width. Cosmetic.
  • No new dev flags. The delta raises no open_questions and no deviations beyond those answered at 6e09b300.
  • Escalation: none. With M1 closed, the PR stays on the declaration face at TIER_DEFAULT.

Implemented-by: claude/issue-36309-embedded-stage-reread
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Landing (seat 7, 2026-11-22T10:45Z): head 4afc7fb7e13aab7a79464eb6f4b65f2d12035335 · L1 ACCEPT 7077974247 (L1-d, delta) · L2 PASS 7077986239 (TIER_DEFAULT, declaration face, delta after FAIL 7077635194: M1 closed by the reread ?? refresh fallback, both arms pinned) · check-governed-merges --pr 36394: NOT governed, 279 changed lines ≤ 3000 · CI on the head: 47 success, 15 skipped, none failed. → pr_ready + automerge_enable (merge queue).
Carried to a follow-up card the seat files: the drawer-control test in RecordDetailView.harness.test.tsx should assert whether the "More actions" button is present, and one new jsdoc line in recordPathStageChange.tsx runs to 124 characters.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 22, 2026 10:46
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit a10422d Nov 22, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36309-embedded-stage-reread branch November 22, 2026 11:28
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…; 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 的预览)。
- 出错的话,影响的是预览里看不到评论;评论数据不动,整页照常能看能写,撤回这次改动即可恢复原样。
- 无


![右侧预览头部:没有评论按钮](https://github.com/objectstack-ai/objectstack/blob/37428306c12e207770c8ebbfe7515db7e257a4a1/36225-preview-header-crop.png?raw=true)

## 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stage menu in a drawer or the split preview: after a 409 the record is not re-read, so a second Move sends the same stale version

2 participants