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>
This commit is contained in:
@@ -3,11 +3,10 @@
|
||||
Tables:
|
||||
- tr_incident_rooms: Stores room metadata and configuration
|
||||
- tr_room_members: User-room associations with roles
|
||||
- tr_room_templates: Predefined templates for common incident types
|
||||
|
||||
Note: All tables use 'tr_' prefix to avoid conflicts in shared database.
|
||||
"""
|
||||
from sqlalchemy import Column, Integer, String, Text, DateTime, Enum, ForeignKey, UniqueConstraint, Index
|
||||
from sqlalchemy import Column, Integer, String, Text, DateTime, Enum, ForeignKey, UniqueConstraint, Index, JSON
|
||||
from sqlalchemy.orm import relationship
|
||||
from datetime import datetime
|
||||
import enum
|
||||
@@ -58,6 +57,7 @@ class IncidentRoom(Base):
|
||||
location = Column(String(255))
|
||||
description = Column(Text)
|
||||
resolution_notes = Column(Text)
|
||||
lots = Column(JSON, default=list, nullable=False, comment="LOT batch numbers (JSON array)")
|
||||
|
||||
# User tracking
|
||||
created_by = Column(String(255), nullable=False) # User email/ID who created the room
|
||||
@@ -111,18 +111,4 @@ class RoomMember(Base):
|
||||
UniqueConstraint("room_id", "user_id", "removed_at", name="uq_tr_room_member_active"),
|
||||
Index("ix_tr_room_members_room_user", "room_id", "user_id"),
|
||||
Index("ix_tr_room_members_user", "user_id"),
|
||||
)
|
||||
|
||||
|
||||
class RoomTemplate(Base):
|
||||
"""Predefined templates for common incident types"""
|
||||
|
||||
__tablename__ = "tr_room_templates"
|
||||
|
||||
template_id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
name = Column(String(100), unique=True, nullable=False)
|
||||
description = Column(Text)
|
||||
incident_type = Column(Enum(IncidentType), nullable=False)
|
||||
default_severity = Column(Enum(SeverityLevel), nullable=False)
|
||||
default_members = Column(Text) # JSON array of user roles
|
||||
metadata_fields = Column(Text) # JSON schema for additional fields
|
||||
)
|
||||
Reference in New Issue
Block a user