feat(client): live per-session activity dashboard in the Flutter client sidebar - #486
Merged
Conversation
Turn the plain session list into an at-a-glance dashboard: each session now
shows a live status (Working / Needs input / Idle / Done / Failed), plus a
summary header, so you can see across all sessions which ones are busy or
waiting on you.
- SessionActivity enum (label, glyph, sort order) mirroring the terminal
client's task states, with an added Idle for connected-but-quiet sessions.
- SessionBloc derives activity per session from that session's WebSocket
streams — tool_start/text_delta/thinking → Working, an incoming ask_permission
request → Needs input, done/turn_complete → Idle, error → Failed. Each
session's subscriptions are tracked and cancelled on destroy/close (no leaks);
WsClient creation is injectable so tests can drive controllable streams.
- SessionState carries activity per id (activityFor helper). Fixes copyWith so
activeSessionId can actually be cleared (clearActive flag) — destroying the
last session now empties the active id.
- Sidebar renders a themed status dot + label per session and a summary header
("N need input · M working · K idle", zeros omitted; "All idle" when calm),
ordering needs-input/working first.
- Tests: SessionActivity, SessionBloc activity derivation from mocked streams,
and Sidebar widget rendering (labels, dots, summary, empty state).
- e2e: a Playwright spec that screenshots the running web client for review.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Summary
Turns the Flutter client's plain session list into a live agent dashboard: each session shows an at-a-glance status, plus a summary header, so you can see across all your sessions which are busy or waiting on you — the graphical counterpart to the terminal client's tasks view.
What changed
SessionActivityenum (label, glyph, sort order) mirroring the terminal client's task states, plus anIdlefor connected-but-quiet sessions.SessionBlocderives activity per session from that session's WebSocket streams — no dependency on the active chat:tool_start/text_delta/thinking→ Workingask_permission→ Needs inputdone/turn_complete→ Idleerror→ FailedWsClientcreation is injectable purely so tests can drive controllable streams; production behavior is unchanged.SessionStatecarriesMap<String, SessionActivity>(activityForhelper), andcopyWithgains aclearActiveflag — fixing a latent bug where the active session id could never be set back tonull(destroying the last session now empties it).N need input · M working · K idle, zeros omitted, "All idle" when calm), surfacing needs-input/working first.Verification
flutter test):SessionActivity,SessionBlocactivity derivation from mocked WS streams (working/needs-input/idle/failed transitions, subscription cleanup, late-notification safety), andSidebarwidget rendering (labels, dots, summary counts, empty state).flutter analyzeclean for the new code (remaining infos are pre-existingprefer_const_constructorsin unrelated test files).agent servebackend the web client connects to; their rendering is covered by the widget tests.client/e2e/dashboard-shot.spec.ts— a Playwright screenshot spec for visual review of the running web client.Notes