Skip to content

fix: expose all workspace DM conversations in dashboard#510

Merged
khaliqgant merged 2 commits intomainfrom
dm-exposure-for-all-convos
Mar 9, 2026
Merged

fix: expose all workspace DM conversations in dashboard#510
khaliqgant merged 2 commits intomainfrom
dm-exposure-for-all-convos

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Mar 7, 2026

Summary

  • Bug: Dashboard only showed DM conversations involving the broker agent. DMs between other agents (e.g., Lead ↔ codex-worker) were invisible.
  • Root cause: /api/threads used agent-scoped AgentClient::dm_messages_with_agent() which filters to only the broker's DMs.
  • Fix: Added get_all_dms() method using workspace-level RelayCast::all_dm_conversations() + dm_messages() to fetch ALL DM conversations. Enhanced derive_thread_name() to use participants array for "AgentA ↔ AgentB" display names.

Changes

  • src/relaycast_ws.rs — New get_all_dms() method with graceful fallback
  • src/main.rs:1899 — Switched /api/threads handler to use get_all_dms(200)
  • src/main.rs:4879 — Enhanced derive_thread_name() with participants-based naming
  • 3 new unit tests covering non-broker DMs, broker filtering, and multiple independent conversations

Test plan

  • cargo test — all 228 tests pass
  • cargo clippy — 0 warnings
  • New tests: build_thread_infos_shows_dms_between_non_broker_agents
  • New tests: build_thread_infos_dm_with_participants_filters_broker
  • New tests: build_thread_infos_multiple_independent_dm_conversations
  • Manual: verify DMs between non-broker agents appear in dashboard threads view
  • Manual: verify "↔" formatting displays correctly in dashboard

🤖 Generated with Claude Code


Open with Devin

The /api/threads endpoint was using agent-scoped get_dms() which only
returned DMs where the broker was a participant. Switch to workspace-level
get_all_dms() using RelayCast::all_dm_conversations() + dm_messages()
so all DM conversations between any agents are visible in the dashboard.

Also enhance derive_thread_name() to use the participants array for
"AgentA ↔ AgentB" display names on non-broker DM conversations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@khaliqgant khaliqgant requested a review from willwashburn as a code owner March 7, 2026 19:51
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Copy link
Copy Markdown

@xkonjin xkonjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick review pass:

  • Main risk area here is connection lifecycle, retry behavior, and state re-initialization.
  • I didn’t see targeted regression coverage in the diff; please add or point CI at a focused test for the changed path in main.rs, relaycast_ws.rs.
  • Before merge, I’d smoke-test the behavior touched by main.rs, relaycast_ws.rs with malformed input / retry / rollback cases, since that’s where this class of change usually breaks.

@khaliqgant khaliqgant merged commit 886a0e8 into main Mar 9, 2026
1 check passed
@khaliqgant khaliqgant deleted the dm-exposure-for-all-convos branch March 9, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants