Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Workbench refinements
Status: approved by the owner on 2026-11-01, together with the answers to the design questions (see "Owner decisions"). Mockups are on the Show Page of the design Session.
Three refinements to the Workbench:
- The Inbox separates Bot conversations from ordinary Sessions, and notifications can be switched per category.
- The sidebar's Projects section collapses like Capabilities.
- Runs of Harness messages in a conversation fold into one group.
Delivery: items 2 and 3 are front-end only and ship now, one PR each. Item 1
waits for the Bots backend (docs/plans/bots.md, PR 4 of its delivery plan):
the server work goes to the GPT line, the interface to the Claude line.
Owner decisions (2026-11-01)
- A category whose notifications are off does not count in aggregate badges.
- The switches belong to the account, not the device.
- Muting a single Bot comes later; the storage reserves room for it.
- The desktop app notifying for Bot replies is the next small step after item 1.
- A Session's first message never folds into a Harness group.
- The preferences live in
state_meta, not a new table (orchestrator, same day).
1. Inbox categories and notification switches
Implement after the Bots backend has merged.
Current facts
- Unread means an unread Agent
resultrow, counted per Session, excluding archived and non-foreground Sessions (storage/messages_service.py::unread_counts_by_session,total_unread).vibe/message_types.jsonmarksresultas the onlyunreadtype;resultanderroraswebPush; andnotifywithbackend_failurethroughwebPushWhenEvents. GET /api/inbox(vibe/ui_server.py::inbox_list) returns the paged feed plusunread_by_session,unread_total, andunread_sessions.ui/src/context/WorkbenchInboxProvider.tsxownsunreadBySessionandtotalUnread, and mirrors the total to the PWA app badge (setAppBadge, plus avibe.app-badge-currentmessage to the service worker) and the tab favicon (syncFaviconBadge).WorkbenchSidebar.tsxrenders the Inbox entry andInboxHoverPopover;InboxPage.tsxholds the Unread/All filter,WebPushControl, and mark-all-read.- Web Push:
core/message_mirror.pycallscore/web_push_notifications.py::maybe_notify_inbox_messagefor each new Workbench Agent message of a notifiable type._send_to_enabled_subscriptionswaits 3 s, skips a message already read, resolves the owners from the latest user message's_web_push_user_key(s), applies the Personal or Organization authorization and the Project policy, then sends to every enabled subscription of each owner withbadge_countfrom_badge_count_for_user_key. Subscriptions are per device (storage/web_push_service.py). ui/public/push-sw.jsshows a notification for every push (iOS requires it, so a push cannot be dropped on the device) and refreshes the app badge from/api/inbox?platform=avibe&limit=1→unread_total.- Desktop app:
desktop/runtime-host/src/notifications.rsfollows/api/eventsand raises OS notifications only forvaults.updated(a pending approval) andruns.updated(a background run reaching a terminal state); the Dock badge reads/api/inbox→unread_total. The tray "Notifications" item (desktop/src-tauri/src/notifications.rs) stores a per-shell switch. No OS notification is raised for Agent replies. Contract:docs/plans/desktop-notifications-sse.md. - The desktop pet lists Sessions with unread replies
(
ui/src/pet/usePetReplyActivities.ts). IM platforms notify through their own apps. - On the owner's machine, foreground Sessions produced 4,139 Agent replies in the 30 days before the design, about 138 pushable messages a day.
Behavior
Categories:
bot: the message's Session is the permanent Session of a current Bot (ses_<handle>of an enabled Bot).session: every other Inbox Session, and workspace-addressed failure notices that have no Session.- Bots are owner-only in phase 1, so other members have one category and see only the master switch.
Preferences belong to the account (user_key: local or remote:<sub>),
default all on:
| Field | Meaning |
|---|---|
enabled |
master switch |
bots |
Bot messages |
sessions |
ordinary Session messages |
A category is loud when enabled and its own switch are on, otherwise
quiet. A quiet message is not pushed and not counted in aggregate badges;
it is still delivered, listed, and unread.
| Path | Category quiet | Master off |
|---|---|---|
| Web Push (every subscribed device) | nothing sent for that category | nothing sent |
| PWA app icon badge, desktop Dock badge, tab favicon | count excludes the category | cleared |
| Sidebar Inbox icon | number counts loud categories; grey dot when only quiet unread remains | grey dot when anything is unread |
| Desktop OS notifications | run.terminal for that category's Sessions suppressed; Vault approvals still notify |
none |
| Per-conversation counts (Bot avatars, project-tree Session rows, Inbox rows) | unchanged; Inbox rows of a quiet category draw their count grey | unchanged |
| Pet, IM | unchanged | unchanged |
badge_totalis the unread sum over loud categories. With the default preferences it equalsunread_total, which keeps the Inbox total ofdocs/plans/bots.mdD5.- Vault approvals block on the user and are not messages: they notify while
enabledis on, whatever the category. - The Web Push test ignores categories; its toast says when a category is quiet.
- The tray item stays the device switch for desktop OS notifications, as the subscription is for Web Push. The device switch and the account preference must both allow a notification.
- Next step after this item: the desktop app raises an OS notification for a Bot reply while Bot messages are loud and its window is not focused.
UI
- Inbox popover and Inbox page: two sections, Bots first, then Sessions. Each section header shows its unread count; a quiet section shows a grey count and a "Muted" mark. The popover shows up to three Bot rows and three Session rows, unread first within each, with the existing "more unread in the full Inbox" link per section. A Bot row is avatar, display name, and preview; it needs no Bot tag inside its own section. The page keeps Unread/All and adds "mark this section read" to the Sessions header.
NotificationMenu: the master switch, Bot messages, Session messages (with a one-line note when Sessions are off), this device's push state with Test or Enable, and a link to Settings › Notifications. It opens from a bell in the popover header (left of "Mark all read") and from a "Notifications: All / Bots only / Sessions only / Off" button on the Inbox page toolbar. The bell isBellwhen everything is on,BellMinuswith a short label when partial, andBellOffwhen off. In the hover popover the bell swaps the popover's body for the menu in place, with a way back, so the hover surface never hosts a second floating layer; on the Inbox page the menu is an ordinary popover.- Settings › Notifications, a new page right after General in
ui/src/components/settings/SettingsLayout.tsx: the same switches with one-line explanations, "This device" with the fullWebPushControl(moved out of the Inbox toolbar), and, in the desktop app, a note that its OS notifications are switched from the tray menu. - The client holds the switches in one provider above the router
(
NotificationPreferencesProvider), read on mount and re-read on the stream's preference nudge, a reconnect, or an authorization change. A change applies at once and writes only the switch it changes, which the server merges, so two devices changing different switches keep both. Overlapping writes' responses cannot say which the server applied last, so each confirms only the switches it wrote; a refused save puts its switches back to their last confirmed value unless a later change has set them since, and the record is read back once the last write of a burst settles. - A Session is a Bot conversation while it is a current Bot's permanent
Session, the server's definition. The client reads it from the Owner's live
Bot list (
BotsProvider, refetched onbots.changed), which a small bridge (BotRosterContext) carries up to the Inbox provider above the router; a reader without Bots has one category. The client computes the badge from its live unread map and the switches, and the aggregate badges wait until the map, the switches, and the Bot list are all known. A shared fixture (ui/src/lib/notificationBadge.fixture.json) runs against both this computation and the server'sbadge_total, including across a Bot's removal. - A removed Bot's Session is hidden (
bots.mdD1), not reclassified. Which Sessions exist is the server's answer alone: the event stream drops aninbox.session.updatedrow for a Session the recipient'sGET /api/inboxhides (the samehidden_bot_session_idsowner, per recipient, on the delivery worker thread); onbots.changedan open client re-reads its unread map and, while the feed is shown, its window; and a re-read of the window drops loaded rows the server no longer returns within the range it re-read, so a change missed while the stream was down converges on reconnect too. - Sidebar Inbox icon: a cyan number for
badge_total; a grey dot with no number whenbadge_totalis 0 and anything is unread.
Server and API
- Storage:
state_metakeynotification_preferences:<user_key>, value JSON{"enabled": true, "bots": true, "sessions": true}, read and written through the existingget_state_meta/set_state_metahelpers; no migration. A missing key or field means on; unknown fields are preserved on write. A later per-Bot mute addsmuted_bots: [<handle>, ...]to the same value. GET /api/notifications/preferencesandPUT /api/notifications/preferences, scoped to the caller'suser_key(the key_web_push_user_keyresolves), with CSRF like other writes. A write publishes SSEnotifications.preferences.updated.- One helper owns categorization, for example a Bot-session-id set read from the Bot registry, shared by the Inbox listing, push gating, and badges. The category cannot come from the scope: Bot Sessions have none.
GET /api/inbox: each row gainscategory; the response gainsunread_by_category({bot, session}) and the caller'sbadge_total. An optionalcategory=bot|sessionfilter onlist_inbox_sessionslets each Inbox page section page on its own.- Web Push:
_send_to_enabled_subscriptionsdrops, after authorization and the Project policy, the owners for whom the message is quiet, recording a newmuteddisposition in the diagnostics ring;_badge_count_for_user_keyreturnsbadge_total. Before that, it drops the owners whose Inbox hides the Session (hidden_bot_session_ids: a removed Bot's for the Owner, every Bot's for anyone else), recordinghidden: a push must not open a conversation the owner cannot see. - Service worker: the badge refresh reads
badge_total, falling back tounread_totalfor an older server. - Desktop runtime-host: the Dock badge reads
badge_total(falling back tounread_total). Forrun.terminal, the run detail it already fetches gainsnotification_category, and the host reads preferences fromGET /api/notifications/preferenceson connect and onnotifications.preferences.updated. This revises the frozen contract indocs/plans/desktop-notifications-sse.mdand ships as its own PR after the server part.
Code that changes
- Server:
storage/messages_service.py(category split and filter),vibe/ui_server.py(/api/inboxfields and preference routes),core/web_push_notifications.py, a small preference service overstate_meta, and the Bot-session helper. - Web:
WorkbenchInboxProvider.tsxandWorkbenchInboxContext.ts(exposeunreadByCategory,badgeTotal, and the preferences; the app badge, favicon, and worker message usebadgeTotal),WorkbenchSidebar.tsx(popover sections and bell),InboxPage.tsx(sections and notification button;WebPushControlleaves the toolbar), a newNotificationMenu.tsx, a newsettings/SettingsNotificationsPage.tsxwith its route,ui/public/push-sw.js, anden/zhstrings. - Desktop:
desktop/runtime-host/src/notifications.rs. - Tests: push gating per category and master switch, badge totals per
preference, the
/api/inboxfields, the worker fallback, section rendering, menu state, and desktop host filtering against a fake server.
2. Collapsible Projects
Current facts
- In
WorkbenchSidebar.tsx, Capabilities is a header button (label on the left, chevron on the right, turned-90degwhen closed) over anav. Its state isuseState(true), so it reopens on every reload. - The Projects header has the label on the left and borderless Search and New project icons on the right, and does not collapse.
- Per-browser UI memory follows
ui/src/lib/agentsViewMemory.ts: versionedavibe.*keys and best-effortlocalStorage.
Behavior
- Projects collapses like Capabilities. Header: the label (toggle), Search, New project, and the chevron (toggle). Both sections' chevrons sit at the right edge in one column.
- Collapsed, the header keeps Search and New project; the list is hidden and the footer stays pinned. The header shows no unread or running summary: the Inbox icon and the Bot avatars carry unread.
- Creating a project while the section is collapsed opens it, so the new project is visible. Navigation never opens it otherwise.
- Both sections' open state persists per browser under
localStoragekeyavibe.sidebar.sections.v1as{"capabilities": true, "projects": true}. Both default to open; a missing, unknown, or corrupt value reads as open. - The mobile
ProjectsPageis unchanged.
Code that changes
WorkbenchSidebar.tsx: the Projects header becomes a row of a toggle button over the label, the two icon buttons, and a chevron toggle button, witharia-expandedandaria-controls; Capabilities reads and writes the same memory.- A new
ui/src/lib/sidebarSectionsMemory.tswith tests, and sidebar tests for collapsing, persistence, and New project reopening the section.
3. Auto-collapse Harness messages
Current facts
- A Harness row is the
isHarnessbranch ofMessageRowinui/src/components/workbench/ChatPage.tsx: a cyanRoleAvatarwith a clock, the source label fromharnessChipLabelKey(ui/src/lib/chatTrigger.ts), and a dashed chip with a one-line preview that expands per row. The render kindharnesscovers theharnessandvaulttypes. Transcriptrenders the loaded messages in order and places Activity chips fromactivity.beforeAnchorandactivity.afterAnchor.- A Turn that ends without a reply writes no visible row. If it had activity,
its group anchors
afterits trigger (storage/agent_activity_service.py::_build_groups); otherwise it leaves nothing. - Across every Web Session on the owner's machine at design time: 33,628 Harness inputs against 12,535 user messages; 4,960 runs of two or more held 20,304 of them (60%); folding leaves 18,284 Harness items (46% fewer); 73% of runs ended with an Agent reply; 45% mixed sources; runs lasted about 52 minutes on average and 323 lasted over two hours; 371 runs started at the Session's first message; about half of the inputs inside runs were followed by Activity.
Rule
- A groupable row is a transcript row that renders as
harness, except the Session's first message when the loaded window starts at the beginning of the Session (no older page and index 0). - A run is two or more groupable rows with nothing visible between them except
Activity chips anchored
aftera member of the run (Turns that did not reply, including interrupted ones). - Anything else visible breaks a run: user rows, annotation cards, and Agent
rows of any kind (replies, mid-Turn
output,interim, status and failure notices, errors). A chip anchoredbeforea breaking reply belongs to that reply and stays outside. - Time gaps and source kinds do not break a run. A single groupable row renders as today.
- A pure function,
groupHarnessRuns, turns the loaded messages into transcript items: a single message, or a Harness group with its ordered members.
Look
- Collapsed, the default: a header with a cyan
RoleAvatar(layers icon), "N Harness messages", per-source counts using the existing source labels, and the first and last times; below it a dashed chip stacked over two offset sheets, showing "Latest", the latest member's source, and its one-line preview. The whole chip toggles. - Expanded: the same header with "Collapse"; the members in their existing rendering, with their Activity chips, on a cyan left rail; a trailing collapse link.
Behavior
- Live: a group at the tail grows in place. The count and the latest preview update; a collapsed group stays collapsed and an expanded one appends. The running Activity card stays at the transcript tail, outside the group. If that Turn ends without a reply its chip joins the group; if it replies, the reply closes the group.
- A single row that becomes a run of two forms a collapsed group, unless that row was expanded, in which case the group starts expanded: what the reader is reading is never folded away, and the content around it does not jump. Closing that row afterwards keeps the group open; closing the group closes its rows.
- Unread: Harness inputs are never unread (only
resultis), so groups carry no unread mark and change no counts. Opening a Session still lands at the tail. - Scroll: toggling keeps the group header in place (the existing anchor logic);
a reader following the tail stays pinned; a jump or search target inside a
group expands that group before scrolling and highlights the row; older pages
prepended above can grow a group at its top. A group keeps its element as it
grows at either end, so a scroll anchor held on it survives, and the anchor
search accepts a row that stands for several messages
(
data-transcript-row). The anchor also names the message it holds, so a row that an older page turns into a group member keeps its place: it is found again inside the opened group, or the collapsed head takes its place (data-harness-members). Closing a group from below its head (its trailing control) brings the head back to the top of the view, since the anchored row went with the members. - State: the set of expanded member ids and the set of opened Harness rows, in memory for the open Session. A group is expanded when any member is in the first set, so growth at either end keeps its state. Nothing is persisted.
- Web transcript only: search, copy, Retry eligibility, the API, and IM are unchanged.
Code that changes
ChatPage.tsxTranscript: render items instead of raw messages; an open group draws its members, with their Activity chips, through the same row rendering as any other row; expand on jump.ui/src/lib/harnessGroups.ts:groupHarnessRunsandstableHarnessGroupKeys, with unit tests for the break rules, the first-message rule, and key stability.- A new
HarnessGroupcomponent for the group head and the collapsed stack;ui/src/lib/transcriptScrollAnchor.tsacceptsdata-transcript-row;en/zhstrings.