docs(voice): TODO for stream-mode ui_op aggregator flush (colon-tail leak)#846
docs(voice): TODO for stream-mode ui_op aggregator flush (colon-tail leak)#846swaroopvarma1 wants to merge 1 commit into
Conversation
…leak) The stream-mode bridge `_consume_events` ui_op branch emits the ui-op RTVI event without flushing the sentence aggregator first, unlike the other turn-boundary branches (function_call_started / function_approval_requested / turn_end). When prose before a `<ui_stream>` marker ends mid-sentence (e.g. a trailing colon), the buffered tail leaks into the post-carousel bubble. Low severity and deferred — documented as an inline TODO at the site plus a note in docs/widget/VOICE_GENERATIVE_UI_TODO.md. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughAdds a ChangesAggregator flush TODO documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Tara-ag
left a comment
There was a problem hiding this comment.
Review Summary
Files reviewed: 2
app/ai/voice/agents/breeze_buddy/chat/voice_bridge.py- TODO comment addeddocs/widget/VOICE_GENERATIVE_UI_TODO.md- Documentation update
Issues found: 0 (none)
New issues by severity:
- 🔒 CRITICAL: 0
⚠️ MAJOR: 0- 💡 MINOR: 0
- 💬 SUGGESTION: 0
Assessment:
This is a clean documentation-only PR that accurately documents a known low-severity issue. The TODO correctly identifies that the ui_op branch in _consume_events doesn't flush the _SentenceAggregator before emitting the ui-op RTVI event, unlike the function_call_started, function_approval_requested, and turn_end branches which all call agg.flush() before their boundary events.
No blocking criteria met. The PR is safe to merge.
What
Documents a known, low-severity issue in the widget stream-mode voice bridge as a deferred TODO (no behavior change).
In
chat/voice_bridge.py_consume_events, theui_opbranch emits theui-opRTVI event without flushing the_SentenceAggregatorfirst — unlikefunction_call_started/function_approval_requested/turn_end, which allagg.flush()before their boundary event. A<ui_stream>block is a hard turn boundary (the widget finalizes the open transcript bubble onui-op), so if the prose before the marker ends mid-sentence (e.g. a trailing colon,"...best options:"), that buffered tail leaks into the post-carousel bubble.Why deferred
Low severity — the
<ui_stream>marker is normally newline-led, so the aggregator is usually empty at the boundary; the leak only surfaces on a mid-sentence cutover. Captured now (right after the voice-as-chat release) so it isn't lost.Changes
TODO(voice-as-chat)at theui_opbranch with the exact one-line fix.docs/widget/VOICE_GENERATIVE_UI_TODO.md.Fix (for the follow-up):
for chunk in agg.flush(): await self._speak(chunk, gen)immediately before the_emit_rtvi(_RTVI_UI_OP, ...)call.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores