Skip to content

feat(client): live per-session activity dashboard in the Flutter client sidebar - #486

Merged
emal-avala merged 1 commit into
mainfrom
feat/tui-agent-dashboard
Jul 25, 2026
Merged

feat(client): live per-session activity dashboard in the Flutter client sidebar#486
emal-avala merged 1 commit into
mainfrom
feat/tui-agent-dashboard

Conversation

@emal-avala

Copy link
Copy Markdown
Member

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

  • SessionActivity enum (label, glyph, sort order) mirroring the terminal client's task states, plus an Idle for connected-but-quiet sessions.
  • SessionBloc derives activity per session from that session's WebSocket streams — no dependency on the active chat:
    • tool_start / text_delta / thinkingWorking
    • incoming ask_permissionNeeds input
    • done / turn_completeIdle
    • errorFailed
    • Subscriptions are tracked per session and cancelled on destroy/close (no leaks). WsClient creation is injectable purely so tests can drive controllable streams; production behavior is unchanged.
  • SessionState carries Map<String, SessionActivity> (activityFor helper), and copyWith gains a clearActive flag — fixing a latent bug where the active session id could never be set back to null (destroying the last session now empties it).
  • Sidebar: a themed status dot + label per session, and a summary header (N need input · M working · K idle, zeros omitted, "All idle" when calm), surfacing needs-input/working first.

Verification

  • 46 tests pass (flutter test): SessionActivity, SessionBloc activity derivation from mocked WS streams (working/needs-input/idle/failed transitions, subscription cleanup, late-notification safety), and Sidebar widget rendering (labels, dots, summary counts, empty state).
  • flutter analyze clean for the new code (remaining infos are pre-existing prefer_const_constructors in unrelated test files).
  • Built to web and rendered in a real browser via Playwright (system Chrome) — the app boots and renders without console errors; screenshot reviewed. Live status badges need a running agent serve backend the web client connects to; their rendering is covered by the widget tests.
  • Adds client/e2e/dashboard-shot.spec.ts — a Playwright screenshot spec for visual review of the running web client.

Notes

  • This is the dashboard core (per-session live state). Natural follow-ups: surface background subagents/tasks within a session, a fuller overview/grid view, and richer chat (tool cards + inline diffs mirroring the terminal client).

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@emal-avala
emal-avala merged commit 081c813 into main Jul 25, 2026
19 checks passed
@emal-avala
emal-avala deleted the feat/tui-agent-dashboard branch July 25, 2026 04:54
@emal-avala emal-avala mentioned this pull request Jul 25, 2026
8 tasks
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