Skip to content

Add a Converge button to the service page - #8

Merged
SnowballSH merged 1 commit into
mainfrom
converge-button
Sep 30, 2026
Merged

SnowballSH merged 1 commit into
mainfrom
converge-button

Conversation

@SnowballSH

Copy link
Copy Markdown
Owner

Adds the web UI half of converge that the 2026-08-27 design left out of scope.

  • api.converge(service) POSTs to /api/v1/services/{name}/converge with no body and no header of its own (same-origin, forward-auth session, like Deploy). post now returns the daemon's full {journalId, joined}.
  • ConvergeConfirm dialog: states converge re-renders the unit from the merged manifest and restarts it with no automatic rollback, shows the pin main holds now, and notes the daemon re-syncs at the front of the queue.
  • After a 202 the page refreshes the catalog and history exactly as Deploy does, so the progress rail follows the run from the event stream / lastDeploy.
  • joined: true keeps the dialog open with a notice naming the pending run; an error lands in the dialog and the banner.
  • Button disabled while a run is in flight, like Deploy.

Tests: api.test.ts (route, no body, no headers, escaping, fresh/joined/missing-joined 202, JSON and non-JSON errors, deploy body unchanged) and state.test.ts (joinedNotice, converge history row). web/dist rebuilt.

Verified in a browser against a scratch mock daemon: joined notice, 400 surfaced in dialog + banner, fresh 202 closed the dialog and the rail followed the streamed reconciling event.

The daemon has accepted POST /services/{name}/converge since v0.1.8, but the
page offered no way to press it, so operators first-started born-managed
services from the devtools console. The button opens a confirmation that
states what converge does (re-render from the merged manifest, restart, no
automatic rollback), POSTs with no body over the same forward-auth session as
Deploy, and follows the run through the same refresh and event stream. A 202
that joined an already-pending converge keeps the dialog open to say so;
a refusal lands in the dialog and the banner.
@SnowballSH
SnowballSH merged commit 6dcc477 into main Sep 30, 2026
3 checks passed
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