Files
José Almeida 8f2fe7a8e6 feat(web): add agent message comments (#1835)
* feat(web): add agent message comments

* fix(web): harden agent message comments

* fix(web): address message comment review findings

* fix(web): allow comments on legacy agent messages

* fix(web): address latest message comment review

* fix(web): address follow-up message comment review

* fix(web): address remaining message comment review

* fix(web): keep failed mobile comments open

* fix(web): preserve selections over message comments
2026-07-21 13:32:19 +01:00

1.2 KiB

id, title, status, wave, depends_on, plan
id title status wave depends_on plan
agent-message-comments-01 Comment foundation complete 1 None plan.md

Acceptance

  • AgentMessageComment and MessageTextAnchor are part of the frontend union with type guards, sessionStorage persistence/hydration, and Markdown formatting.
  • Unit tests cover round-trip persistence/hydration, anchor normalization, eligible-message filtering, and multiline Markdown.
  • Existing comment types and formatting remain compatible.

Files

  • apps/web/lib/state/slices/comments/types.ts
  • apps/web/lib/state/slices/comments/comments-store.ts
  • apps/web/lib/state/slices/comments/persistence.ts
  • apps/web/lib/state/slices/comments/format.ts
  • apps/web/lib/state/slices/comments/*.test.ts
  • apps/web/lib/chat/agent-message-comments.ts

Verification

  • cd apps && pnpm --filter @kandev/web test -- --run lib/state/slices/comments lib/chat/agent-message-comments.test.ts

Output

Implemented the comment union, sessionStorage-backed hydration, message-local anchors, Markdown formatting, and focused persistence/format/anchor tests.

Output contract

Summarize model, helpers, tests, touched files, blockers, and follow-up risks.