Files
egg 599802b818 feat: Add Chat UX improvements with notifications and @mention support
- Add ActionBar component with expandable toolbar for mobile
- Add @mention functionality with autocomplete dropdown
- Add browser notification system (push, sound, vibration)
- Add NotificationSettings modal for user preferences
- Add mention badges on room list cards
- Add ReportPreview with Markdown rendering and copy/download
- Add message copy functionality with hover actions
- Add backend mentions field to messages with Alembic migration
- Add lots field to rooms, remove templates
- Optimize WebSocket database session handling
- Various UX polish (animations, accessibility)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 08:20:37 +08:00

1.7 KiB

realtime-messaging Specification

ADDED Requirements

Requirement: Message Sender Display Name

The system SHALL include the sender's display name in message responses and broadcasts, enabling the UI to show user-friendly names instead of email addresses.

Scenario: Message response includes display name

  • WHEN a message is retrieved via REST API or WebSocket
  • THEN the response SHALL include sender_display_name field
  • AND the display name SHALL be obtained by joining with the tr_users table
  • AND if the sender does not exist in tr_users, the field SHALL fallback to sender_id

Scenario: WebSocket broadcast includes display name

  • WHEN a new message is broadcast via WebSocket
  • THEN the broadcast SHALL include sender_display_name field
  • AND the value SHALL be the sender's display name from tr_users table

Scenario: Historical messages include display name

  • WHEN a client requests message history via GET /api/rooms/{room_id}/messages
  • THEN each message in the response SHALL include sender_display_name
  • AND messages from unknown users SHALL show their sender_id as fallback

Requirement: GMT+8 Timezone Display

The frontend SHALL display all timestamps in GMT+8 (Asia/Taipei) timezone for consistent user experience across all browsers.

Scenario: Message timestamp in GMT+8

  • WHEN a message is displayed in the chat room
  • THEN the timestamp SHALL be formatted in GMT+8 timezone
  • AND use format "HH:mm" for today's messages
  • AND use format "MM/DD HH:mm" for older messages

Scenario: Room list timestamps in GMT+8

  • WHEN the room list is displayed
  • THEN the "last updated" time SHALL be formatted in GMT+8 timezone