Repository navigation
Conversation
The hidden agents page needs relay sessions for the communities its agents are in, without becoming a second owner of what the device saves. Its sessions are ephemeral: sends and history stay in memory, nothing is restored, and no presence is published. If they shared the outbox journal, a reload of the main window would show pending agent sends as unknown. pageCommunities follows the viewer, memberships and selection that the main page sends, opens a session only for a joined community, and lets go of a session when its community is left or the viewer changes. AgentsService now needs only the viewer and selection from the communities snapshot. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
This was referenced Oct 27, 2026
loganj
added a commit
that referenced
this pull request
Oct 29, 2026
The Runner becomes its own service, apart from the Manager, and on macOS it runs in a hidden "agents" webview that the system never throttles, with its storage and the plugins' agent entries. The screens' page keeps the Manager. Only JSON crosses, over the native agents port, on two lanes: "agents" for the Manager and Runner link, and "page" for where agent storage is, the followed communities, and local activity. - The Runner owns presence, keep-awake, agent hooks and the reconnect of its own connections. A failed relay is retried at most every 30 s, whichever owner asks. - The Manager waits at most 10 s for the Runner's first decision. - The agents page starts the Runner once the screens' page says where agent storage is; the screens' page still loads and moves it first. - Other platforms keep the Runner in the screens' page. Includes #1735 (page-owned native work), #1743 and #1744's native page. Squashes #1892 and #1893. Signed-off-by: Logan Johnson <loganj@squareup.com> Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
loganj
added a commit
that referenced
this pull request
Oct 29, 2026
The Runner becomes its own service, apart from the Manager, and on macOS it runs in a hidden "agents" webview that the system never throttles, with its storage and the plugins' agent entries. The screens' page keeps the Manager. Only JSON crosses, over the native agents port, on two lanes: "agents" for the Manager and Runner link, and "page" for where agent storage is, the followed communities, and local activity. - The Runner owns presence, keep-awake, agent hooks and the reconnect of its own connections. A failed relay is retried at most every 30 s, whichever owner asks. - The Manager waits at most 10 s for the Runner's first decision. - The agents page starts the Runner once the screens' page says where agent storage is; the screens' page still loads and moves it first. - Other platforms keep the Runner in the screens' page. Includes #1735 (page-owned native work), #1743 and #1744's native page. Squashes #1892 and #1893. Signed-off-by: Logan Johnson <loganj@squareup.com> Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Stacked on #1742. Part of the work to run agents in a hidden page, so that a frozen or hidden main window cannot stall them.
What this does
The hidden agents page needs its own relay sessions for the communities its agents are in. It must not become a second owner of what the device saves. This PR adds the piece that gives it those sessions:
provideRelay(..., { ephemeral: true }): a session for a page that shows nothing.pageCommunities: follows the viewer, memberships and selection that the main page sends.AgentCommunitiesnow needs only the viewer and the selection from the snapshot.pageCommunitiessatisfies it.Presence is not published from these sessions, because no presence activity is passed. Read state stays on the shared multi-tab store. That store already lets two pages share one journal: one lock owner publishes for both.
Nothing calls
pageCommunitiesyet. The agents page entry, in the next PR, is its first caller. So this PR does not change behavior.Evidence
src/features/communities/page.test.tscovers opening, normalization, leave, viewer change, selection outside memberships, and the ephemeralprovideRelayarguments.src/features/relay/startup-service.test.tscovers an ephemeral session: it creates no head persistence and no outbox journal, even with a saved resume and a cache clear. A kept session, with the same inputs, creates both.page.tsand the ephemeral branches inprovideRelaymake the tests fail when removed.tsc --noEmitand Biome are clean. The full vitest run passes except four emoji and avatar-picker tests. Those fail only in this worktree, where Vite denies the symlinkednode_modules.🤖 Generated with Claude Code