Skip to content

feat(agents): add a Watching tab to agent settings from the Agent Attention UI plugin - #1846

Open
johnmatthewtennant wants to merge 6 commits into
mainfrom
jtennant/poppy/watching-sidebar-onboarding
Open

johnmatthewtennant wants to merge 6 commits into
mainfrom
jtennant/poppy/watching-sidebar-onboarding

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Context

Agents can ask to be woken later (a message, a time, a change such as CI finishing), but nothing in Buzz explained that to someone meeting it for the first time, and the standalone Agent Attention page showed every agent's Interests and watches in one place. This puts what an agent is watching in that agent's own settings, as a "Watching" tab, from a new Agent Attention UI plugin that is on by default and listed under Agent tools. Core attention (runtime, tools, storage, registerAttention, registerDiscovery) is unchanged and runs with the plugin off.

Changes

  • Host API: ctx.agents.registerTab({ id, title, component }) adds a tab to every agent that runs on this device (place === "here"), whatever its type. It sits after Activity and before History and Settings in the agent's profile and in the Agents page details. Ids are namespaced per plugin, an invalid tab or a duplicate id throws, and the tab goes when its plugin unloads. Typed in src/plugins/author.ts, documented in docs/plugin-architecture.md.
  • New bundled plugin Agent Attention UI (buzz.watching, src/bundled/watching/, category Agent tools, enabledByDefault: true, also in crates/plugin-manager's manifests and default-on list). Turning it off hides only the tab. Its Watching tab shows that agent's Interests and watches with the existing controls: pause and delete, plugin-presented source watches, and the on-this-device switch. The code moved out of src/bundled/agents/attention/.
  • An agent with nothing to watch gets: "Nothing is being watched yet. Try asking :" followed by three example requests. The tab also says what Interests and watches are and that watches only run while Buzz is open.
  • Wording: Used up, Wakes in a new conversation, Replies in, When woken, Stray watches, and "This device can't run message filters, so every message in these channels wakes the agent."
  • Mentions and the device switch stay in the Settings tab's Attention section; its pointer to the old page is removed.
  • Removed the standalone page, its sidebar placement and its bundledOrder entry. An old buzz.agents/attention link has no redirect: the shell treats an unknown page key as unavailable and shows "This destination couldn't open". There is no generic resolver hook, so none was added.
  • tests/browser/focus-navigation.spec.mjs: "covered panes and notifications preserve focus and F6 recovery" scrolled the shell sideways by the header's natural overflow at 600px. With one fewer page in the header (this change removes one) the overflow fell 2.8px short and the test failed in Chromium. It now adds scroll room itself, so it no longer depends on how many pages the header holds. Product behavior is unchanged.
  • Tests: registerTab registration, state notification, validation and disposal; tab order and here / hosted / elsewhere placement; plugin on by default (tab present), then off (no tab, attention providers still registered) and on again through the real service; empty and populated Watching states; browser specs for the Watching tab's geometry, keyboard management and focus restoration, and the plugin default (on).
  • docs/VISION_ATTENTION_SUBSCRIPTIONS.md now gives watch management to the Agent Attention UI plugin's per-agent Watching tab instead of the Agents plugin.

Tests

Browser cases added then removed in review, because each repeated a lower-layer assertion without a browser-only contract (no focus, geometry or scrolling):

Removed Replacement coverage
agent-library.spec.mjs "a local agent's profile without / with a plugin tab" (2 cases) and the fixture's ?watching option src/bundled/agents/AgentTabs.test.tsx:503 "places plugin tabs after Activity and before Settings"; src/features/agents/tabs.test.tsx:235 "adds plugin tabs to local agents only, before History"
agent-attention.spec.mjs "an agent with nothing watched suggests what to ask it" and the fixture's ?empty option src/bundled/watching/Tab.test.tsx:430 "explains Watching to a new agent and switches it on this device"
src/bundled/watching/index.test.ts (mocked registerTab call) src/app/entity-navigation.test.tsx, which loads the real plugin through the real plugin service and asserts the buzz.watching/watching tab

Fail-then-pass for the replacements, one mutation at a time:

  • Empty-state text changed in Tab.tsx: Tab.test.tsx fails ("Unable to find … Nothing is being watched yet. Try asking Ada:").
  • AgentTabs.tsx drops the agent:added: sections: AgentTabs.test.tsx fails (1 of 14).
  • tabs.tsx adds plugin tabs to every agent, not only here: tabs.test.tsx fails (1 of 5).
  • watching/index.tsx registers no tab: entity-navigation.test.tsx fails (1 of 12, expected ['buzz.watching/watching'], got []).

Browser cases kept: agent-attention.spec.mjs themes/sizes/keyboard management and deletion focus restoration (real focus and scroll geometry), plugin-defaults.spec.mjs (real Settings plugin list shows Agent Attention UI on), and the focus-navigation.spec.mjs change below.

Validation

focus-navigation.spec.mjs:255 failed in Chromium on this branch before its test change while passing on main; removing only the old Agent Attention page from the base reproduced it.

Not tested:

  • The Watching tab inside a running desktop app with a real local agent. The tab is covered by jsdom, the real AgentsService and plugin service, a fixture-hosted tab with modeled host data (no real relay or runtime), and the real Settings plugin list. The Watching screenshots come from that fixture, so they show the tab alone, not inside the agent's tab strip.

Screenshots

An agent with nothing watched yet

Empty Watching tab

An agent's Interests and watches, one expanded

Populated Watching tab

Agent Attention UI under Agent tools in Settings → Plugins

Plugin list

@johnmatthewtennant johnmatthewtennant changed the title feat(agents): move Watching below Inbox and explain it to newcomers feat(agents): add a Watching tab to agent settings behind an off-by-default plugin Oct 28, 2026
@johnmatthewtennant
johnmatthewtennant force-pushed the jtennant/poppy/watching-sidebar-onboarding branch from 9c8472d to d66d510 Compare October 28, 2026 20:32
@johnmatthewtennant johnmatthewtennant changed the title feat(agents): add a Watching tab to agent settings behind an off-by-default plugin feat(agents): add a Watching tab to agent settings from the Agent Attention UI plugin Oct 29, 2026
@johnmatthewtennant
johnmatthewtennant marked this pull request as ready for review October 29, 2026 01:06
@johnmatthewtennant
johnmatthewtennant requested a review from a team as a code owner October 29, 2026 01:06

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Two non-blocking maintenance findings; no reproduced functional or security blocker.

Comment thread docs/agents.md
Comment thread tests/browser/agent-library.spec.mjs Outdated
Comment thread docs/VISION_ATTENTION_SUBSCRIPTIONS.md
johnmatthewtennant and others added 5 commits October 28, 2026 22:38
The Agent Attention page assumed the reader already knew what Interests,
watches and classifiers are. It now opens with a plain explanation, shows
suggested asks when empty, notes that watches run only while Buzz is open
on this device, and uses plainer card and warning wording.

The page is renamed Watching and moves from the topbar to the sidebar,
directly below Inbox, through the existing bundled page order. The page
id stays `attention`, so links keep working.

Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Poppy <ace4dfe51b23bb4244ab9117dfd5e13b8239445e333225608c352e68cb3fe2b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replace the standalone Watching page and its sidebar entry with a
`buzz.watching` plugin (off by default) that adds a Watching tab to
every local agent's settings through a new
`ctx.agents.registerTab({ id, title, component })`.

The host places plugin tabs after Activity and before History and
Settings, for agents that run on this device and of any type, and
removes them when the plugin unloads. The tab shows the agent's
Interests and watches with the existing pause, delete and device
controls, and teaches an agent with nothing to watch what to ask for.
Mentions and the device switch stay in Settings, and the attention
runtime, tools and providers keep working with the plugin off.

The Agent Attention page registration and its sidebar order and icon
are removed; an old link to it opens as an unavailable destination.

The covered-pane focus test now makes room for the shell to scroll
instead of relying on how many pages the header happens to hold.

Signed-off-by: John Tennant <jtennant@block.xyz>
Co-authored-by: Poppy <ace4dfe51b23bb4244ab9117dfd5e13b8239445e333225608c352e68cb3fe2b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The plugin that adds each agent's Watching tab is now called Agent
Attention UI, sits under Agent tools in Settings, and is on by default
in both the app and the desktop plugin manager. Turning it off still
hides only the tab; attention keeps running.

Co-authored-by: Poppy <ace4dfe51b23bb4244ab9117dfd5e13b8239445e333225608c352e68cb3fe2b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
The vision still assigned the cross-agent Attention overview to the
Agents plugin. Watch management now lives in the Agent Attention UI
plugin's per-agent Watching tab.

Co-authored-by: Poppy <ace4dfe51b23bb4244ab9117dfd5e13b8239445e333225608c352e68cb3fe2b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
The profile-tab and empty-state browser cases checked tab order and
text that tabs.test.tsx, AgentTabs.test.tsx and Tab.test.tsx already
cover, with no browser-only behavior. The mocked registration test
repeats what entity-navigation.test.tsx checks through the real plugin
service.

Co-authored-by: Poppy <ace4dfe51b23bb4244ab9117dfd5e13b8239445e333225608c352e68cb3fe2b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
@johnmatthewtennant
johnmatthewtennant force-pushed the jtennant/poppy/watching-sidebar-onboarding branch from a3e3bd0 to c490af7 Compare October 29, 2026 02:57

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kyle reviewed the PR and the Nexus review-tracker notes and approves.

Posted by Codex (gpt-6.1-sol) on behalf of kylez

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Star Lord’s automated source review via Wes’s account. One P2 fix is detailed inline.

Optional: use consistent Attention/Watching wording for the same device switch in Settings and Watching.

Rocket, Mantis and Groot completed independent lanes, reconciled against head c490af74226d4c99cfc1fcd4137b1067d387f6d1, base ae48da8e79299b220f4177f7ab5eca3051267b8a. Source-only, including the public description and three screenshots; no tests, app execution, live-agent behavior or CI validation.

Comment thread src/features/agents/tabs.tsx
Pausing or deleting a watch kept its pending state inside the Watching
tab, so switching agent tabs during the save unmounted it and a later
failure was never shown. Each action now reports its pending save, so
the agent's tabs stay on Watching until it settles.

Co-authored-by: Poppy <ace4dfe51b23bb4244ab9117dfd5e13b8239445e333225608c352e68cb3fe2b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Star Lord’s automated source review via Wes’s account. The prior pending-save P2 is resolved: Watching now reports pending actions to the existing tab guard, preserving delayed errors; no new actionable findings in this follow-up.

Rocket, Mantis and Groot independently reviewed the two-file delta from c490af7, reconciled at head d94a487a87973821f45c65b0642abde832b47c79, base ae48da8e79299b220f4177f7ab5eca3051267b8a; unchanged feature coverage remains in the prior review. Source-only, including the unchanged description and three screenshots: tests, live tab switching, native behavior and CI were not validated.

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.

4 participants