Skip to content

feat(ui): a stack has a page; every lane, main included, the same view (ADR-0081) - #393

Merged
7schmiede merged 3 commits into
mainfrom
feat/stack-page
Oct 30, 2026
Merged

7schmiede merged 3 commits into
mainfrom
feat/stack-page

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Card B of the dashboard work (ADR-0081), on top of ADR-0080 (the main tree answers as the lane main).

What changes

  • Routes.

    • #/s/<stack> is the stack's page.
    • #/s/<stack>/l/<lane>/... holds a lane's views, with the same tabs as before; the main working tree is main.
    • Older links redirect: ?lane=x, /services/..., /infra..., /commands, /usage, /events open the same tab of the lane named, else the lane shown last, else main.
    • The CLI, tray, notification and devstack://open links use the new form.
  • One lane view. The main tree is a lane entry named main, so the header, start card, branch picker and command palette treat it like any lane. Its actions map to these calls:

    Action Call
    Start POST /v1/up
    Stop POST /v1/down?infra=true; the daemon and the other lanes keep running
    Restart / Rebuild each running service's own restart, since the daemon has no whole-tree restart
    Serve main ports laneMain('main'): the same button in every lane that does not hold the ports

    Cold, Discard data, Remove worktree, Move, Share, starting in the pool and choosing another profile are shown disabled for main, each with a reason.

  • The stack page shows:

    • the daemon (pid, port, uptime; idle or offline)
    • Start, Stop and Restart stack. Stop stack now stops every lane and the daemon; the confirmation lists them.
    • the restart banner
    • who serves the main ports, with Give to a lane and Back to main
    • every lane (main first) with branch, place, state, offset, a main-slot mark and memory
    • the singleton services
    • for a stopped stack: Start and its worktrees
  • Daemon: ServiceView.singleton, which older daemons omit. Mock hub: a lane serves the main ports, each lane reports its own usage, and one service is a singleton.

  • Docs: ADR-0081, dashboard-api.md, the changelog, skill devstack.

Review card (ADR-0070)

Approved by the owner in the conversation on 2026-10-30, all three points:

# Category Point Beats Reversing costs
1 concept Every lane, main included, has the same view and the same switches. The UI distinguishes only whether a lane holds the main slot, not where it comes from. A main tree's view of its own UI only
2 concept A stack has a page above its lanes: lanes, main slot, singleton services, need and usage (later a port graph and shift, #387). The stack's things in the main tree's view UI only
3 contract Stack-level actions (start/stop/restart stack, main slot to lane X) live on that page; a lane's actions in the lane view only. Stack and lane actions mixed in one header UI only

Decided by the agent alone:

  • Stop stack stops everything, the daemon included; main has its own Stop. The sidebar's "…" Stop does the same.
  • No confirmation on main's Stop, as for a lane's Stop.
  • An idle main shows the start card.
  • main is always listed under a stack.
  • Lane memory on the stack page comes from each lane's /v1/usage, polled every 10 s while the page is shown.
  • Clicking a lane that is not started in the stack switcher opens its start card instead of starting it.
  • Not built: "need" on the stack page. No API gives it without a pool; the ADR says so.

Tests

  • UI: npm run typecheck, npm test (19 files, 113 tests: new ones for the redirects of old links, main's actions with their reasons and calls, and the sidebar's links and highlight), npm run build.
  • Rust: cargo fmt, cargo clippy --all-targets -D warnings, the daemon's 168 library tests, the CLI's, the hub's notify tests and the skills tests.
  • Not looked at in a browser yet.

🤖 Generated with Claude Code

7schmiede and others added 3 commits October 30, 2026 21:59
…w (ADR-0081)

`#/s/<stack>` is the stack's page: its daemon, Start/Stop/Restart stack,
who serves the main ports (and giving them to a lane), its lanes with
place, state, offset and memory, and its singleton services. A lane's
views move to `#/s/<stack>/l/<lane>/...`, `main` for the main working
tree; older links redirect. The main tree is a lane entry in the
dashboard: one header, one start card, one branch picker for every tree;
what has no meaning for it is shown disabled with the reason. The daemon's
ServiceView carries `singleton`. CLI, tray and notification links use the
new form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The global `.row` (display: flex) made each <tr> a flex box, so the
cells no longer lined up under their columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… no main ports

The "Give them to" select listed `main` (which has its own Back to main)
and started empty; it now lists started lanes only, the first chosen, and
Back to main stands alone when no lane could take the ports. A stack that
does not run shows no "main ports" mark on its main tree in the sidebar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 193d450 into main Oct 30, 2026
@7schmiede
7schmiede deleted the feat/stack-page branch October 30, 2026 22:15
@7schmiede 7schmiede mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant