Skip to content

FE-1833: Speak progress while Brunch works - #9889

Open
kostandinang wants to merge 6 commits into
mainfrom
kd/fe-1833-speak-progress
Open

kostandinang wants to merge 6 commits into
mainfrom
kd/fe-1833-speak-progress

Conversation

@kostandinang

@kostandinang kostandinang commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Let Brunch say a short progress line during long Live voice turns, while staying silent through quick answers and fast tool bursts.

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Code chooses up to two fixed progress lines per turn and instructs Live to read them verbatim.
  • Stay quiet during speech and approval waits, with timing limits to avoid chatter.
  • Send Live quiet context about the current work, keep progress out of written history, and hold the final summary while progress audio is active.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

  • No publishable library changes.

📜 Does this require a change to the docs?

  • Yes; voice documentation is still pending.

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

  • No execution graph changes.

⚠️ Known issues

The recording exposed a final-caption mismatch: part of the acknowledgement appears in the written summary but not its audio. Live also added “I'm” to the second progress line. The model build was blocked by browser-tool lease failures.

🐾 Next steps

Fix the caption mismatch, verify a successful model-building turn, and finish the voice docs before marking ready.

🛡 What tests cover this?

  • Scripted turns, timing boundaries, approval waits, interruptions, summary ordering, and written history.
  • Passed: 1,038 unit tests, 5 integration tests, type checking, lint, formatting, and build.

❓ How to test this?

  1. With working voice credentials, run PETRINAUT_OPENAI_VOICE_ENABLED=true PETRINAUT_VOICE_PROVIDER=live yarn dev:brunch. Open /new on port 4915.
  2. Try quick answers, long model-building and experiment turns, interruptions, and approval waits.
  3. Check verbose [Petrinaut Live trace] logs. Progress should be audible only on long turns, leave the request open, and neither overlap the summary nor appear in written history.

📹 Demo

progress-demo.mp4

Click to play with sound. Real Live session, 70 seconds with long pauses trimmed: first progress at 0:28, second at 0:39, final response at 0:48. The final response reports the failed model build; this is not a successful-build demo.

@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
petrinaut Ready Ready Preview Oct 5, 2026 8:22am UTC
petrinaut-docs Ready Ready Preview Oct 5, 2026 8:22am UTC
2 Skipped Deployments
Project Deployment Actions Updated
hash Ignored Ignored Preview Oct 5, 2026 8:22am UTC
hashdotdesign-tokens Ignored Ignored Preview Oct 5, 2026 8:22am UTC

Request Review

@cursor

cursor Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Complex real-time voice orchestration (timing, tool approval, caption vs audio) could mis-order progress and final summaries in edge cases, but changes stay in the Live voice path rather than core auth or data persistence.

Overview
Adds timed progress narration for OpenAI Live while Brunch runs tools, without treating those lines as final answers or written chat history.

A new ProgressPolicy watches assistant tool parts (including host isToolAwaitingApproval) and may send up to two fixed phrases via appendCommentary with a null delegation, plus quiet JSON appendThinking context. LiveBrunchBridge polls on a timer, tracks Live output activity to avoid talking over playback, holds the settled wrap-up summary until progress audio finishes, and keeps delegations open until the real summary lands.

LiveConversationControl and LiveSpeechCaptions treat null-delegation progress separately from wrap-ups (no user-visible failure warnings, progress omitted from saved captions until settlement). Live session instructions now tell the model to read supplied progress verbatim. The demo app wires approval pending checks from mutationApproval.coordinator.

Coverage is mostly new/extended unit tests across the bridge, policy, captions, and control layers.

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

@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-speech-captions.ts 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.

kostandinang and others added 5 commits October 2, 2026 21:56
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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 18488e5. Configure here.

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

This branch was successfully deployed

3 active (1 outdated) deployments
Preview – petrinaut-docs — 535dd558 Deployed Oct 5, 2026 by vercel[bot]
Preview – petrinaut — 535dd558 Deployed Oct 5, 2026 by vercel[bot]
Preview – hash — 18488e58 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant