Repository navigation
feat(hub): follow every stack's worktrees; start a stopped stack's lane (ADR-0078) - #374
Merged
Merged
Conversation
…ne (ADR-0078)
The hub looks at <git common dir>/worktrees of each registered stack once
a second, as the daemon does, and tells /hub/events a version per stack;
the sidebar reads a stack's lanes again when it changes, so a worktree
made anywhere shows without opening its stack. A stack whose daemon does
not run lists its worktrees through GET /hub/stacks/{id}/worktrees as
lanes not started; one opens a start card, and POST
/hub/stacks/{id}/lanes/start runs `devstack up` in the worktree (here or
on the pool): the daemon comes up, the main tree's services stay stopped.
The branch picker finds those worktrees too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one live ?mock=worktrees adds one to docs after four seconds, as git worktree add elsewhere would; a lane the branch picker makes for a stopped stack is listed at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ets a start card as a lane's The sidebar took the last state seen for a stopped stack's main tree, and a daemon's last, empty lane list over the hub's; both are the hub's now. The main working tree of a stopped stack shows a start card above its last known state: Start here, and that the pool runs a worktree's lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…out tabs, below the banner Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lanes; the banner the same for both Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dle beside offline Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he mock starts a stopped stack's lane alone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ch; the tab shown carries over to other stacks and lanes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s the worst of its trees' Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ting a stopped stack's; a lane not started shows no failure of its main tree; gap only below a banner LaneStart takes the lane of a stopped stack (started through the hub, now with a profile) and its main working tree (null: Start here starts the stack, the pool is off with why); the separate card is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
This was referenced Oct 30, 2026
Merged
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.
Fixes two gaps the owner found in use:
Review card
Approved by the owner in the conversation on 2026-10-29: all three points.
.git/worktreesof every registered stack, running or not, as the daemon does, and tells/hub/eventswhen one changes; the dashboard reads that stack's lanes again then.POST /hub/stacks/{id}/lanes/start {path, on?}: the hub starts the lane of a stopped stack asdevstack upin its worktree does: the daemon comes up, the main working tree's services stay stopped, the lane starts here or on the pool.Decided on my own:
{"type":"worktrees","worktrees":{"<id>":"<version>"}}, instead of one event per change as the card wrote it. Every hub event starts with a snapshot, so a dashboard that reconnects misses nothing.fingerprint, i.e. the entries and theirHEADs. It asks git for each stack's git directory once and checks once a second. This reads a local folder and asks nobody, so it is not polling another party.GET /hub/stacks/{id}/worktreesgives lanes in theLaneViewshape withactive: false;lane_nameof the folder; two folders with the same name get-2from the daemon but not here;main_stack_fileandnot_in_poolare included.onthe hub runsdevstack up --on local, so a "default on" setting does not send the lane into the pool unasked;onaccepts[A-Za-z0-9-_.:]only;up-<id>-lane.log, and a failure before the daemon runs becomes the stack'sstart_error.origin/mainand the open PRs.What changed
devstack-hub:worktrees.rs: the watcher, the list, and the lane start;lib.rs: the routes andworktreeson/hub/events;branches::common_diris nowpub(crate).devstack-daemon:lanes::fingerprintis nowpub.worktreesversion;stack.ts:offlineLanes,offlineLane,startOfflineLane, andnewLanefor a stopped stack;OfflineLaneStart.vue;BranchPicker.vue;dashboard-api.md, CHANGELOG.Checked
cargo fmt,cargo clippy --workspace --all-targets: clean.cargo test -p devstack-hub -p devstack-daemon -p devstack(Windows): green. New test: a stack's worktrees appear as lanes not started, with the daemon's names and their stack file, and a new worktree changes the version.ui: typecheck, vitest (91) andnpm run buildgreen.hi), and by adding a worktree withgit worktree addwhile another stack is shown.🤖 Generated with Claude Code