Skip to content

feat(comments): add report-based moderation workflow for comments#483

Open
lc0rp wants to merge 2 commits intoopenclaw:mainfrom
lc0rp-contrib:feat/comment-moderation-workflow
Open

feat(comments): add report-based moderation workflow for comments#483
lc0rp wants to merge 2 commits intoopenclaw:mainfrom
lc0rp-contrib:feat/comment-moderation-workflow

Conversation

@lc0rp
Copy link
Contributor

@lc0rp lc0rp commented Feb 23, 2026

Summary

  • add comment report moderation workflow aligned with skill report moderation semantics
  • auto-hide comments after the 4th unique report, with staff review + moderation actions in management
  • add comment report dialog + report mutation wiring on skill comment rows
  • add management UX updates: top tabbed sections and clearer reported-comments workflow
  • keep user-facing change minimal: replace text Report with outlined round flag icon + Report popover label
  • update docs/manual testing to reflect reported comments review flow

Rationale

Issue threads called out missing parity between skills and comments moderation flows.

  • users needed a clear way to report comments with reason
  • comments needed automatic de-amplification after repeated unique reports
  • moderators/admins needed first-class queue visibility + hide/restore/hard-delete actions
  • docs/tests needed to match behavior to keep support + triage low-friction

Work done

  • convex/comments.handlers.ts, convex/comments.ts, convex/schema.ts
    • implemented comment reporting model (unique-per-user per comment)
    • enforced report reason + active-report cap
    • auto-hide comment on 4th unique report (moderationReason = auto.reports)
    • added audit logging and management queries/mutations for reported comments
  • src/components/SkillCommentsPanel.tsx, src/components/CommentReportDialog.tsx
    • added report action + report dialog flow for comments
    • switched report affordance to outlined round flag icon with popover label
  • src/routes/management.tsx
    • integrated reported comments moderation actions
    • added top tabs for management sections
  • tests
    • convex/comments.test.ts
    • src/components/SkillCommentsPanel.test.tsx
    • src/__tests__/management.route.test.tsx
  • docs
    • docs/manual-testing.md (reported comments tab wording)

Testing

bun run lint
bun run test

Checklist

  • Added test coverage and tested
  • bun run lint
  • Tested and working locally

Tag-teamed w/ codex 5.3 on this.

Refs #464 #467

Greptile Summary

Implements a complete comment reporting and moderation workflow with auto-hiding after 4 unique reports, mirroring the existing skill reporting system. The changes include backend handlers for reporting/hiding/deleting comments, a report dialog UI component with flag icon, management console tabs for moderators to review reported comments, and comprehensive test coverage. The implementation maintains backward compatibility through defensive getCommentStatus logic and properly enforces access controls (moderator for hide/restore, admin for hard delete).

Confidence Score: 5/5

  • Safe to merge - well-tested implementation that follows established patterns
  • The implementation closely mirrors the existing skill reporting system, includes comprehensive unit and integration tests with good coverage, properly handles backward compatibility for existing comments without moderation fields, enforces appropriate access controls (user for reporting, moderator for hide/restore, admin for hard delete), handles edge cases like idempotent reporting and active report limits, and includes proper audit logging for all moderation actions
  • No files require special attention

Last reviewed commit: 20fb35e

Context used:

  • Context from dashboard - AGENTS.md (source)

@vercel
Copy link
Contributor

vercel bot commented Feb 23, 2026

@lc0rp is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

@lc0rp lc0rp marked this pull request as ready for review February 23, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant