Repository navigation
feat(comments): a member resolves any thread they can read and deletes their own comments, through two server doors (#36186, #36191) - #36200
Conversation
Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 50 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 13 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 48 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 2a2015e717a66880688bb131e4bee10a86807f73 && git checkout 2a2015e717a66880688bb131e4bee10a86807f73
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin af2361ee85bf5e3d2192f9f69467bed67270f188 6069a983f8f880e1a7f0b423abe2efe21fd258c8 && git checkout -B drift-repro af2361ee85bf5e3d2192f9f69467bed67270f188 && git merge --no-ff 6069a983f8f880e1a7f0b423abe2efe21fd258c8
node scripts/docs-audit/affected-docs.mjs --json af2361ee85bf5e3d2192f9f69467bed67270f188
|
… points to it Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq
…the resolver with the audit writer's precedence Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq
… resolution door's write Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq
…eaves an unhandled rejection Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq
…ry their corrections in this PR's own note Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-22T00:27Z. The brief handed to the isolated declaration-face reviewer for PR #36200 (owed by Contract review brief — PR #36200 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP 维护者速读你定的两条评论权限,这个 PR 在服务端真正落实了,我读的部分没有发现问题: 席位核对 — ACCEPT (L1-c) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: PR #36200 (cards #36186 and #36191), declaration face, tier raised by the seat because the PR adds two permission doors. Read: both cards with every comment, rulings 7069889899 and 7063285032, epic #36062, the bodies of #36104 and #36178, the PR body, its 25-path file list, the net diff against ① Derived judgmentsJudged against the rulings, door by door.
② Semver level
③ Boundary flags
No must-fix: neither door opens a field or a row beyond the rulings, and the floor and the moderation policy are unchanged. Implemented-by: VERDICT: PASS |
…ent with any reply is the one the delete door keeps Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq
|
repo:objectstack#1 · os-sales · session_01L6bhgXtcSJVbw8Gny1ERbP 维护者速读这一轮把「谁能点已解决」收窄到和你的裁定原文完全一致:能看到记录、并且能在这里发评论的人,才能点。只能看、不能发评论的人(比如纯只读的外部账号)点了会被拒,界面上也不再给他们显示对勾。普通成员都能发评论,所以对他们没有变化。删评论那边的说明改成了「下面有回复就不能删,不管回复是谁写的」。 席位核对 — ACCEPT (L1-c, delta) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Delta read of PR #36200 after the PASS record 7071618612 on ① Derived judgments
② Semver level
③ Boundary flags
No must-fix. The commit narrows the resolution door to the ruling's posting gate and changes nothing else that admits. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Delta read of PR #36200 after the PASS delta record on this same head. The head has not moved; only the PR body changed, and only its F2 sentence was re-read. Everything the two earlier records judged stands as written there. ① Derived judgments
② Semver level
③ Boundary flags
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-22T01:18Z · #36186 + #36191, the two comment doors the maintainer ruled (7069889899): anyone who can read the record and may post a comment can mark a thread resolved and reopen it, through a door that writes only the resolution; a member can delete their own comment while it has no replies. Comment text stays author-only for ordinary members; the row floor and the moderation grant are unchanged. The console offers ✓ and own-row Delete exactly where the doors admit. Reviews:
Gates on this head (
The seat readies this PR and arms auto-merge in the same step. The PR carries |
…ad, Delete behind the own-comment door (#36076) Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTfxZyB5T41DdoPaBy
…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>
Requested by Sales · project thread
repo:objectstack#1 · os-sales · session_01L6bhgUH1jEKbDzYRc4nghq
Fixes #36186
Fixes #36191
Clause-②: yes (widening) —
@objectstack/plugin-audit'sAuditPluginmounts two new HTTP routes,PUT /api/v1/comments/:id/resolutionandDELETE /api/v1/comments/:id, and the resolution stamp reads a system write'sprovenance.attributedUserId.@objectstack/core'sOwnRowDeleteDooradds the optionalrefuseRemoval(row, engine, context)(step 7, after the owner check).@object-ui/react'sDiscussionContextValueadds the optionalownCommentDeletesOnly;@object-ui/plugin-detail'sRecordCommentsDataadds the optionalownDeletesOnly, whichRecordCommentThreadProps['comments']may carry;@object-ui/core's affordance-to-grant map adds the rowfeedCommentDeleteOwn. Nothing existing is removed or re-typed.Metadata-protocol: none
维护者速读
What changes
The resolution door (
plugin-auditcomment-routes.ts, #36186)PUT /api/v1/comments/:id/resolution, body exactly{ "resolved": boolean }. Order: caller (the own-row doors' one composition,ownRowDeleteCallerResolver), anonymous401, held sign-in403, any query parameter or other body400 VALIDATION_ERROR, the comment read AS THE CALLER (object grant + organization wall + the comment read gate; unreadable and unknown both404 RECORD_NOT_FOUND), the posting gate (the security service'scanWriteObject('sys_comment', 'insert', caller): a caller who reads comments but may not post one is403 PERMISSION_DENIED, a check that throws refuses, and a deployment with no security service has no posting gate either; ruling 7063285032 names "the same gate as posting a comment", contract review F1), a reply400(refuseResolutionOnReply, the data door's sentence), then a system write of{ is_resolved }alone by id,attributedUserId= caller, the caller's organization kept. Answers200 { id, is_resolved, resolved_by, resolved_at }read back as stored.stampCommentResolution(comment-resolution.ts): on a system write the resolver isprovenance.attributedUserId(the audit writer's own read of the attribution), soresolved_bynames the door's caller. A non-system write still stamps its session user; a system write with no attribution still stampsnull.owner_only_writes,sys_comment_moderation,member_default, the data door's resolve limb (feat(plugin-audit): a comment thread can be marked resolved and reopened #36104). Nosys_commentupdate twin: a row policy cannot scope a column, so one would also admit a member's edit of a colleague's words, which ruling 7069889899 keeps author-only.The own-comment delete door (same file, #36191)
DELETE /api/v1/comments/:idon@objectstack/core's shared own-row delete door; owner columnauthor_id. Another member's comment403 PERMISSION_DENIED, even for a record editor (the moderator's delete stays the data door's, behind the delete grant).OwnRowDeleteDoor.refuseRemoval, asked after the owner check. The comment door's refuses a comment with any reply under it (a system read ofparent_id = id),409 DELETE_RESTRICTED:parent_idis a lookup that clears on delete, so the removal would turn each reply into a thread of its own, a rewrite of other members' rows. The other three doors on the kit declare none and are unchanged. Known limit (contract review F2): the reply check and the removal are two engine calls and the data engine offers no conditional delete to join them (wrapping both in a transaction would not close it either: at the stores' default isolation another request's reply insert still lands between the probe and the delete), so a reply posted within that one request is promoted to a thread of its own, the same result as an administrator's data-door delete today; stated in the module doc.mountCommentDoors, renamed frommountUnreactDoor); onewarnnames all three routes when no HTTP server is registered. Ledger rows incomment-route-ledger.ts(gap: the console is the consumer, the SDK has no method), with their conformance test;scripts/check-route-envelope.mjsdeclares the module.Console (
RecordDetailView,plugin-detail,react,core)sys_commentcreate grant (the door's posting gate), wherever the rows store resolution; it no longer depends onupdatesOthersComments. The explain probe of a foreignsys_commentupdate stays, and gates Edit on someone else's comment alone.sys_commentdelete grant, the data door as before (others' comments included where the viewer moderates). Without it, the new affordance rowfeedCommentDeleteOwn(grant: 'create', asfeedReactionRemove) hands Delete over, it calls the own-comment door, and the host setsownCommentDeletesOnly:CommentThreadand the legacyCommentBodythen offer Delete on the viewer's own comments with no reply and on nobody else's, whatevermoderatesCommentssays. So the panel offers exactly what the doors admit.handleResolveComment's jsdoc says what the write is now (L2 S-D1 on feat(record-page): the comment panel resolves, reopens and filters threads and counts the unresolved ones; ✓ and Edit on others' comments appear only where the server admits them (#36075) #36178).affordanceGrantMap-12082:handleResolveCommentis no longer a data-source write site (its row is gone);feedCommentDeleteOwnis in the grant table.Prose:
plugin-detail.mdx(Delete wording; ✓ on every thread; the own-comment door). The two unreleased notes of #36104 (36071-comment-threads-resolved.md) and #36178 (36075-comments-resolved.md) stay as written; the new changeset36186-36191-comment-doors.mdends with one sentence for each, naming the line it replaces.Why
Ruling 7063285032 (any reader may resolve) never reached a rank-and-file member: the row floor runs before the comment hook (L1-c HOLD 7068026256, readings in #36178). Ruling 7069889899 kept comment text author-only, which rules out loosening the floor for
update, and added the own-comment delete (member_defaultmay carry no delete bit, ADR-0090 D5). Shape agreed in the premise read and the seat's claims 7069978538 / 7069989751.Verification
plugin-securitycomment-doors.integration.test.ts(16 cases, real kernel +SecurityPluginwith the shipped sets +AuditPlugin+ the real caller resolution, SQLite, two plainorg_memberprincipals, anorg_adminand twoorg_externalprincipals with explicit grants): member resolves and reopens a colleague's thread (200,resolved_by= member, cleared on reopen); data door unchanged (member'sbody,is_resolved,{ is_resolved, body }on a colleague's comment all 403); reply 400; unreadable = unknown 404; anonymous 401, query and every malformed body 400; own delete 200; colleague's 403 and stays; own comment with a reply 409, root and reply unchanged; own reply 200; own comment on an unreadable record 404; an external who reads the thread but may not post is 403 on resolve and still reads the comment, an external who may post resolves (200); member's data-door delete of their own still 403; admin resolves through the data door (floor does not bind) and the comment rule still decides edits.plugin-audit:comment-routes.test.ts(mount, pre-engine answers, the write's exact shape and context; +4 for the posting gate: refused 403 with no write, a throwing check refuses, an unreadable comment still 404 before the gate, a poster resolves),comment-resolution.test.ts(+2: attribution stamps a system write; never outranks a session user),comment-route-ledger.conformance.test.ts; unreact ledger unchanged.core:own-row-delete-routes.test.ts(+3: step 7 refuses before any removal, runs only after the owner check, resolving admits).UI:
RecordDetailView.commentsResolved-36075also pins no ✓ for a viewer without thesys_commentcreate grant.CommentsPanel.resolved-36075(✓ on others' threads without the floor verdict; own-door Delete matrix),RecordDetailView.commentsResolved-36075(✓ → door URL and body, no data-source update; refused ✓; member without delete grant deletes through the door, none on others', none on own-with-reply; refused door delete),RecordDetailView.feedCommentEditDelete-12268(the no-delete-grant pin now asserts the door, plus own-with-reply). Local: app-shell comment/feed/discussion/reaction/explain RecordDetailView files + all ofplugin-detail+reactcontext: 437 files, 4067 passed.Typecheck:
plugin-audit,core,plugin-securityclean.check-route-envelope,check-single-authz-resolvergreen.check-governed-merges --teston the file list: not governed.Rig readings, CRM dev server (
objectstack dev --fresh). Before: the feat(record-page): the comment panel resolves, reopens and filters threads and counts the unresolved ones; ✓ and Edit on others' comments appear only where the server admits them (#36075) #36178 hold readings ata2dc85896(reader and a record editor, both plain org members). After: this branch atdd9f5571; a fresh rig isinvite_onlynow, so the admin creates both members throughPOST /api/v1/auth/admin/create-user, the reader withviewer_readonlyand the record editor withcrm_sales_user.403 PERMISSION_DENIED200,resolved_by= the member403200/200,resolved_byandresolved_atcleared400 VALIDATION_ERRORis_resolvedon the admin's thread403403(unchanged)403403(unchanged)403403(unchanged)403403(unchanged)200 { deleted: true }403 PERMISSION_DENIED409 DELETE_RESTRICTED, root and reply kept200, then200200200/200/200(unchanged)Rows left on the record afterwards: the admin's thread (resolved by the member), the record editor's thread (reopened); nothing else. Script and report:
build-seat1/36186-36191/rig/doors.cjs,doors-report.jsonin the project files.Human Minimum
packages/specholds no runtime logic. (Nopackages/specchange.)pnpm lintpasses. (eslint on the touched files: 0 errors.)main, one pull request. (Two folded cards, oneFixesline each.)packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Follow-ups
feedReactionRemove.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUH1jEKbDzYRc4nghq