Skip to content

feat: show every bot's status in a redesigned sidebar - #158

Open
cheetahbyte wants to merge 2 commits into
mainfrom
feat/sidebar-bot-status
Open

cheetahbyte wants to merge 2 commits into
mainfrom
feat/sidebar-bot-status

Conversation

@cheetahbyte

@cheetahbyte cheetahbyte commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The server reports one status per bot, bots can mark a reply as a question, and the web sidebar is rebuilt around pinned bots and that status.

GET /v1/agents            + status
/v1/events                + bot-status {agentId, status}, on connect and on change

status, first that applies
  blocked    bot, call, credential, or login request, or held action pending
  question   job question pending, or chat question open
  failed     latest turn failed
  thinking / working / idle

BotNeeds (new port)       request stores and jobs register a source and announce changes
bots-status               one computation per bot at a time, 50 ms coalescing, idle without listeners
mark_question (new tool)  chat question, derived from the transcript, open until the owner's next message
sidebar
├─ Crumble            (search on phones)  Activity  Settings
├─ pinned bots        portraits, three to a row; right-click or long-press unpins, drag reorders
├─ Automations
└─ Bots               avatar state, unread dot, pin from the More menu

Memory moves to Settings > Memory (/memory redirects) and the theme to Settings > General. A retrying bot shows as working: the exclamation mark now only means that the bot needs the owner or its last reply failed.

Why

The web app knew a bot's state only after its chat was opened, so a bot that failed or waited for the owner looked idle in the sidebar. The sidebar also gave rarely used pages as much room as the bots.

Evidence

Before After
Old sidebar: search, pinned bots as rows, bots, workspace pages, theme and settings New sidebar, light: Juniper thinking, Atlas with a question, Pico waiting for a decision, Wren failed
Dark New sidebar, dark

The scripted test model answers the E2E- messages.

  • bun run check (also run by pre-push): 1,299 pass, 118 skip, 0 fail. apps/docs check passes.
  • New tests: bot-status.test.ts (list, replay, each status on and off, account isolation), chat-question.test.ts, sidebar.dom.test.tsx. "a slow computation never overwrites a newer status" failed before computations were serialized and passes now.
  • End to end in headless Chromium, with a local scripted model on a scratch data directory: question, failed, and blocked appear live for bots whose chat isn't open and survive a reload; an owner message clears the question; declining a bot request clears blocked. Pin, unpin, drag, long-press (emulated phone), phone search, dark mode, and the /memory redirect work without page errors.
  • Not run: real models deciding when to call mark_question, and a physical phone.

Risk and rollback

Reversibility: Reversible. No migration and no stored state; a question left in a transcript is an ordinary tool result.

Blast radius: every bot gets the mark_question tool. GET /v1/agents and /v1/events change additively. Web navigation changes for all users.

  • The avatar asks for mark: "question", which open-bot-avatar 0.3.0 ignores, so a question shows an exclamation mark until a release supports it (proposed upstream, not released). The accessible name and tooltip tell the states apart.
  • While a chat turn runs, its status is re-read once a second, so thinking to working can lag. A turn that only calls tools stays "thinking" until text streams.
  • A stopped job with an unanswered question stays question, because the API still lists it and accepts an answer.
  • Paused bots are dimmed but no longer labeled "Paused" in the sidebar.

GET /v1/agents returns a status for each bot, and /v1/events sends bot-status
events on connect and on change: blocked, question, failed, thinking, working,
or idle. Request stores and jobs register what they wait for through BotNeeds.
The mark_question tool flags a reply as a question that stays open until the
owner's next message.
Pinned bots are portraits, three to a row, above Automations and the other
bots. Avatars show the bot status from the server, also for chats that aren't
open. Memory and the theme move to Settings, Activity and Settings to the
header. The exclamation mark no longer means a retry.
@github-actions

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit ca1a0b2.

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