feat(desktop): streaming indicator with preparing/streaming/stalled states#3118
Merged
Merged
Conversation
…tates
Long agent turns sometimes hang in the middle of streaming — the
provider accepts the request, sends the first 50 tokens, then nothing
for 30+ seconds while it thinks. Today the user sees a frozen bubble
with no signal of what state the request is in; they have to read the
status-bar spinner to guess.
Add StreamingIndicator: a small inline status line that lives under
the in-flight assistant bubble. It's a state machine driven by the
message's text length and a 1Hz heartbeat:
preparing turn started, no text yet
(model warm-up pause, first few seconds)
streaming text deltas arrived within the last 6s
(the normal happy path)
stalled no deltas for >6s while still streaming
(the model is thinking OR the request dropped;
the indicator gives the user a clear signal that
something is happening, not that the app is hung)
The error state (turn_done with e.err) is shown as a separate chip
with a Retry button. The button is currently a no-op stub — the
controller integration needs a ResumeFrom(offset) binding that
re-submits the previous turn's prompt, which is a separate change.
The affordance is rendered so the wiring is a one-line drop-in.
A11y: role=status + aria-live=polite so screen readers announce the
state transitions (a stalled bubble is exactly the kind of event a
screen-reader user would want called out).
prefers-reduced-motion disables the loader spin. The chip re-uses
the existing soft surface / warn / err tokens, so the theme picker
(PR-03) automatically styles it correctly.
4e8b2ee to
cb9c02c
Compare
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.
Long agent turns sometimes hang in the middle of streaming. Today the user sees a frozen bubble with no signal of what state the request is in.
Add
StreamingIndicator: a small inline status line that lives under the in-flight assistant bubble. State machine driven by the message's text length and a 1Hz heartbeat:preparingturn started, no text yet (model warm-up pause)streamingtext deltas arrived within the last 6sstalledno deltas for >6s while still streamingerrorturn_done withe.err(with a Retry button)A11y:
role=status+aria-live=politeso screen readers announce the state transitions.