Skip to content

FE-1795: Prepare Live voice briefs and summarize settled Brunch results - #9836

Merged
kostandinang merged 36 commits into
ka/fe-1793-experiment-lifecyclefrom
ka/fe-1795-voice-mediation
Oct 1, 2026
Merged

kostandinang merged 36 commits into
ka/fe-1793-experiment-lifecyclefrom
ka/fe-1795-voice-mediation

Conversation

@kostandinang

@kostandinang kostandinang commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Let people speak naturally to Brunch, see their original words, and hear concise acknowledgements and settled-result summaries.

This PR prepares structured briefs without losing the finalized utterance, adds explicit retention consent, and supports continuing a stopped written response through Voice. Provider-audio behavior remains unverified.

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Grow one display-only user bubble during partial speech, then replace it with one finalized message.
  • Show brief preparation as Preparing → Sending → Sent and submit the complete utterance alongside extracted excerpts; display-only “Still open” values are omitted.
  • Save finalized words, brief excerpts, and Brunch answers after renewed consent. Spoken-caption annotations remain browser-local.
  • Generate short spoken acknowledgements and settled-result summaries instead of reading full written answers.
  • Keep sentence-level caption grouping stable across result handoffs and preserve every spoken word and repetition.
  • When a written response is stopped, give Live quiet context and let “Continue” request a new Brunch turn without replaying stopped tools or speech.
  • Keep steering-specific Ledger, playback, and experiment-relay behavior outside this stack.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

  • Includes the required @hashintel/petrinaut patch changeset.

📜 Does this require a change to the docs?

  • Updates the assistant guide and Voice consent wording.

🕸️ Does this require a change to the Turbo Graph?

  • No execution-graph changes.

⚠️ Known issues

  • Preserving short utterances prevents handoff data loss but does not prove Brunch interprets every reply correctly.
  • GPT-Live provides neither stable turn identity nor playback-complete events, so caption grouping and acknowledgement timing remain approximate.
  • Saved finalized words live in Brunch history; browser-local caption annotations are removed with browser storage and do not replay audio.
  • Stop → Continue, revised prompts, summary quality, acoustic interruption, and provider timing have mocked coverage but no live-audio verification.

🐾 Next steps

Record a support-desk session, inspect how short choices and assumptions are interpreted, and verify acknowledgements, summaries, captions, and Stop → Continue against actual provider audio.

🛡 What tests cover this?

  • All 18 build, type, and lint tasks passed. The complete suites passed separately: 946 website tests and 1,516 Petrinaut tests.
  • 138 focused mediation tests cover preparation, lossless handoff, consent, captions, interruption, stopped responses, continuation, duplicate events, and error states.
  • Controlled browser checks covered the real UI and mocked transport. No provider or microphone session was run, and no petrinaut-core behavior changed.

❓ How to test this?

  1. Seed old consent, confirm the new retention disclosure is required, then start a fresh Live session.
  2. Speak a support-desk request and confirm one bubble, no partial submission, and Preparing → Sending → Sent for the finalized message.
  3. Give a short choice, correction, or permission to use defaults. Confirm the submitted request retains the complete words alongside excerpts and does not present assumptions as observed facts.
  4. Compare spoken output with captions, then stop a written answer and say “Continue”. Confirm a new Brunch turn continues the answer without replaying stopped work or audio.

📹 Demo

Controlled screenshots show the Voice brief, separate spoken and written replies, and Voice-origin messages. They do not verify live speech or playback timing.

Voice brief with separate spoken and written replies

Voice-origin messages in Chat

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hash Ready Ready Preview Oct 1, 2026 6:28am UTC
petrinaut Ready Ready Preview Oct 1, 2026 6:28am UTC
petrinaut-docs Ready Ready Preview Oct 1, 2026 6:28am UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Oct 1, 2026 6:28am UTC

Request Review

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps labels Sep 25, 2026
@kostandinang
kostandinang added this pull request to stack #9837 September 25, 2026 11:24
@kostandinang kostandinang changed the title FE-1795: Let the voice agent brief Brunch and speak for it FE-1795: Connect Voice to Brunch with prepared requests and spoken summaries Sep 25, 2026
@kostandinang kostandinang self-assigned this Sep 25, 2026
@kostandinang
kostandinang marked this pull request as ready for review September 25, 2026 13:39
@cursor

cursor Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches the Live–Brunch admission pipeline, a new OpenAI-backed mediation API, and complex async interruption/continuation behavior, though canonical conversation authority and tool execution are explicitly preserved.

Overview
Adds a browser-local display projection for Live Brunch voice so chat can show verbatim user speech, brief-preparation state, and spoken captions while canonical Brunch transport and history stay unchanged. Brunch chat wires mapMessagesForDisplay through per-conversation VoiceMediationHistory (persisted finalized turns; captions stay local).

Live admission path now runs POST /api/voice/mediation for structured brief extraction before submit (utterance plus excerpts; failed prep falls back to raw text and marks display-only failure) and wrap-up summarization after settlement so GPT-Live gets short spoken lines instead of full written answers. LiveBrunchBridge gains superseded-transcript handling, richer stop/error/speech-interruption instructions, and quiet appendThinking context when a response is stopped so Continue admits a new turn without replaying partial speech.

Live session UX streams provisional input from provider transcript deltas (LiveSpeechCaptions), pins annotations to the conversation a turn started in, and bumps consent to v3 with clearer text-retention disclosure. Server Live prompts and shared request guarding are updated accordingly; docs and large test suites cover mediation, captions, and interruption flows.

Reviewed by Cursor Bugbot for commit 96a72ae. Bugbot is set up for automated code reviews on this repo. Configure here.

@kostandinang
kostandinang marked this pull request as draft September 25, 2026 13:40
@kostandinang kostandinang changed the title FE-1795: Connect Voice to Brunch with prepared requests and spoken summaries FE-1795: Connect Voice to Brunch Sep 25, 2026
@kostandinang kostandinang changed the title FE-1795: Connect Voice to Brunch FE-1795: Connect Voice to Brunch with prepared requests and spoken summaries Sep 25, 2026
@kostandinang kostandinang changed the title FE-1795: Connect Voice to Brunch with prepared requests and spoken summaries FE-1795: Prepare Live voice briefs and summarize settled Brunch results Sep 28, 2026
@kostandinang
kostandinang marked this pull request as ready for review September 28, 2026 07:56

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread apps/petrinaut-website/src/main/app/voice-interview/live-conversation-control.tsx Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread apps/petrinaut-website/src/main/app/voice-interview/live-brunch-bridge.ts Outdated
Comment thread apps/petrinaut-website/src/shared/voice-mediation.ts Outdated
Comment thread apps/petrinaut-website/src/shared/voice-mediation.ts Outdated
Comment thread apps/petrinaut-website/src/main/app/voice-interview/live-brunch-bridge.ts Outdated
kostandinang and others added 2 commits September 30, 2026 18:09
Restore stock assistant styling, share tab behavior, narrow approval selection, and give experiment activity reports scoped cleanup. Record voice preparation failures explicitly and remove the unused unmediated path.

Co-authored-by: Amp <amp@ampcode.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

lunelson
lunelson previously approved these changes Sep 30, 2026

@lunelson lunelson 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.

Thanks — all threads addressed.

One non-blocking follow-up: the "Still open" contract now crosses the package boundary. The website writes stillOpen as a comma-joined string or the literal "None identified in this turn", and voice-input-provenance.tsx in the published package splits and compares that string. A copy change on either side breaks the display. Passing the open field names as a list in the data part, like preparationFailed, would remove the string contract.

…fter a switch

Co-authored-by: Cursor <cursoragent@cursor.com>
kube
kube previously approved these changes Sep 30, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

kostandinang and others added 4 commits October 1, 2026 08:24
An empty or punctuation-only final evicted a superseded turn still waiting for the composer before it was skipped, silently dropping the earlier words. Eviction now runs only for speech that becomes a turn itself.

Refs FE-1793

Co-authored-by: Cursor <cursoragent@cursor.com>
Speech that started while an earlier utterance was still being prepared kept those words in the transcript as a normal voice message without saying they never reached Brunch. It now shows a notice pointing to the composer, like the busy-composer drop path.

Refs FE-1793

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 96a72ae. Configure here.

This branch was successfully deployed

4 active (1 outdated) deployments
Preview – petrinaut-docs — 96a72ae3 Deployed Oct 1, 2026 by vercel[bot]
Preview – hash — 96a72ae3 Deployed Oct 1, 2026 by vercel[bot]
Preview – petrinaut — 96a72ae3 Deployed Oct 1, 2026 by vercel[bot]
Preview – hashdotdesign-tokens — 6d1e9008 Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/apps area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

3 participants