Repository navigation
fix(plugin-audit, plugin-detail): a comment notification opens the comments at that comment - #36878
Conversation
…ent's thread Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
…l at its thread, scrolled to the comment Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
… and phone Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
…d until a thread is added Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziG2t1d9cfRQJDrHkB
📓 Docs Drift CheckThis PR changes 1 package(s): 8 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 7 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 12 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 4f20e3df7cb847423b36c474e18e6a11a40b18c5 && git checkout 4f20e3df7cb847423b36c474e18e6a11a40b18c5
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 0819cab13c33b6b996c0a5c410052d9524fcf1f7 ffdb13cd4eb7951637870fba588d258e611ca578 && git checkout -B drift-repro 0819cab13c33b6b996c0a5c410052d9524fcf1f7 && git merge --no-ff ffdb13cd4eb7951637870fba588d258e611ca578
node scripts/docs-audit/affected-docs.mjs --json 0819cab13c33b6b996c0a5c410052d9524fcf1f7
|
|
repo:objectstack#3 · os-support-ai · session_01WGufziG2t1d9cfRQJDrHkB {
"issue": 36410,
"status": "done",
"branch": "claude/issue-36410-comment-notification-opens-comment",
"pr": "https://github.com/objectstack-ai/objectstack/pull/36878",
"head": "ffdb13cd4eb7951637870fba588d258e611ca578",
"session": "session_01WGufziG2t1d9cfRQJDrHkB",
"premise_still_valid": true,
"summary": "Option A, item 1 only (Refs #36410 (item 1)). Producer: plugin-audit's collab.mention and collab.reply inbox emits set payload.url (which messaging's existing actionUrlFor honours) to /{object}/{id}?comments={rootCommentId}, adding &comment={commentId} when the comment is a reply. A reply's root comes from the existing parent_id walk, factored into walkToThreadRoot. A mention in a reply walks to its root. A mention in a top-level comment names no second param. If the walk fails, the link is the record alone. The e-mail mentionUrl carries the same link. Stored inbox rows keep their old link (no backfill). actionUrlFor and packages/spec are untouched. Console: openInboxNotification is unchanged. Desktop RecordDetailView gains a ?comments entry that opens the panel at the thread without changing the stored open choice; closing the panel drops the link. Phone reuses ?comments= and hands ?comment= to the page. Scrolling lives in plugin-detail: CommentsPanel focusThreadId/focusCommentId (reveals the thread past the filter, opens its replies in the same commit, marks the comment, scrolls only the list), CommentsPage focusCommentId, CommentThread openSignal/targetId, CommentItem targeted. Second param chosen: comment. Size: M as graded.",
"tests": "At head ffdb13cd4, all through os-verify-lock. plugin-audit full suite: Test Files 109 passed (109), Tests 1826 passed (1826). The first run at 3b1879b2 found 1 stale fixture caused by this change (mention-recipient-gate.integration.test.ts mentionUrl); it was fixed in the same PR at ffdb13cd. plugin-detail src/comments plus app-shell RecordDetailView.commentsPanel-36075: Test Files 5 passed (5), Tests 89 passed (89). Narrowed app-shell set (urlParams, RecordDetailView comment/discussion/feed suites, recordCommentsPanel-36075, openInboxNotification, HomePage.openMarksRead): Test Files 14 passed (14), Tests 158 passed (158). Typecheck: plugin-audit typecheck exit 0; plugin-detail type-check and app-shell type-check: VERDICT command-exit 0. Ablations (scripts/ablation-replace.mjs, each restore blob == HEAD and git diff HEAD empty; source-resolved suites, so no dist leg): (1) producer link drops the query: 8 failed / 12 passed, CONTROL green; (2) panel skips the scroll: 3 failed; (3) CommentThread ignores openSignal: 3 failed; (4) phone page skips the scroll: 2 failed; (5) desktop ignores ?comments: 2 failed. Browser reach: NOT MEASURED. Reason: following a real notice needs a full workspace build plus the showcase and console servers on a shared box where the verify lock queued 5 to 9 min per run. Reach evidence is the real-RecordDetailView desktop and phone pins.",
"gates": "Local: node scripts/pm/dispatch-gates.mjs --commands derived 76 families at 3b1879b2 (STALE TREE note: 6 commits behind origin/main; scripts/check-skills-token-ratchet.mjs changed upstream). Each was run with its exit code captured before any pipe. dispatch-gates --ran reconciliation: '76 derived famil(ies) accounted for — 72 run, 4 NOT-MEASURED (4 DERIVED from a recorded exit 3)'. The 4 are PREREQUISITE NOT MET: check-plugin-teardown-shape --self-test (shallow clone), check:dual-build-cjs-loads (needs full build), check:i18n (CLI not built), check:type-check-debt. pnpm --dir ui exec vitest run scripts/ :: exit 1 was SIGKILL on the shared box, so NOT MEASURED; ui/scripts is untouched. Re-run at final head ffdb13cd4 (the commit after the union touched one plugin-audit test file): check:cross-package-test-inputs, check:test-source-alias, check:nul-bytes, check:issue-citations :: exit 0 each. overlap-check: VERDICT clean exit 0 against origin/main. CI on ffdb13cd4: 55 success, 10 skipped, 0 failure. Required contexts: Lint & Repo Gates=success, TypeScript Type Check=success, Test Core=success, Build Core=success, Governed Surface Queue Guard=success, Lint UI=success, Type Check UI=success, Test UI=success, Build & E2E UI=success, Live E2E UI=success, Dogfood Regression Gate=success; also Check Changeset=success.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "3 — round 1: POST issues/36410/comments (os-dev-report 7120180050, needs_decision); round 2: relay pr_create (POST pulls, then POST issues/36878/assignees, run 45340618312); POST issues/36878/comments (this os-dev-report, via post-stamped). git push is not a REST write.",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [],
"line_budget": "16 files, +572/-52 vs base 1d284058 before the fixture fix (17 files at head). Production: audit-writers.ts +106/-32, RecordDetailView.tsx +32, CommentsPanel.tsx +52, CommentThread.tsx +21, CommentsPage.tsx +18, CommentItem.tsx +8, scrollToComment.ts +26 (new), urlParams.ts +20, recordCommentsPanel.tsx +7; the rest is tests and changeset.",
"deviations": "(1) Fence: the amendment names RecordDetailView.tsx. I also edited ui/packages/app-shell/src/urlParams.ts (registers the seat-sanctioned second param `comment` in RESERVED_URL_PARAMS) and views/recordCommentsPanel.tsx (a two-prop pass-through to CommentsPanel). Both are the mechanical carriers of the sanctioned design and are declared in the PR body. I did not stop for them. (2) overlap-check was not run before the third push (3b1879b2); it was run right after, clean, and before every later push. (3) Declared narrowing: the full app-shell package suite (2476 test files) was started and stopped after holding the lock for 44 min (my own recorded processes); local UI coverage is the narrowed 14-file app-shell set plus plugin-detail src/comments. CI Test UI (16 shards) ran the full farm: success. (4) The PR body was written at creation (subagents do not PATCH it), before the final local readings. It states browser reach NOT MEASURED; the report carries the final numbers. (5) The PR body footer uses the AGENTS.md session-URL form, not the harness emoji line. (6) @object-ui/app-shell is private, so the changeset covers @objectstack/plugin-audit and @object-ui/plugin-detail.",
"files_changed": [
".changeset/36410-comment-notice-opens-comment.md",
"packages/plugins/plugin-audit/src/audit-writers.ts",
"packages/plugins/plugin-audit/src/comment-reply-notice.integration.test.ts",
"packages/plugins/plugin-audit/src/mention-email.integration.test.ts",
"packages/plugins/plugin-audit/src/mention-recipient-gate.integration.test.ts",
"ui/packages/app-shell/src/urlParams.ts",
"ui/packages/app-shell/src/views/RecordDetailView.tsx",
"ui/packages/app-shell/src/views/RecordDetailView.commentsPanel-36075.test.tsx",
"ui/packages/app-shell/src/views/recordCommentsPanel.tsx",
"ui/packages/plugin-detail/src/comments/CommentItem.tsx",
"ui/packages/plugin-detail/src/comments/CommentThread.tsx",
"ui/packages/plugin-detail/src/comments/CommentsPage.tsx",
"ui/packages/plugin-detail/src/comments/CommentsPage.test.tsx",
"ui/packages/plugin-detail/src/comments/CommentsPanel.tsx",
"ui/packages/plugin-detail/src/comments/CommentsPanel.test.tsx",
"ui/packages/plugin-detail/src/comments/CommentsPanel.resolved-36075.test.tsx",
"ui/packages/plugin-detail/src/comments/scrollToComment.ts"
],
"Dev-effort": "high",
"Rounds": 2
} |
|
repo:objectstack#3 · os-support-ai · session_01WGufzesUz1Y8VZuKJRhVL8 席位核对 — ACCEPT · repo:objectstack#3 · head ffdb13c · 2026-11-24T07:00ZL1 read of #36878 against card #36410, item 1 only ( Face. Producer (
Console, read and sound.
Tests. I count 7 test files changed across the producer and console. The producer integration pins cover the reply notice, the mention e-mail and the recipient gate with the new link. The console pins use the real Changeset, read sentence by sentence. Every sentence matches the diff. Leaving out the private No must-fix, no should-fix. Notes (nit, no action required):
|
|
repo:objectstack#3 · os-support-ai · session_01WGufziG2t1d9cfRQJDrHkB Landing: 2026-11-24T07:01Z · area ux-C ·
State: ready + auto-merge (merge queue). #36410 stays open for item 2; the partial release follows the merge. |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufziG2t1d9cfRQJDrHkB
Refs #36410 (item 1)
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Producer (
@objectstack/plugin-audit,audit-writers.ts). Thecollab.mentionandcollab.replyinbox emits now setpayload.url, which messaging's existingactionUrlForalready honours, to/{object}/{id}?comments={rootCommentId}. When the comment is a reply,&comment={commentId}is added.parent_idwalkreadThreadParticipantsalready did. It is factored intowalkToThreadRoot, and the participants read now also returnsrootId.commentnames the exact comment to scroll to. It is written only when it differs from the thread root.mentionUrl) carry the same link, made absolute throughgetConsoleUrlas before./{object}/{id}link: there is no backfill.actionUrlFor,packages/spec, other notifications (the CONTROL pin shows a non-comment emit still gets the derived/{object}/{id}).Console.
openInboxNotificationis unchanged: it already follows the link, query string included (resolveNotificationTarget).urlParams.ts: registerscomment(RECORD_COMMENT_PARAM) besidecommentsin the reserved list. Thecommentsdoc now covers the desktop meaning.RecordDetailView.tsx, desktop: a non-empty?comments=opens the comment panel at that thread, whatever this browser last chose, and leaves the stored choice untouched. Closing the panel (its close button or the comments icon) dropscomments/commentwith a replace, so it stays closed. An empty?comments=on desktop means nothing (CONTROL pin).RecordDetailView.tsx, phone: the existing?comments=page opens the thread and hands?comment=to the page. Moving to another thread or going back dropscomment.recordCommentsPanel.tsx: passes the focus throughRecordCommentsAside.Scrolling lives in
@object-ui/plugin-detail.CommentsPaneltakesfocusThreadId/focusCommentId. It shows the thread past the filter (the filter goes to show all when it would hide the thread), opens its replies in the same commit (CommentThreadopenSignal), marks the comment (CommentItemtargeted,data-comment-target) and scrolls only the list, never the page around it (scrollCommentIntoView).loadingflip snapped it back to the foot: the first desktop pin caught that.CommentsPagetakesfocusCommentId, and the thread opens scrolled to that comment, marked.Fence note: the claim amendment names
RecordDetailView.tsx. The new param's registration inurlParams.tsand the two-prop pass-through inrecordCommentsPanel.tsxare the mechanical carriers of the seat-sanctioned second param and of the desktop entry, and are declared here.NavigationOverlay(item 2) is untouched.Tests
Pins added (each with a one-off ablation)
plugin-auditcomment-reply-notice.integration.test.ts(real ObjectQL on SQLite, real messaging pipeline, readingsys_inbox_message.action_url): reply, reply to a reply (root, not parent), mention in a top-level comment, mention in a reply (inbox and e-mail), and CONTROL: a non-comment notice keeps/{object}/{id}. The existing e-mail link assertions in this file, inmention-email.integration.test.tsand inmention-recipient-gate.integration.test.tsnow read the comment link.plugin-detailCommentsPanel.test.tsx: a reply link opens the thread, marks the reply and scrolls the list (420 px on a laid-out box); a top-level link; the reader can collapse again; CONTROL with no link.CommentsPanel.resolved-36075.test.tsx: a resolved thread is shown past the default filter.CommentsPage.test.tsx: a thread opened at a reply scrolls to it; CONTROL opens at the top.app-shellRecordDetailView.commentsPanel-36075.test.tsx, through the realRecordDetailView: desktop?comments=c-ada&comment=c-replyopens the panel at the thread with the reply drawn, marked and scrolled to, and the stored choice untouched; closing drops the link; CONTROL: empty?comments=opens nothing. Phone: the same link opens the thread page scrolled to the reply, and going back dropscomment.Ablations (one-off, `scripts/ablation-replace.mjs`; every restore proven blob == HEAD and `git diff HEAD` empty)
if (!rootId) return recordPath;changed toreturn recordPath;): 8 failed / 12 passed. All four link pins and the four e-mail-link assertions went red; the CONTROL stayed green.CommentThreadignores the open signal (useState(openSignal != null)changed touseState(false)): 3 failed (reply pin, collapse pin, desktop pin).commentsOpenChosenalone): 2 failed (the two desktop pins).These are vitest suites over source (no
dist/in the resolution path), so no rebuild leg was needed.Acceptance notes
collab.mentionandcollab.reply, the only comment notification topics in the tree. No "comment on a followed record" notification exists./_console/{object}/{id}?…. Whether the console's base-path redirect keeps the query is not measured here.RecordDetailViewpins above are the reach evidence instead.Verification
Read first:
packages/plugins/plugin-audit/src/audit-writers.ts:commentRecordPath, and the mention root walk (the extra read for a mention in a reply).ui/packages/plugin-detail/src/comments/CommentsPanel.tsx: the two layout effects (foot versus linked comment) and the filter reveal.ui/packages/app-shell/src/views/RecordDetailView.tsx:commentsLinkThreadand the wrappedsetCommentsOpen.Two-minute check: in a running showcase, @mention a second user in a reply on any record, sign in as that user and open the bell row. The record page opens with the comment panel at that thread, the replies open, and the reply highlighted in view.
Generated by Claude Code