All specs
uxmedium complexity

Comments & Discussions

Used in 4 specs

Let users discuss objects in your product — posts, documents, PRs, designs — with threading, mentions, and moderation.

Options

Threading Model*

All comments under an object are a single chronological list.
Comments are flat, but each comment can open a single-depth thread of replies.
Unlimited reply depth with visual indentation.

Content Features

Bold, italic, lists, code blocks, links.
Type @ to reference a user; triggers a notification for that user.
Lightweight acknowledgment without a full reply.
Attach screenshots or files directly in comments.

Moderation Controls

Authors can edit or delete; admins can always delete.
Users flag comments for moderator review.
Pre-filter new comments via Perspective API, OpenAI moderation, or a rules engine.
Cap comments per minute/hour; prevents drive-by spam and emotional flooding.

Decision Points

Is this a collaboration tool or a public discussion forum?

If yes

Collaboration: one-level replies. Forum: flat or deep nesting depending on culture.

If no

Flat list is usually enough for product reviews or simple feedback surfaces.

Are comments visible to non-authenticated users or strangers?

If yes

Invest in moderation tooling from day one — flagging, rate limits, and either manual or automated review.

If no

Internal/authenticated discussions need less moderation but still need edit/delete.

Support edit with full edit history?

If yes

Store every edit as a version row — useful for trust and dispute resolution, but plan a UI to expose history without cluttering the main view.

If no

An "edited" marker without history is enough for most collaboration tools.

Hard-delete comments or leave a tombstone on removal?

If yes

Tombstones (show "[deleted]" in-place) preserve thread context — the right call for anything threaded.

If no

Hard delete is fine for flat comment lists where there is no structural reply to preserve.

Moderation timing: pre-publication, post-publication, or none?

If yes

Pre-publication review is required for regulated industries (children, health). Expect significant moderator workload and latency from post to visible.

If no

Post-publication review (flag and hide) is standard — fast for users, with moderator queues for flagged content.

Rich text, Markdown, or plain text only?

If yes

Markdown is the sweet spot — expressive, safe, and ubiquitous. Render server-side with a sanitizer; never allow raw HTML.

If no

Plain text is appropriate for short-form reactions (reviews, microposts) where formatting adds nothing.

Comment permalinks required?

If yes

Every comment needs a stable ID and shareable URL — critical for linking in tickets, emails, and threads.

If no

Skip permalinks for ephemeral surfaces where no one will ever cite a specific comment.

Allow anonymous/guest commenting?

If yes

Require captcha and aggressive rate limits — anonymous comments are the #1 spam vector. Store IP and user-agent for abuse investigation.

If no

Authenticated-only commenting dramatically reduces moderation burden.

Do you need spam/abuse detection (Akismet, Perspective)?

If yes

Akismet for spam, Perspective API for toxicity — both are advisory signals feeding a human review queue, not auto-ban triggers.

If no

Manual flagging + rate limits are enough for low-volume or trusted-user surfaces.

Allow file or image attachments in comments?

If yes

Add object storage and content-type validation; require virus scanning if comments are public. Consider size limits per comment and per user.

If no

Text-only comments dramatically reduce moderation, storage, and security surface.

Full-text search over comments?

If yes

Postgres tsvector covers you up to ~10M comments; switch to Meilisearch/Typesense when search becomes a core workflow.

If no

Users navigate to the parent object and scroll — no search index needed for low-volume surfaces.

Owner-exportable comment archive (for GDPR/DSR)?

If yes

Provide a JSON or CSV export endpoint for comment authors — required for GDPR data portability in EU markets.

If no

Internal-only products without EU users can defer this until a customer specifically asks.

Pin or highlight specific comments?

If yes

A boolean pinned flag per comment plus a UI treatment — useful for FAQs, announcements, or marking resolution on issue threads.

If no

Skip pinning if comments are short-lived conversational — it adds UI and moderation complexity.

Inline translation across languages?

If yes

Call Google Translate or DeepL on-demand per comment and cache translations — full pre-translation wastes API budget.

If no

Skip translation for single-language communities or where users handle translation externally.

Tradeoffs

UXDeep nesting chosen

Mobile UX suffers past 3 levels; pagination and collapse behavior need design attention

ComplexityMentions enabled

Expand notification infrastructure — mention notifications are high-priority and user-visible

CostAutomated moderation enabled

Third-party ML dependency and ongoing tuning of thresholds to balance false positive rate

Dependencies

user-system

Implementation Examples

Commento / Cactus Comments

Lightweight self-hostable comment widgets — reference for minimal moderation and threading.

Discourse

Full-featured forum software — reference architecture for deep threading and trust-level moderation.

Perspective API

Google's toxicity classifier — common building block for automated moderation.

Used by specs

Project Management ToolSocial / Community AppNote-taking / Knowledge BaseMarketplace Platform