Message-anchored commenting UI MVP (do not merge/deploy) - #1880
Open
simple-agent-manager[bot] wants to merge 10 commits into
Open
Message-anchored commenting UI MVP (do not merge/deploy)#1880simple-agent-manager[bot] wants to merge 10 commits into
simple-agent-manager[bot] wants to merge 10 commits into
Conversation
Contributor
|
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Constituent PR: message-anchored commenting UI MVP
Do not merge this PR directly. Do not deploy this branch to staging.
This is the production web UI constituent PR for idea
01M0JQB842XSJ3W172DYPB37HN. The parent integration PR will combine this with the sibling backend/server-contract task01M0K4EP5SND5CPK2N6GYS4449.Scope
Included:
selectionchange.notevssend_to_agent.>=1024pxdriven by fetched comment data, not mounted Virtuoso rows.packages/uiprimitives:Avatar,Textarea, anchoredPopover.Excluded by design:
Agent Preflight (Required)
Classification
External References
N/A: no external API or third-party integration documentation was required; this constituent PR implements repo-local UI behavior against the sibling SAM backend contract.
Codebase Impact Analysis
Affected paths are
apps/web/src/components/project-message-view/,apps/web/src/lib/api/comments.ts,apps/web/src/lib/query-options/comments.ts,packages/ui/src/components/,specs/035-message-comments/contracts/message-comment-api.md, and focused web/UI tests underapps/web/tests/pluspackages/ui/tests/.Documentation & Specs
Updated
specs/035-message-comments/contracts/message-comment-api.mdfor the UI/backend message-comment REST and realtime contract, and tracked implementation evidence intasks/active/2026-08-21-message-anchored-commenting-ui.md.Constitution & Risk Check
Checked Principle XI/no hardcoded values and kept server-owned write limits out of the UI; main risks were cross-component UI/API contract drift, optimistic reconciliation correctness, mobile selection ergonomics, accessibility, and no-staging/do-not-merge constituent-PR constraints.
Assumed server contract for backend integrator
Documented in
specs/035-message-comments/contracts/message-comment-api.md.Types:
MessageCommentStatus = 'open' | 'sent' | 'resolved'MessageCommentAction = 'note' | 'send_to_agent'MessageCommentAnchor = { kind: 'message'; messageId: string; quote?: string }id, optionalclientIdfor optimistic reconciliation, author,createdAt,updatedAt, status, body, anchor, and replies.REST:
GET /api/projects/:projectId/sessions/:sessionId/comments?anchorKind=message->{ comments }POST /api/projects/:projectId/sessions/:sessionId/comments{ clientId, anchor: { kind: 'message', messageId, quote? }, body, action }{ comment }POST /api/projects/:projectId/sessions/:sessionId/comments/:commentId/replies{ clientId, body, action }{ comment }POST /api/projects/:projectId/sessions/:sessionId/comments/:commentId/resolve->{ comment }POST /api/projects/:projectId/sessions/:sessionId/comments/:commentId/reopen->{ comment }POST /api/projects/:projectId/sessions/:sessionId/comments/:commentId/send{ body?: string }{ comment }Realtime:
comment.thread.createdcomment.thread.updatedcomment.reply.created{ projectId, sessionId, comment, replyId? }Client behavior:
idor matching optimisticclientId.send_to_agentcreates/updates status tosent;notekeeps statusopen.resolvedthreads remain represented.Tests and evidence
pnpm --filter @simple-agent-manager/web test -- tests/unit/api/comments.test.ts tests/unit/components/message-comments.test.tsx tests/unit/components/project-message-view.test.tsx tests/unit/components/chat/project-message-view-resume.test.tsxpnpm --filter @simple-agent-manager/ui testpnpm --filter @simple-agent-manager/web exec playwright test tests/playwright/message-comments-audit.spec.ts --project='Desktop (1280x800)'pnpm testpassed before the final import-sort-only amend: 21/21 turbo tasks; web 284 files / 3410 tests; API 583 files / 7880 tests.pnpm build,pnpm lint, andpnpm typecheckpassed at final SHA.packages/acp-clientand unrelated web files.apps/wwwAstro template baseline report.Screenshot evidence:
.codex/tmp/playwright-screenshots/message-comments-desktop-thread-flow-1280x800.png.codex/tmp/playwright-screenshots/message-comments-desktop-error-state-1280x800.png.codex/tmp/playwright-screenshots/message-comments-desktop-empty-state-1280x800.png.codex/tmp/playwright-screenshots/message-comments-mobile-inline-send-375x667.pngSpecialist Review Evidence
ui-ux-specialisttest-engineerconstitution-validatordoc-sync-validatortask-completion-validator01M0K4EP5SND5CPK2N6GYS4449; this PR provides the documented UI-side contract and stateful API-boundary tests.Notes
d323554b1e0c52d752944829f52e0edde0c2df9f.apps/web/src/components/project-message-view/index.tsxwas reduced from 966 to 786 lines by extracting the comment row/rail wiring and session helper utilities, keeping it below the mandatory 800-line limit.