Relocate 30 non-essential .md files (investigation notes, fix summaries, implementation details, status reports) from the project root into docs/ to reduce clutter. Core operational docs (README, quickstart guides, configuration references) remain in the root. Co-authored-by: Cursor <cursoragent@cursor.com>
3.4 KiB
3.4 KiB
GraphQL Operations Audit - Browser vs Bot
Operations We're Currently Sending
1. ✅ connection_init
Status: Correct
- Sending token, ua, v, r parameters
- Matches browser
2. ✅ ExtendedCurrentUserQuery
Status: Correct (simplified)
- Browser: Full query with realmInfo, colorSchemes, friends, etc.
- Bot: Simplified to just currentUser fields we need
- Verdict: OK - we don't need all the UI-related fields
3. ✅ NewMessageSubscription
Status: Fixed (just updated)
- Added channelId parameter
- Added operationName
- Added all required fields (member, reactions, etc.)
4. ✅ JoinRoom
Status: Needs verification
- Browser:
mutation JoinRoom($id: String!, $disconnectOtherConnections: Boolean) - Bot:
mutation JoinRoom($id: String!) - Issue: Missing
$disconnectOtherConnectionsparameter
5. ✅ SendMessage2
Status: Fixed (just updated)
- Added channelId, replyToMessageId parameters
- Added operationName
- Matches browser
6. ❌ anonLogin
Status: Only used for anonymous - OK
Critical Operations the Browser Sends That We're Missing
Room Management
- RoomRootQuery - Gets room metadata
- WithGetMembers - Gets room members list
- RoomChatQuery - Gets chat history
Member Events (Important!)
- MemberJoins - Subscription for when members join
- MemberLeaves - Subscription for when members leave
- NewMemberSubscription - Another member join subscription
Message Events
- MessageDeletedSubscription - When messages are deleted
- MessageEditedSubscription - When messages are edited
- ReactionAdded - When reactions are added
- ReactionRemoved - When reactions are removed
Typing Indicators
- UserTyping - Subscription for typing indicators
- StartTyping - Mutation to send typing status
Room State
- RoomDisconnect - Subscription for disconnect events
- SetRole2 - Role changes subscription
Priority Operations to Add
HIGH PRIORITY (Required for basic functionality)
- JoinRoom - Fix to include
disconnectOtherConnectionsparameter - WithGetMembers - May be needed to see room members properly
- RoomChatQuery - May be needed to receive messages properly
MEDIUM PRIORITY (Nice to have)
- MemberJoins/MemberLeaves - For presence notifications
- MessageDeletedSubscription - Handle deleted messages
- UserTyping - Typing indicators (already on our roadmap)
LOW PRIORITY (Optional)
- All the media player, spaces, WebRTC subscriptions - Not needed for chat relay
Next Steps
- ✅ Fix JoinRoom mutation to include disconnectOtherConnections
- ⏳ Test if current changes fix message sending/receiving
- ⏳ Add WithGetMembers if needed
- ⏳ Add RoomChatQuery if needed
- ⏳ Add member join/leave subscriptions for better presence tracking
Browser Operation Sequence (First Connection)
- connection_init (with token)
- SettingsQuery
- ExtendedCurrentUserQuery
- UserRoomQuery
- WebRTCIceServerQuery
- (various other queries)
- JoinRoom ← We do this
- (many subscriptions)
- NewMessageSubscription ← We do this
- (more subscriptions)
Our Current Sequence
- connection_init (with token) ✅
- ExtendedCurrentUserQuery ✅
- NewMessageSubscription ✅
- JoinRoom ✅
- (start listening)
Observation: We're subscribing to messages BEFORE joining the room, but the browser does it AFTER. Let's check if order matters.