Skip to content

feat(tasks): show every connected host's agents on one board - #35

Open
RocStone wants to merge 3 commits into
RoundRedDot:mainfrom
RocStone:multihost-tasks
Open

RocStone wants to merge 3 commits into
RoundRedDot:mainfrom
RocStone:multihost-tasks

Conversation

@RocStone

Copy link
Copy Markdown

When Paseo is connected to more than one host, the Tasks board shows only the agents of the host the plugin runs on. Agents on the other hosts can only be reached through Paseo's sidebar, so the board stops being a single place to see what needs attention.

This PR merges the agents of every online host into the same lanes and sort. A card from another host carries a small badge with that host's name, the way the sidebar labels it. While there is more than one host, a Host filter joins Agent, Project, Workspace and Labels in the filter bar, the filter sheet and the sidebar groups. The filter is kept in the URL as host. When a host is offline or reconnecting, its cards leave the board and one quiet line above the lanes names it; the cards come back when it reconnects.

How hosts are discovered. client/tasks/data/hosts.ts reads useHosts() and getPaseoClient(serverId) from @getpaseo/plugin/client. Both are feature-detected once, when the module loads. Each online host other than the board's own gets its own Tasks store, built on that host's PaseoApi. Remote stores skip every loader that calls this plugin's server, because that server only knows its own daemon. Merged cards are stamped with their host. Remote workspace and project IDs are scoped by server ID so that IDs from two daemons cannot collide in the filters or the sidebar groups.

How actions are routed. Merging also records which host each remote agent, child and parent belongs to.

  • Archive, permission replies, the details' first-prompt and last-message reads, first-prompt search and parent lookup go through a small proxy over the board's PaseoApi. The proxy sends agents.ref(id) to the agent's own host.
  • Open passes serverId to navigation.openAgent, so a remote card opens that agent on its host, as the sidebar does. Opening it also clears its attention there.
  • The merged handle keeps the same method identities across merges, so effects that depend on them, such as the history search, do not restart on every update.

Single host and older Paseo. With one host configured, or on a Paseo whose client SDK does not supply useHosts and getPaseoClient, the merge returns the board's own handle unchanged. Cards carry no host, no filter or badge appears, and the minimum Paseo version does not change.

Known limits.

  • Stop, Mark as read, Mark unread, Unarchive and the title actions run through this plugin's server, which reaches only its own daemon. They are left out on another host's card. The PaseoApi lent for another host has no call that clears attention; opening the card in Paseo clears it.
  • A file link in a remote card's details copies its path instead of revealing it, because revealing would open a same-named path on the plugin's own machine. For the same reason, the details show no live token count for a remote agent.
  • The sidebar's Tasks counts and full-conversation search still cover the plugin's own host only.
  • History paging is per host, so the merged order covers only the pages loaded so far.

The README and README-zh describe all of this in a new "Several hosts" section and in the "Cannot" table.

Validation:

  • npm test: 294 files, 7578 tests passed. On Node 26 this needs NODE_OPTIONS=--no-experimental-webstorage, as on main. pooled-event-reads passes.
  • npm run typecheck, npm run build:client, npm run check:hermes, node --test scripts/ci-workflow.test.mjs and git diff --check passed.
  • New tests:
    • tasks-multihost.test.ts (18): SDK detection, host states, merge order and card identity, ID scoping, routing, paging and refresh, stable method identity, the host filter with its chips, params and counts (provider subagent cards included), the offline notice, and a check that remote stores never call the plugin-server loaders.
    • tasks-multihost-card.test.tsx (5): the badge, and the actions left out of a remote card, its menu and the details action bar.
    • tasks-multihost-detail-link.test.tsx (2): a remote card's file link copies instead of revealing.
    • tasks-multihost-board.test.tsx (1): on a two-host board, Open sends a remote card's serverId.
    • Each new test fails when the code it covers is reverted.
  • Live run on an isolated daemon with a second SSH host added, using one throwaway agent per host:
    • Local and remote cards shared the same lanes, and the remote card showed its badge.
    • The Host filter narrowed the board to each host and back. The sidebar showed a Host tab with each host's count.
    • Open on the remote card navigated to that host's workspace, and the remote daemon's record changed from requiresAttention: true to false.
    • Archive on the remote card set archivedAt on the remote daemon.
    • Disabling the second host left the board working and showed the notice. Re-enabling it brought the cards back.
    • With one host, a screenshot pixel-diffed against main differed in 55 of 1.6M pixels, all in the host app's relative clock text and a spinner frame.

🤖 Generated with Claude Code

@luoph

luoph commented Nov 13, 2026

Copy link
Copy Markdown

Thanks for the detailed implementation and the live two-host validation. There is one failure case to address before merging: the merged handle retains the local host's error, while the host notice is based on connection status. If a remote host remains online but its task subscription or initial read fails, the board can omit its tasks without indicating that the remote data is incomplete. Please surface the affected host's read failure and add a test for failure and recovery while the host remains online.

This PR currently conflicts with main. After resolving that, please rerun the required checks on the updated revision and retain the two-host integration validation. It also overlaps with #15, so we need to choose a single multi-host approach.

RocStone and others added 2 commits November 13, 2026 17:26
The Tasks board now merges the agents of every online Paseo host into the
same lanes and sort, discovered with useHosts() and read through
getPaseoClient(serverId), both feature-detected so older Paseo keeps the
one-host board unchanged.

- A card from another host carries a host badge; a Host filter joins the
  filter bar, sheet and sidebar groups while there is more than one host.
- Open, preview and Archive go to the card's own host; opening a remote
  card opens it on that host, which also clears its attention there.
- Stop, Mark read/unread, Unarchive and titles go through this plugin's
  server, which reaches only its own daemon, so they are left out on
  remote cards.
- An offline or reconnecting host's cards leave the board with one quiet
  notice naming it, and return when it is back.
- Remote stores skip the plugin-server loaders; merged handle methods keep
  stable identities so search effects do not loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A file link in another host's card details copies its path instead of
  revealing a same-named path on this plugin's host.
- A provider subagent's card carries its parent's host, so the host filter
  and its counts treat both together.
- The details no longer poll this plugin's server for a remote agent's
  live token count.
- Tests: remote detail link, subagent cards under the host filter, and
  Open on a remote card passing its serverId. README limits table updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merged handle carries only this host's error, and the host notice
followed connection states only, so a remote host that stayed online while
its task subscription or first read failed dropped its cards without a word.

- useRemoteReadFailures lists each remote host whose store reports an
  error, and reads it again (refresh) after 5 s, doubling up to 1 min.
  A host stays listed until a retry lands, so the notice does not blink
  while the retry's refresh has cleared the store's error; a failed retry
  is judged by its result, not by a snapshot the board may not have drawn.
- The host notice names such a host ("Couldn't load tasks from …; some
  may be missing. Retrying.") with a warning mark, after any offline or
  reconnecting hosts; it goes once a read lands, or the host leaves the
  board (the offline notice takes over).
- This host's error keeps its toast, as before.

Tests cover a failed first read and a dropped live subscription on a real
remote store, each recovering while the host stays online, a failed retry
that keeps the host named and backs off (also when the board has not yet
drawn the store's new error), cleanup when the host leaves or the board
closes, and the whole board drawing and clearing the notice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RocStone added a commit to RocStone/better-paseo that referenced this pull request Nov 13, 2026
…ead-failure notice

Brings fork main to the head of upstream PR RoundRedDot#35 (ecb2cc6): the 43 upstream
commits since 6b2cea2 (releases 1.5.3 to 1.5.5), the multi-host board
rebased onto them, and the fix that names an online host whose task read
failed. The tree is multihost-tasks' own; the earlier multi-host commits on
this main are superseded by their rebased versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants