Skip to Content
Living documentation — last reviewed 2026-05-28
FeaturesMessages CommentsMessages + Comments — QA Plan

Messages + Comments — QA Plan

1. DM send

#ScenarioExpected
1.1Coach DMs member with text only201; row inserted; WS event emitted to both rooms; push enqueued
1.2Member DMs coach with text201
1.3Member DMs another member403
1.4Coach DMs another coach201
1.5Send with no content and no attachments400
1.6Send to a deactivated member’s membership404
1.7Send to a recipient in another org403

2. Attachments

#ScenarioExpected
2.1Get upload URL → PUT image → reference in sendMessage appears with image thumbnail
2.2Send referencing a non-existent uploadId400 / 404 from upload resolver
2.3Send referencing someone else’s upload403

3. Conversation list + history

#ScenarioExpected
3.1List conversationsOne entry per other-participant with last message + unread count
3.2History pagination by cursorOlder messages return on subsequent calls
3.3Soft-deleted messages absentFiltered

4. Read receipts

#ScenarioExpected
4.1Recipient marks single readread_at set; sender receives WS message:read
4.2Recipient bulk-marks conversationAll unread for them flip in one shot
4.3Sender tries to mark own message read403 (only recipient can)

5. Workout-anchored comments

#ScenarioExpected
5.1Coach posts on a member’s assignment201; message row has workout_assignment_id
5.2Member posts on own assignment201
5.3Other member posts on another’s assignment403
5.4Soft-delete a commentHidden
5.5Workout assignment is deletedComments CASCADE-deleted (hard)
5.6Program-scoped unread countMatches DB truth

6. WebSocket

#ScenarioExpected
6.1Connect with valid Clerk JWTJoined user:{userId} room
6.2Connect with no tokenDisconnected immediately
6.3Send 31 messages in 60s from one socket31st emits WsException (rate limited)
6.4Disconnect mid-sessionPresence updated
6.5Typing indicatorOther side receives user:typing

7. Push integration

#ScenarioExpected
7.1Send DM to a user with newMessage pref truePush enqueued
7.2Same with newMessage opted outPush skipped
7.3Recipient has no device tokenPush skipped silently

8. Permissions

#ScenarioExpected
8.1Cross-org DM attempt403
8.2Coach reads another org’s conversations403
8.3Member deletes another member’s message403

9. Smoke

  • Two browsers connected → DM is realtime.
  • Push arrives on a mobile device.
  • Inbox unread badge updates on read.