Skip to content

feat: add a bot presence panel to presentation view - #244

Merged
cbj0hns0n merged 1 commit into
mainfrom
jh/bot-presentation-view
Nov 10, 2026
Merged

cbj0hns0n merged 1 commit into
mainfrom
jh/bot-presentation-view

Conversation

@jencompgeek

@jencompgeek jencompgeek commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

What is in this PR?

Adds a persistent side panel to the presentation (shared-screen) view that embeds bot-media-server's own page, showing
the event assistant's animated character live during the event. It respects the organizer's voiceDestination setting
(part of the voice responses / voiceOutput feature) so the bot's audio doesn't double up when it's already routed
through Zoom, and it's collapsible (expanded by default) so presenters can reclaim screen space without losing the
bot's connection.

Changes in the codebase

  • components/BotPresence.tsx (new): embeds bot-media-server's self-contained page via iframe, reused unmodified rather
    than ported to React. Shows a connecting/timeout state and an audio-unlock prompt tied to the iframe's cross-origin
    blur signal (a Chrome autoplay-policy workaround). Collapsible via a header toggle (ChevronLeft/ChevronRight),
    expanded by default — collapsing hides the content with CSS only (hidden class on a
    data-testid="bot-presence-content" wrapper), so the iframe's live socket.io connection is never dropped.
  • hooks/useConversationSetup.ts: widens conversationFeatures's type to carry each feature's config, needed to read
    voiceOutput.config.voiceDestination.
  • pages/assistant.tsx: renders BotPresence in the presentation view once eventStatusLoaded (so the first
    bot-media-server request already carries the transcript passcode instead of connecting once without it), gating
    audioEnabled on voiceDestination !== 'zoom'.
  • components/EventCreationForm.tsx: adds a showForPlatforms hint to ConfigProperty — a property carrying it is only
    shown once the admin's platform selection includes at least one of the named platforms. This is what lets
    voiceOutput's voiceDestination sub-property stay hidden in the creation form unless Zoom is actually one of the
    selected platforms, since "route the bot's voice to Zoom" is meaningless otherwise. Applied to both top-level
    properties and feature sub-properties via a shared isVisibleForSelectedPlatforms filter.
  • openapi.json: adds ConfigProperty.showForPlatforms to match.
  • .env.template: documents the new NEXT_PUBLIC_BOT_MEDIA_URL var — the panel is simply omitted when unset.

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?
  • If openapi.json changed: names the llm_engine PR/commit it came from, and whether that backend change is deployed
  • add a What's New entry in content/whatsNew.ts for new features?

Testing this PR

Test in conjunction with BE PR berkmancenter/llm_engine#442
run both llm_engine and yarn bot-media-server

  • Create a NS event (voice responses should now be enabled by default, the voiceDestination config property should not be rendered)
  • With NEXT_PUBLIC_BOT_MEDIA_URL unset, confirm the event's presentation view renders with no bot panel at all.
  • With it set, open the presentation view and confirm the bot's animated character loads, and clicking the embed
    dismisses the "click to enable audio" prompt.
  • Launch the zoom for transcript, confirm there is no bot presence in zoom b/c its transcription only, ask a 'hey berkie' question and confirm the bot raises its hand in NS presentation view and then call on it and ensure it speaks
  • Click the panel's collapse toggle, confirm it shrinks to a thin strip showing the bot's name, then expand it
    again and confirm the bot's embed didn't reconnect/reload.
  • Refresh the presentation view when bot is thinking or has hand raised; confirm it resyncs both the state and the question text, not just the state.
  • Create another event - select hybrid (NS and Zoom). verify the voiceDestination property appears to allow you to configure where bot speaks. Select NS. This time the bot animation should show up in Zoom (it has a presence in actual zoom events) but it should only speak in NS
  • Create another hybrid event and select Zoom as the voiceDestination. Verify speaks only in Zoom and not NS
  • Create a Zoom only event, verify voice destination property now shown on event creation form. Verify bot speaks in Zoom.

Additional information

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
nextspace Error Error Nov 10, 2026 5:25pm UTC

Request Review

@cbj0hns0n cbj0hns0n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works great!

@cbj0hns0n
cbj0hns0n merged commit d29f04f into main Nov 10, 2026
2 of 3 checks passed

This branch had an error being deployed

1 failed deployment
Preview — 3d5db608 Deployed Nov 10, 2026 by vercel[bot]
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