Let the Thinking section be collapsed while the model is still thinking#828
Open
salmanmkc wants to merge 363 commits into
Open
Let the Thinking section be collapsed while the model is still thinking#828salmanmkc wants to merge 363 commits into
salmanmkc wants to merge 363 commits into
Conversation
PiperOrigin-RevId: 797861660
PiperOrigin-RevId: 798305739
PiperOrigin-RevId: 798306012
PiperOrigin-RevId: 798368240
Add Android OS requirement to README
PiperOrigin-RevId: 799245337
PiperOrigin-RevId: 799283470
PiperOrigin-RevId: 799311930
PiperOrigin-RevId: 800107395
PiperOrigin-RevId: 800516780
PiperOrigin-RevId: 800638495
PiperOrigin-RevId: 802190892
PiperOrigin-RevId: 802213068
PiperOrigin-RevId: 802314131
…d allowlist" dialog dismissable. PiperOrigin-RevId: 803496612
PiperOrigin-RevId: 804957426
PiperOrigin-RevId: 805034733
PiperOrigin-RevId: 805432594
PiperOrigin-RevId: 805870399
- Hide keyboard after sending a prompt. - Scroll to bottom when a new prompt is sent. - Show warning when user tries to import a web model. PiperOrigin-RevId: 805909987
PiperOrigin-RevId: 807750198
PiperOrigin-RevId: 807762995
PiperOrigin-RevId: 807856963
PiperOrigin-RevId: 906649917
PiperOrigin-RevId: 906753938
PiperOrigin-RevId: 907029492
…y using deterministic short IDs. PiperOrigin-RevId: 907072316
PiperOrigin-RevId: 907086171
PiperOrigin-RevId: 907092493
PiperOrigin-RevId: 907174331
PiperOrigin-RevId: 907388189
PiperOrigin-RevId: 907668212
PiperOrigin-RevId: 908801411
PiperOrigin-RevId: 910146658
- Added `SystemPromptRepository` to persist custom prompts via DataStore. - Added `SystemPromptHelper` to resolve the effective prompt (custom override vs. default fallback) PiperOrigin-RevId: 910346906
PiperOrigin-RevId: 910957874
PiperOrigin-RevId: 910995322
PiperOrigin-RevId: 911586327
PiperOrigin-RevId: 911598177
PiperOrigin-RevId: 911749453
…iongemma-typo fix: correct FunctionGemma typo in README
…mini app experience. Key Changes: - **Smoother Token Streaming**: Replaced the token-by-token display with a fade-in effect that reveals buffered chunks of tokens during model response streaming. - **Updated Scrolling Behavior**: Disabled auto-scrolling. Introduced a "Jump to bottom" button that appears whenever the content area is scrollable. - **Cleaner Model Response**: Remove the "bubble" around the model response text and make text full width. - **Optimized Screen Space (Chat Only)**: When a new user prompt is sent, the view now automatically scrolls to align the prompt with the top edge of the screen, maximizing the visible area for the incoming response. PiperOrigin-RevId: 912129993
…_current_date_and_time" intents. PiperOrigin-RevId: 912136923
PiperOrigin-RevId: 912278828
PiperOrigin-RevId: 912570504
PiperOrigin-RevId: 913067368
PiperOrigin-RevId: 913170264
PiperOrigin-RevId: 913755747
…hat. Introduces a new `schedule_notification` action in IntentHandler. PiperOrigin-RevId: 913782888
…fications in Agent Chat. PiperOrigin-RevId: 913888328
…cations scheduled via the "schedule-notification" skill to open the LLM Agent Chat screen with a pre-filled query. PiperOrigin-RevId: 913949881
The Thinking expander auto-expanded on every recomposition while the model was still streaming its thoughts, so tapping the header to collapse it had no effect until streaming finished. Initialize the expanded state from inProgress once via remember instead of forcing it true on every recomposition, so the section still auto-opens when the message first shows up but the user can collapse it at any time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #534.
The Thinking expander was forcing
isExpanded = trueon every recomposition whileinProgresswas true, so tapping the header to collapse it had no visible effect until the model stopped thinking. Initialize the state frominProgressonce withrememberinstead, the section still auto-opens when the thinking message first appears, but the user can collapse it whenever.Test plan
./gradlew :app:compileDebugKotlinpasses.inProgress = true, soremember { mutableStateOf(inProgress) }starts expanded. Subsequent recompositions don't re-init the state, so user taps stick.Tested like this:
This is with the fix (Verified locally on an emulator using a temporary debug injection that adds a ChatMessageThinking(inProgress = true) on chat open (not part of this PR, used only for repro). With the fix applied, tapping the "Show thinking" header while inProgress is still true correctly collapses the section. Without the fix, the tap had no effect until streaming finished.)
Before the fix, the behavior is broken, we couldn't collapse:
CleanShot.2026-05-12.at.03.40.44.mp4
After the fix, now we can collapse:
CleanShot.2026-05-12.at.03.35.13.mp4