Issues found during UAT:
1. Uploader doesn't see their own attachment message
2. Chat history doesn't load on page refresh/rejoin
Root causes:
1. Backend's server_publish_to_session excludes sender from WebSocket
broadcast (exclude_client_id: sender[:client_id])
2. fetchChatHistory was imported but never called in JKChatMessageList
Fixes:
- Add optimistic message in uploadAttachment.fulfilled for uploader
Since sender is excluded from WebSocket, we add the message locally
using the MusicNotation response + user info
- Add useEffect in JKChatMessageList to dispatch fetchChatHistory
when channel becomes active
Technical details:
- Pass userId/userName to uploadAttachment thunk for message construction
- Use 'attachment-{notation.id}' as message ID to avoid collision
- Fetch history when fetchStatus is not 'loading' or 'succeeded'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>