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.5 KiB
3.5 KiB
Missing GraphQL Operations
Analysis of Browser HAR vs Our Implementation
After parsing loggedin_full_stack_1.har.txt, we found the browser's actual sequence:
What We're Currently Doing
- connection_init ✅
- ExtendedCurrentUserQuery ✅
- JoinRoom ✅
- RoomDisconnect subscription ✅
- NewMessageSubscription ✅
What the Browser Actually Does (Simplified)
- connection_init
- ExtendedCurrentUserQuery
- JoinRoom ← We do this
- [12-21] Various global subscriptions (notifications, private messages, etc.)
- [22] GetRunningApp query
- [23] RoomRootQuery query
- [24] WithGetMembers query
- [25] GetSpacesState query
- [26] RoomChatQuery ← CRITICAL - Gets chat history!
- [27] LinkedMembers query
- [28-33] Media/player queries
- [34] RoomDisconnect subscription ← We do this
- [35] MemberJoins subscription ← MISSING!
- [36] MemberLeaves subscription ← MISSING!
- [37] SetRole2 subscription
- [38] NewMessageSubscription ← We do this
Critical Missing Operations
1. RoomChatQuery (MOST IMPORTANT)
Variables: {roomId: "@hyperspaceout", channelId: "general", cursor: null}
Returns: Chat history (✅ GOT DATA)
Why it matters: This query likely registers the bot as "present" in the chat and loads message history.
query RoomChatQuery($roomId: String!, $channelId: String!, $cursor: String) {
chatArchive(roomId: $roomId, channelId: $channelId, cursor: $cursor) {
forwardCursor
backCursor
results {
id
user {
id
isAnonymous
isSubscribed
username
displayName
avatarUrl
__typename
}
member {
id
role
__typename
}
body
time
editedAt
originalBody
reactions {
emoji
userObjects {
id
displayName
avatarUrl
__typename
}
__typename
}
__typename
}
room {
id
state {
members {
id
__typename
}
__typename
}
__typename
}
__typename
}
}
2. MemberJoins Subscription
Variables: {roomId: "@hyperspaceout"}
Why it matters: Notifies when members join the room.
subscription MemberJoins($roomId: String!) {
memberJoins(roomId: $roomId) {
id
role
user {
id
username
displayName
avatarUrl
isAnonymous
__typename
}
__typename
}
}
3. MemberLeaves Subscription
Variables: {roomId: "@hyperspaceout"}
Why it matters: Notifies when members leave the room.
subscription MemberLeaves($roomId: String!) {
memberLeaves(roomId: $roomId) {
id
__typename
}
}
Implementation Priority
- HIGH: Add
RoomChatQueryBEFORENewMessageSubscription- This is likely why the bot isn't visible - it never "announces" its presence by loading the chat
- MEDIUM: Add
MemberJoinsandMemberLeavessubscriptions- These help the bot track room membership
- LOW: Add other room queries (GetRunningApp, RoomRootQuery, etc.)
- These are nice-to-have but probably not critical for basic chat functionality
Next Steps
- Add
RoomChatQueryafterJoinRoomand beforeNewMessageSubscription - Add
MemberJoinsandMemberLeavessubscriptions - Test to see if bot becomes visible in chat
- If still not working, add more of the room queries