#3406·picoclaw

[Feature] Web UI: clearer working indicator, separate manual/channel sessions, richer session list with archiving

Author: racso2609Created Sep 29, 2026Updated Sep 29, 2026

The Goal / Use Case

The built-in Web UI (launcher dashboard, web/frontend) is now the main day-to-day way to chat with PicoClaw, but three UX rough edges make it frustrating for real use:

  1. "Is it still thinking?" is unclear. While a turn runs, the chat shows a generic spinner (components/chat/typing-indicator.tsx: bouncing dots + a shimmer bar + 4 rotating canned phrases from chat.thinking.step1..4). It never reflects what is actually happening — connecting, waiting on the model, running a tool call, or stalled. During a long reasoning turn (or a hung provider) the user cannot tell the difference between "working" and "dead", so they wait, reload, or resend.

  2. Manual sessions and channel sessions are mixed together. The session history dropdown is populated by GET /api/sessions, whose backend (web/backend/api/session.go, handleListSessions) only discovers the pico channel store (findPicoJSONLSessions → extractPicoSessionIDFromScope requires scope.Channel == "pico"). So every session is shown as one flat list with no source: manually created Web-UI chats, the Web UI's own pico session, and external integrations that also use the pico channel with a custom session_id (e.g. a webhook bridge using session_id=trello-webhook) all look identical. There is no way to filter "only my manual chats" vs. "only the Telegram/channel traffic".

  3. Session management is cramped and destructive. The list is a tight dropdown (components/chat/session-history-menu.tsx, w-72 / max-h-[300px], infinite scroll). There is no search, no sorting, no rename, no pinning, and no archive — the only action is a hard delete (DELETE /api/sessions/{id} → handleDeleteSession), which permanently removes the transcript. Users who just want to declutter have to destroy history.

Proposed Solution

1. Honest, state-driven "working" indicator

Replace the canned rotating text with a real phase indicator driven by the events the client already receives over the pico WebSocket (features/chat/protocol.ts):

  • typing.start / typing.stop → idle vs. running
  • message.create with placeholder: true → model is generating
  • assistant message with kind === "thought" → a reasoning block is being produced (already parsed)
  • assistant message with kind === "tool_calls" → a tool call is in flight (already parsed)
  • message.update → streaming progress

Show the concrete phase (e.g. Connecting… → Thinking… → Running tool X… → Writing…), a live elapsed timer, and after N seconds escalate to a clearly different "still working — the model is taking longer than usual" state (with a hint that the turn can be interrupted). No fake progress; only what the stream actually reports.

2. Separate manual sessions from channel sessions

  • Backend: expose the session source in the list item. sessionListItem (web/backend/api/session.go) already has access to memory.SessionMeta / session.SessionScope; add a channel (or source) field so the API returns where the session came from (web/manual, telegram, pico, cron, …).
  • Frontend: add a source selector/filter to the history UI, defaulting to the current source, so "my manual chats" and "Telegram (or other channels)" never get mixed. This is the Web-UI counterpart of the closed #3307 (/session list for chat channels).

3. Comfortable session list + archiving

  • Promote the history from a cramped dropdown to a proper list (dedicated panel/page or roomier drawer) with: search, sort (recent / created / message count), filters by source, rename, and pin/favorite.
  • Add a soft archive action distinct from delete: archived sessions leave the default list but remain recoverable. Concretely, add an archived flag (or an archive endpoint) instead of forcing users to choose between "keep everything" and "hard delete". Keep permanent delete as a separate, confirmed action.

Potential Implementation (Optional)

  • web/frontend/src/components/chat/typing-indicator.tsx — replace the canned steps with a phase machine fed from store/chat.ts state set in features/chat/protocol.ts.
  • web/frontend/src/features/chat/protocol.ts — derive an explicit turnPhase (idle / thinking / tool / writing / stalled) from the events already handled.
  • web/backend/api/session.go — extend sessionListItem + buildSessionListItem with a channel/source field; add an archive action and an archived filter to handleListSessions.
  • web/frontend/src/api/sessions.ts — extend SessionSummary with the new fields; add archiveSession.
  • web/frontend/src/components/chat/session-history-menu.tsx (+ a new sessions view) — source filter, search/sort, pin, archive.
  • Persist the archive flag in the session store metadata (pkg/session, memory.SessionMeta) so it survives restarts, and consider excluding archived sessions from the default GET /api/sessions response (or gating them behind a query param).

Impact & Roadmap Alignment

  • This is a Core Feature
  • This is a Nice-to-Have / Enhancement
  • This aligns with the current Roadmap

Alternatives Considered

  • Only fix the indicator text: rejected — the flat session list and the destructive-only delete are independent problems the user hits constantly.
  • Only add a client-side source filter without backend changes: rejected — the source is not currently exposed by the API, so the client cannot distinguish sources reliably.
  • Reuse hard delete as "archive": rejected — it destroys history; archiving should be reversible.

Related prior issues (both auto-closed as stale without being resolved): #2216 (show thinking content in WebUI) and #3307 (session list/switch for chat channels). This issue covers the remaining Web-UI UX gaps.

Additional Context

  • Verified against main (web/frontend + web/backend). The Web UI lives in the main repo (web/), while sipeed/picoclaw_fui is the separate Flutter client — so these changes belong here.
  • Real-world motivation for item 2: a pico-channel bridge with a custom session_id (e.g. trello-webhook) currently shows up in the same history list as the user's manual chats, with no way to tell them apart.