Repository navigation
feat(remote-peers): support two-level @ remote host delegation menu - #1244
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Summary
Add a two-level
@/#remote host delegation menu that lets users either pick a reachable remote host directly (without pinning a Harness) or drill into that host to lock both--hostand--harnessin one mention chip.Changes
packages/shared-contracts/src/delegation-mention.ts,remote-peers.ts,index.ts):subagent://codexhost-remote/<encodedHostId>[/<harnessId>]carrier (path-based, no?query params, backward-compatible withsubagent://codexhost.<harnessId>), deduplicated by(hostId, harnessId)so local and remote mentions of the same Harness coexist in one prompt.codexhost/delegation/remoteHostsandcodexhost/delegation/hostHarnesses.packages/host-runtime/src/delegation-mention-rewrite.ts):delegate start --host <hostId> --harness <id> --cwd <remote-path>instructions (with aproject list --host <hostId>reminder when no remote path is provided).harness list --host <hostId>before delegating.packages/web-server/src/peer-thread-links.ts):subagent://codexhost-remote/...links across paired peers usingpeerNodes/nodeId, collapsing self-targeted host+Harness mentions tosubagent://codexhost.<harnessId>.packages/web-server/src/peer-host-manager.ts,main.ts):codexhost/delegation/remoteHosts(returns connected delegation-capable peers fromlocal, orlocal+ mutually paired peers listed inmanifest.peerNodesfrom a remote Peer session; excludes self, unpaired peers, and SSH remotes).codexhost/delegation/hostHarnesses(reads local or cached PeerChHarnessCatalogon demand when drilling in).@menu & chip icons (apps/web-ui/):ui-input-trigger(types.ts,controller.ts,MenuView.tsx) andui-conversation(draft-editor.ts,keymap.ts) withdrillExclusive, customdrillLabel, andArrowRight/ArrowLeftdrill navigation alongsideTaband row chevron / breadcrumb clicks.apps/web-ui/packages/client/ui-codexhost/src/client/remote-host-delegation.tsxwired fromharness-discovery.tsx, plus localized copy (locales.ts) and host/remote-harness chip icons inReferenceIcon.tsx.docs/product/multi-remote-peers.md): Document the two-level remote host@delegation menu and outbound perspective translation.Demo Screenshots
Level 1 —
@shows local Agents and reachable Remote Hosts (click/Enter picks host only;Tab/→/›expands)Level 2 — Exclusive drill-down with breadcrumb header, host-only option, and Peer-scoped Harness icons
Verification
npx vitest run --config tests/vitest.config.js packages/shared-contracts/test/delegation-mention.test.ts packages/host-runtime/test/delegation-mention-rewrite.test.ts: 17/17 passed.node --import tsx --test packages/web-server/test/peer-thread-links.test.ts packages/web-server/test/peer-host-manager.test.ts packages/web-server/test/remote-sessions.test.ts: 62/62 passed.ui-input-trigger/test/lexicon-notifications.test.ts: 2/2 passed.node tools/check-boundaries.mjs, Web UIbuild.ts(43/43 client plugins + Vite shell),tsc --noEmiton touched files, andprettier: passed.pageerror = 0): verified Level 1 display,›chevron drill to exclusive Level 2 breadcrumb view,ArrowLeftback to Level 1, typed@stu+ArrowRightdrill clearing query,[@Mac Studio · Antigravity](subagent://codexhost-remote/remote-peer%3Apeer-studio/antigravity)submission,[@Home Mini](subagent://codexhost-remote/remote-peer%3Apeer-home)host-only submission, and[@本机 · Codex](subagent://codexhost-remote/local/codex)from a remote Peer B session.npm run lint,typecheck, andtestare deferred to PR CI.