Skip to content

feat(pool): a setup dialog before the share switch goes on (ADR-0113) - #590

Merged
7schmiede merged 1 commit into
mainfrom
feat/share-setup-dialog
Nov 19, 2026
Merged

7schmiede merged 1 commit into
mainfrom
feat/share-setup-dialog

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Switched on, the share switch went green at once and then said "Not ready yet"; what was missing stood only on the page "This machine", and the admin's grant ("Runs the pool's lanes") was a second switch elsewhere. Now the switch opens a setup dialog, and the hub checks before anything is switched.

Review card

Approved by the owner in the conversation on 2026-11-19: all four points, with the preflight endpoint.

Category Point What it beats Cost of reversing
Concept Switching it on opens a setup dialog: (1) what sharing does (resources, admin grant needed), (2) the checks with their commands and the setup prompt, (3) caps and WSL distribution, (4) "Start sharing". Switching on at once, then searching the settings small, UI only
Contract The hub can run the checks without switching (POST /hub/pool/share/check), so the dialog shows them before the switch goes on. Checks only after switching on small, one extra endpoint
Concept The tile is green only for running with the admin's grant; blocked/failed is amber ("Setup incomplete: finish it", a click opens the dialog); waiting for an admin stays neutral. Green as soon as the intent is saved small
Concept The last step shows the admin's grant as its own state ("Waiting for an admin of "). Two switches without a visible link small

Decided on my own: the page keeps its caps form for later changes; an admin's grant in the dialog is a checkbox, on by default (calls the existing setNode); turning the switch off needs no dialog; the texts stay English.

Also from the owner: a check's command is now copied without the words about where it runs. Check.fix is the command alone, the new fix_note says where ("In Ubuntu as root"); the coding-agent prompt carries both.

Verified

  • cargo test -p devstack-hub --lib nodehost, cargo clippy -p devstack-hub --all-targets (Windows), cargo fmt --check
  • vue-tsc, vitest run: 294 tests, among them the dialog's (checked before the switch, Next locked while a required check fails, PUT only after "Start sharing") and the colours
  • In the lane against the mock hub: the dialog's three steps, a distribution with missing pieces (commands without the note), one that is ready, start with the grant; tile and switch green afterwards
  • Not yet on a Windows machine with WSL against a real hub: the endpoint reuses the checks a start runs

🤖 Generated with Claude Code

Switched on, the share switch opens a dialog: what sharing does, the WSL
distribution, the caps and what the node agent needs, checked before the
switch goes on (POST /hub/pool/share/check), then the start; an admin can
grant the machine in the same step. The switch and the sidebar tile are
green only while the agent runs and the machine is granted, amber with a
link into the dialog while something is missing. A check's `fix` is the
command alone; `fix_note` says where it runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit d63c37a into main Nov 19, 2026
14 checks passed
@7schmiede
7schmiede deleted the feat/share-setup-dialog branch November 19, 2026 11:22
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