fix(desktop): restore page agent controls and unify session picker
What & why
The Pages agent button disappeared when no watcher was registered, even if an agent was already running. Keep the button visible and let page owners assign an active workspace agent or launch a configured agent through the existing session launcher. New launches wait for the returned terminal to register before assigning it as the watcher.
Reuse one compact, searchable agent picker across Pages, new-page creation, code comments, PR comments, and design mode. Move Split pane / New tab into Settings → General → New agent sessions, preserving the existing preference and updating mounted consumers when it changes. The shared page header also uses a consistent share icon and visible Share label.
Before/after screenshots and design rationale (Superset organization access required). The page now includes live desktop screenshots of all five shared picker usages, the listening-agent menu, and the General placement setting. Earlier simulated component captures are retained separately.
The menu explicitly labels Listening agents and Add listening agent. A stale cloud heartbeat without a confirmed host session no longer appears as a named agent on an unreachable host. Agent and terminal lifecycle events refresh listening status. When several sessions share an agent type, the selected trigger retains a short terminal ID.
How I tested it
Latest follow-up: 25 picker/listener tests and 47 host watcher tests passed, along with desktop typechecking, scoped Biome checks, and strict translation compilation for all 17 locales.
- 59 focused tests passed: watcher visibility, assignment and permissions, launch and registration timing, picker search/Enter without accidental submission, placement persistence, settings search, and the persisted-key registry.
- Repository-wide
bun run lintpassed with local, uncommitted capture artifacts temporarily outside the lint input. - Repository-wide
bun run typecheckpassed. bun run check:i18npassed for all 17 locales; catalogs are included.git diff --checkpassed.- Full
bun run testfailed: the desktop suite reported 7,671 passed, 34 failed, and 1 error. Failures are in Git/worktree and shell-environment fixtures outside the modified code; the error includes a subprocessspawn EBADF. The focused suite above passes.
Live host detection and all five picker entry points were exercised through real UI input. End-to-end comment delivery and launches for every provider remain unverified; the dev CLI needs a separate login to read the dev page. Assignment remains owner-only. The backend retains one active listening lease per page, so a new assignment replaces the previous one; simultaneous multi-listener delivery is not implemented.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (CI fails on lint warnings too) - "Allow edits from maintainers" is checked on fork PRs — not applicable; same-repository branch
Summary by cubic
Restores the page agent control so it stays visible when no watcher is registered, letting managers assign an existing workspace agent or launch a configured one. New launches wait for the terminal to register before assigning it as the watcher.
- Broadens the page watcher menu from page owners only to all managers.
- Unifies the searchable agent picker across Pages, new-page creation, code comments, PR comments, and design mode; it shows live session names for listening agents and refreshes while the picker is open.
- Moves Split pane / New tab placement to Settings → General → New agent sessions, keeping the existing preference and syncing mounted consumers on change.
- Makes the shared page header use one consistent share icon with a visible Share label.
Summary by CodeRabbit
- New Features
- Choose whether new agent sessions open in a split pane or a new tab.
- Search active sessions and configured agents when selecting where to send work.
- Assign existing agents to watch pages or launch a new session for the task. Managers can add or stop watchers from the page menu.
- View watcher status, including when no agents are confirmed or status information is unavailable.
- Bug Fixes
- Watcher status refreshes when relevant agent or terminal activity changes.
- Style
- Updated the page-sharing button’s icon and layout.