Fix: Handle direct_message events in dashboard presence handler#196
Merged
khaliqgant merged 1 commit intomainfrom Jan 16, 2026
Merged
Fix: Handle direct_message events in dashboard presence handler#196khaliqgant merged 1 commit intomainfrom
khaliqgant merged 1 commit intomainfrom
Conversation
🤖 My Senior Dev — Analysis Complete👤 For @khaliqgant📁 Expert in View your contributor analytics → 📊 1 file reviewed • 8 need attention
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
6c11230 to
6520484
Compare
Bug: Messages sent to GitHub username (e.g., khaliqgant) were not received in dashboard UI, while messages to _DashboardUI worked. Root cause: handlePresenceEvent in App.tsx only handled channel_message events and silently ignored direct_message events. When UserBridge forwarded DMs via WebSocket, they were discarded. Fix: Add direct_message handling in handlePresenceEvent to: - Create a consistent DM channel ID (dm:user1:user2, sorted) - Append the message to the channel - Handle unread state like channel messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6520484 to
aa5ea1e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
khaliqgant) were not received in dashboard UI_DashboardUIworked because they were fetched from storage, but real-time direct messages were silently discardedRoot Cause
handlePresenceEventinApp.tsxonly handledchannel_messageevents and ignoreddirect_messageevents:```typescript
// Before: Only handled channel_message
const handlePresenceEvent = useCallback((event: any) => {
if (event?.type === 'channel_message') {
// ... process channel message
}
// direct_message events were silently ignored!
}, [...]);
```
When UserBridge forwarded DMs via WebSocket as
{ type: 'direct_message', from: 'Agent', body: '...' }, they were discarded.Fix
Added handling for
direct_messageevents that:dm:user1:user2with sorted participants)Changes
This PR contains only the direct_message event handling fix in
App.tsx. No relay-pty or Rust changes included.Based on main, which already has the _DashboardUI display fixes from PR #193.
Test plan
_DashboardUIrouting still works🤖 Generated with Claude Code