Skip to content

Fix skipped texts. - #1023

Open
polina-c wants to merge 5 commits into
flutter:mainfrom
polina-c:fix-disappeared-messages
Open

Fix skipped texts.#1023
polina-c wants to merge 5 commits into
flutter:mainfrom
polina-c:fix-disappeared-messages

Conversation

@polina-c

@polina-c polina-c commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Before: some text fragments recieved from model are skipped.
After: the entire message is displayed.

@polina-c

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors ChatSession by moving the resetting of _currentAiMessage into the shared _runRequest method to ensure all requests (including button taps) start a new message bubble. The reviewer noted that concurrent execution of _runRequest could lead to race conditions and suggested adding a guard clause to return early if a request is already processing.

Comment thread examples/simple_chat/lib/chat_session.dart

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors ChatSession by moving the reset of _currentAiMessage into the base _runRequest method to ensure all requests, including button-triggered ones, get their own message bubbles. The reviewer identified a potential concurrency issue where concurrent calls to _runRequest could corrupt the state or cause UI inconsistencies, and suggested guarding the method when a request is already in progress.

Comment thread examples/simple_chat/lib/chat_session.dart
polina-c and others added 3 commits August 11, 2026 21:29
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@polina-c
polina-c requested a review from gspencergoog August 12, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant