H-6800: Improve Petrinaut Voice turn-taking and answer provenance - #9512
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview Voice provenance moves from a text Voice chip to a compact waveform icon on spoken user messages. Interactive tools can opt in with Supporting refactors split Brunch/voice modules for Fast Refresh (widget, disclosure, config loader, Reviewed by Cursor Bugbot for commit d13535d. Bugbot is set up for automated code reviews on this repo. Configure here. |
Amp-Thread-ID: https://ampcode.com/threads/T-01a06344-05c3-75c8-ac3a-d8a6fd3ede6c Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a06344-05c3-75c8-ac3a-d8a6fd3ede6c Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a06357-5d4a-728b-8b49-57d6d1458733 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a06344-05c3-75c8-ac3a-d8a6fd3ede6c Co-authored-by: Amp <amp@ampcode.com>
Keep the controller paused until Realtime confirms its input and output buffers are clear, preventing resumed speech from being discarded. Co-authored-by: Cursor <cursoragent@cursor.com>
7d768c7 to
4422bfc
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d13535d. Configure here.
| (toolCallId) => toolCallId !== params.toolCallId, | ||
| ); | ||
| if (remainingVoiceToolCallIds.length === 0) { | ||
| return { ...message, metadata: previousMetadata }; |
There was a problem hiding this comment.
Rollback restores stale voice IDs
Medium Severity
When overlapping Voice tool submissions both reject, the later rollback can restore previousMetadata after sibling IDs were already removed. That puts a failed toolCallId back into voiceToolCallIds, so a later typed retry can still receive Voice provenance.
Reviewed by Cursor Bugbot for commit d13535d. Configure here.



🌟 What is the purpose of this PR?
Make Voice interruption predictable and keep Voice attribution next to the interactive-tool answer it describes. Users can explicitly take the turn while the assistant prepares or speaks, and the microphone resumes only after Realtime confirms that canceled input and output have cleared.
This PR collects the independently useful UI/UX improvements discovered while testing H-6763. It does not change semantic VAD eagerness, add full duplex, or provide durable elicitation or canvas writes.
🔗 Related links
brunch_askshim🚫 Blocked by
🔍 What does this change?
🏗️ Agent notes
Imperative: Preserve the useful Voice interaction improvements exposed by H-6763 as a reviewable change independent of the temporary Brunch compatibility mechanism.
Throughline: Voice dock → composer control → host Voice control → turn controller → OpenAI Realtime cancellation acknowledgements → listening resumes. Interactive-tool rendering independently projects Voice provenance immediately before an opted-in answer.
Proof: Controller, Realtime session, host-control, preview-integration, and UI tests cover successful and failed handoffs, stale audio rejection, cancellation ordering, repeatability, inline provenance, and backwards-compatible fallback rendering.
Constraints: Semantic VAD remains at low eagerness so natural thinking pauses are not prematurely committed. The handoff does not disconnect Realtime or enable full duplex. Other interactive tools retain their existing provenance placement unless they opt into the prefix slot.
Fog-line: The durable elicitation and canvas-write architecture remains outside this PR. These interaction behaviors must survive any later replacement of the temporary parent shim.
Stop or reorient: Restack or migrate these behaviors onto the durable Voice branch before #9507 is removed.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
@hashintel/petrinautlibrary and includes its required patch changeset📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
🛡 What tests cover this?
yarn workspace @apps/petrinaut-website lint:tscyarn workspace @hashintel/petrinaut lint:tscyarn workspace @apps/petrinaut-website lint:eslint— 0 errors; 1 pre-existing warningyarn workspace @hashintel/petrinaut lint:eslint— 0 errors or warningsoxfmt, Markdown, architecture-doc, andgit diff --checkvalidation❓ How to test this?
📹 Demo
Not recorded.