Skip to content

subscribe to all direct message channels in conversation#124

Merged
jencompgeek merged 3 commits into
mainfrom
jh/direct-subscribes
Jun 5, 2026
Merged

subscribe to all direct message channels in conversation#124
jencompgeek merged 3 commits into
mainfrom
jh/direct-subscribes

Conversation

@jencompgeek

@jencompgeek jencompgeek commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

What is in this PR?

We are adding another agent to send private checkins to users. Rather than hard-coding the websocket subscription to this agent's direct channel (and jargonFilter's direct channel), this PR modifies assistant to subscribe to all direct channels in the conversation. Also contains a timing fix on emitting the conversation:join to avoid creation of duplicate direct channels

Changes in the codebase

See above

Documentation and automated testing

Did you:

  • document any breaking changes in your commit messages?
  • document your changes as comments in the code? Use TSDoc format where appropriate.
  • update the README and docs to be clear and easy to use for end users and developers?
  • add and/or update automated tests?
  • update team documentation of any new or changed environment variables?
  • add a What's New entry in content/whatsNew.ts for new features?

Testing this PR

  • Not necessary, but could test in conjunction with BE PR add private proactive checkin DMs to eventAssistant llm_engine#147. Remaining test steps assume this is the case (if not, just verify that jargon clarifications still come through)
  • Create an EA convo for NextSpace and Zoom and use a video with some dense jargon
  • Verify jargon clarifications still displayed in Berkie tab during talk
  • If you remain quiet, you should eventually get a private checkin message during a particularly dense part of the transcript.
  • you can also try sending several DMs to Berkie expressing doubt or disagreement with a topic to trigger it.
  • Go incognito as a couple of different users expressing similar concerns to trigger a private message indicating that others share the sentiment. Be aware that you can only get one of the above 3 types of DMs every 10 minutes, so choose wisely :)

Additional information

support the addition of future agent DMs by subscribing to all direct channels, filtering intro msg
to just eventAssistant
only emit join event when socket has fully connected to avoid duplicate send mid-handshake
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nextspace Ready Ready Preview, Comment Jun 5, 2026 12:56pm

Request Review

@jencompgeek jencompgeek changed the title Jh/direct subscribes subscribe to all direct message channels in conversation Jun 2, 2026
@jencompgeek jencompgeek requested a review from bmiller59 June 2, 2026 22:02
@johnnycrich johnnycrich requested review from johnnycrich and removed request for bmiller59 June 4, 2026 16:04
when useEffects run twice, has potential to create duplicate direct channels
Comment thread pages/assistant.tsx
}

const joinConversation = () => {
if (hasJoinedConvRef.current) return;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great solution for dedupe here!

@jencompgeek jencompgeek merged commit b6b9067 into main Jun 5, 2026
2 checks passed
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