Repository navigation
fix: avoid duplicate assistant bubbles for previewed completions - #153
Conversation
Fix duplicate previewed assistant completions in remote chat
Respect final reasoning verbosity when settling previews
rusty4444
left a comment
There was a problem hiding this comment.
Hermes review: two blocking reconciliation bugs. At lib/core/screens/chat_screen.dart:3299-3332, a previewed completion is reconciled with the newest interim without checking its text. With interims A then B and completion A, B is overwritten and A appears twice. Also, response_transformed means an output hook changed the final answer; a distinct transformed final can replace and lose interim commentary. The added tests use message.start between replies, but the gateway emits that at turn start, so they miss the no-intervening-delta case. Please match the actual previewed interim and preserve distinct commentary; add regressions for both. CI passed for this head, but do not merge until fixed.
rusty4444
left a comment
There was a problem hiding this comment.
Thanks @krotname for the contribution. I added a maintainer follow-up commit on your PR head (968d1cd) to settle only exact raw-text preview matches, preserve distinct transformed commentary, and cover the no-intervening-start and rendered-text cases. This keeps your original commits and authorship intact. Local full analysis and all 1,337 tests passed; current-head PR CI also passed.
Problem
When the gateway emits the final answer as
message.interimand then sendsmessage.completewithresponse_previewed: true, the chat displays the same answer twice. For example, a3+4request ends with two identical7bubbles.Changes
message.startboundaries, keeping separate messages and repeated user turns distinct.Validation
test/chat_history_scroll_test.dartpassed.