Repository navigation
feat(launch): pick the host, the worktree base, or an existing checkout - #10
Open
alessandrocornacchia wants to merge 4 commits into
Open
alessandrocornacchia wants to merge 4 commits into
alessandrocornacchia wants to merge 4 commits into
Conversation
- Newer Paseo apps ship a Lucide set without brand icons, so the plugin failed to load with "Unknown Lucide icon: Github" - Use GitBranch for the sidebar item, settings screen, command and timeline row Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- The multi-host client API (useHosts, getPaseoClient) is not in the 0.8 typings Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Add a host chip to the launch dialog when more than one host is connected; other hosts are reached with getPaseoClient and matched by project key, falling back gracefully on Paseo before 0.9.0 - Move workspace and agent creation into shared launchCard, used by the daemon handler and by the dialog for remote hosts - Add a base chip for new worktrees: a branch read from GitHub, or a pull request's own branch checked out by the daemon - Request the base as a remote-tracking ref so it is fetched first; on the board's host, fetch it from the remote for the card's repo - Remember the last host, and the last base per repository - Document both in the README and CHANGELOG Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Add Existing checkout, a third isolation that sends the agent into a worktree or branch already on the host, as it stands: no new worktree, no new branch. The agent joins the Paseo workspace already open on that directory, or a directory workspace is opened on it - List checkouts with git worktree list on the board's host, so worktrees made by other tools show up, and from Paseo's workspace list elsewhere; preselect the one on the pull request's head branch - Add a Same branch / New branch chip to a branch base: Same branch checks the branch itself out with the daemon's checkout-branch action, creating the local branch from the card's repository when it is missing - Refuse a worktree on a branch some checkout already holds, which the daemon would otherwise fork into <branch>-1, and check a pull request out as its local head branch rather than as <head>-1 - Return the pull request's head branch from board.list-branches - Document both in the README and CHANGELOG Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What this changes
Send to chat can now put the agent where the work for a card actually is. That might be another machine, a branch other than the default, or a worktree that already exists. Until now it only offered two options, both on the board's own host:
This PR adds three choices to the dialog. It also fixes the plugin failing to load on current Paseo apps.
Why
The motivating case: you want an agent to continue a pull request on a remote machine where its branch, or a worktree for it, already exists. It might have been made by an earlier session, by hand, or by another tool. Today the dialog gives you two bad options:
fuzzy-otterbranch the agent is committing to.The new-worktree path has the same problem in a quieter form. Choosing a base branch always meant a new branch on top of it, never "just check this branch out". And reading the 0.11.1 daemon source turned up two cases where it silently forks instead of failing. This PR exists to avoid both:
X, whileXis already checked out in some worktreeX-1fromXand checks that out<head>-1In both cases you end up with a duplicate branch you didn't ask for.
How it works
The dialog's first row now reads like this (a layout sketch, not a screenshot; see UI below):
Choose the host
board.send-to-chat.getPaseoClient(serverId). Its project is the one whose key is the card's repository.launchCardinshared/launch.ts, so both paths behave the same.Choose where a new worktree starts
refs/remotes/<remote>/<branch>and fetched first, so the agent starts at the remote tip, not at a stale local default branch. On the board's host the remote is whichever points at the card's repository, so a fork'supstreamworks.action: "checkout"with a barerefName) checks the branch itself out, with nothing on top. If there is no local branch of that name yet, the board's host first creates it from the card's repository.git worktree listwhen the send runs.-1copy.board.list-branchesnow also returns the pull request's head branch. It returns null for a PR from a fork, where the head name says nothing about which local branch tracks it.Join an existing checkout
workspaces.ref(id)) instead of opening a second one beside it. Otherwise a directory workspace is opened on the folder.git worktree list(new handlerboard.list-checkouts), so worktrees made by any tool appear. On other hosts the dialog can't run git, so it lists the checkouts Paseo has a workspace for, plus the project root.Remembered choices
settings.jsonwritten by an older build still parses.Fix: the plugin failed to load
The sidebar item, settings screen, command and timeline row used the
GithubLucide icon, which newer Paseo apps no longer ship. Loading failed withUnknown Lucide icon: Github. They now useGitBranch.Known limits (documented in the README)
These all apply to hosts other than the board's own:
originmust be the card's repository.git fetch.<head>-1, because the dialog can't see local branches there. Picking that branch with Same branch avoids it.Checks
npm run typecheckpassesnpm run lintpasses, including the project rules inscripts/npm testpasses (70 tests;shared/launch.test.tscovers the start kinds, joining or opening an existing checkout, parsinggit worktree list, matching checkouts to workspaces, and the conflict guard)paseo plugin reload github-integrationloads cleanly against a real daemon (0.11.1)Also run against real GitHub and git:
board.list-branchesquery: a same-repo PR returns its head branch; a fork PR and an issue return null;git worktree listparsing on a real checkout;upstreamand fetching an unseen branch in a fork-style clone, and saving and reading back remembered bases.The daemon's behaviour for each start kind, including the two silent forks above, was read from the 0.11.1 and 0.8.0 daemon sources. No end-to-end send has been made against a live daemon yet.
UI
Not checked visually yet, and there are no screenshots. All new controls reuse the dialog's existing
ControlChipandChoicePopover. One thing worth a look on compact: a row can now hold four chips (host, isolation, base, branch mode). Screenshots of the base chip, the Same/New branch chip, the Existing checkout menu and the "already checked out" message will be added after a manual pass on desktop and mobile.Paseo version
The plugin still declares
>=0.8.0.useHostsandgetPaseoClientfirst appear in Paseo 0.9.0. They are read off the SDK module object, so on 0.8 the chip is simply absent and everything else works.action,refNameandcheckoutSourcefields are in the 0.8.0 protocol, and the 0.8.0 daemon already resolves a barerefNamecheckout to checkout-branch.workspaces.list({ filter: { projectId } }),workspaces.ref(id)and the workspace'sgitRuntime.currentBranchare all in the 0.8.0 client and protocol.@getpaseo/*0.11.1 for the typings.🤖 Generated with Claude Code