Skip to content

User Story: Comments and Discussion

Overview

As a team member, I want to add internal comments to threads so that I can discuss customer issues with my team without sending external emails.

User Personas

  • Support Agent: Adds notes and questions about customer threads
  • Team Lead: Provides guidance and feedback on handling threads
  • Subject Matter Expert: Offers technical insights on complex issues

User Stories

Add Comment to Thread

As a team member I want to add an internal comment to a thread So that I can share insights or ask questions with my team

Acceptance Criteria:

  • Comment input field is available at bottom of thread view
  • Comment text area auto-expands as I type
  • Pressing Enter or clicking send submits the comment
  • Comment appears immediately in thread timeline
  • Comments are marked as internal (not sent to customer)
  • Empty comments cannot be submitted

View Comments in Timeline

As a team member I want to see all comments in the thread timeline So that I can follow the internal discussion

Acceptance Criteria:

  • Comments appear chronologically with other thread actions
  • Comments show author name and timestamp
  • Comments are visually distinct from emails
  • Comment text is fully displayed (no truncation)
  • Timeline scrolls automatically to show new comments

Real-time Comment Updates

As a team member I want to see new comments from colleagues instantly So that I can participate in live discussions

Acceptance Criteria:

  • New comments from other users appear without refresh
  • Comments sync in real-time via WebSocket
  • Comment author is notified via WebSocket propagation
  • No duplicate comments appear

Comment Formatting

As a team member I want to format my comments with rich text So that I can communicate clearly and emphasize important points

Acceptance Criteria:

  • Rich text formatting supported (bold, italic, underline, headings, lists, blockquotes, code)
  • Line breaks are preserved
  • URLs are automatically detected and linkified
  • Images can be uploaded and embedded inline (auto-resized to 300x300px max)
  • Emoji picker available for adding emojis
  • Formatting toolbar provides easy access to all formatting options

Keyboard Submit

As a team member I want to submit comments using keyboard shortcuts So that I can work efficiently

Acceptance Criteria:

  • Enter key submits comment
  • Shift+Enter adds line break within comment
  • Comment field receives focus automatically
  • Formatting shortcuts work (Ctrl/Cmd+B for bold, etc.)

Value Proposition

Internal comments enable team collaboration without cluttering the customer-facing email thread. Team members can ask questions, share context, discuss solutions, and document decisions all within the thread context. Real-time updates ensure everyone stays informed.

  • Thread Management
  • Real-time Collaboration
  • Assignment Workflow
  • Timeline Actions

Technical Notes

  • Comments are stored in the actions table with type "comment"
  • API endpoint: POST /threads/:inboxId/:threadId/comment
  • Comment data structure includes author and message (HTML format)
  • Real-time updates via WebSocket (teams:actions:new event)
  • Comments are fetched with thread actions
  • Rich text editor powered by TipTap with StarterKit
  • Extensions: Underline, Image, Link (with autolink)
  • Images stored as base64 data URLs (resized on client)
  • Emoji picker using emoji-picker-element web component
  • Editor toolbar component provides formatting controls