Switch deployments on and off from the menu #1
No reviewers
Labels
No labels
⏳in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/someones.computer_tray!1
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/deployment-toggles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The tray switches deployments on and off. Needs scclient #2 (pinned and vendored here) and the platform's #575.
What changed
Every deployment row was
Disable()d with the label "toggle lands with /cli activate". Now each one carries the two gestures as submenu entries, and shows only the one the platform will accept — the listing reportsrunning/activatableper name, so a click never comes back 409:Confirm stop <name>is a second, explicitly-labelled click rather than the one that opens the row: teardown removes a live stack, and a tray row is easier to fat-finger than a page button. On stays a singleActivate <name>— its failure mode is a deploy, not an outage.sc deployuses, rather than waiting up to 10s for the poll to notice — and the outcome raises one desktop notification, the case the plan names as worth one. Stop keeps the poll: the stream ends atrunning, which is where a teardown starts.Top up credit…, pointing at the organization's billing page — the one refusal a client can offer a way out of.osascriptandnotify-send, for the same reason opening a browser is: two commands and a fallback, against a module whose discipline is having no dependencies. Nothing important is only in a notification — every outcome also lands on the status row, so Windows losing the pop-up loses nothing.deployingrevision. Hollow for everything else.Verified
Built and run against a live platform dev stack, with
scdriving the same endpoints from the other side (transcript in #575): stop flips the row to○ main · built (#1)and swapsConfirm stopforActivate.go build,go vet,go test ./...clean, vendored (GOWORK=offpasses offline, which is what CI runs), and all four static cross-compile targets still build withCGO_ENABLED=0.Evidence
Captured from the running binary, not drawn:
hack/screenshotboots a headless Linux desktop in a container — Xvfb, a window manager, a StatusNotifierItem watcher and host — runssc-trayagainst a fixed stub scene, opens the menu withxdotooland photographs it. The rows are the ones the binary exported over DBusMenu../hack/screenshot/run.shre-runs the whole thing.The menu. Applications above the controls — which is a fix in this PR: systray appends, so rows drawn on the first poll used to land below Refresh and Quit. Found by looking at it, which until this harness nobody could do.
A running deployment. Filled dot, and the only gesture offered is the confirming second click.
One that is down. Hollow dot,
Activate stagingin place of the stop.macOS and Windows have no equivalent that runs without their own machine, so they stay uncaptured rather than invented — the menu tree is the same on all three, the drawing is each platform's own. The icon in these is still the colour placeholder (#576).
Deliberately not here
WIP: Switch deployments on and off from the menuto Switch deployments on and off from the menu