Skip to content

Show what's being rolled back in the rollback confirmation#188

Merged
acoshift merged 3 commits into
mainfrom
rollback-modal-detail
Jun 11, 2026
Merged

Show what's being rolled back in the rollback confirmation#188
acoshift merged 3 commits into
mainfrom
rollback-modal-detail

Conversation

@acoshift

Copy link
Copy Markdown
Member

Summary

The deployment rollback confirmation was a bare title ("Rollback web to revision 6") — it never told the user what that revision actually contains. This replaces it with an in-page modal that spells it out:

  • Currently active vs Rolling back to, side by side: revision number, image ref, deploy time, and author.
  • A note that rollback redeploys the target revision's image and configuration (env, scaling, command) as a new revision, and that no history is deleted — matching what deployment.rollback actually does server-side (it re-Deploys the target's full spec).
  • Built as an in-page modal (per the repo's modal convention) rather than SweetAlert html, so user-provided image refs render through Svelte interpolation; backdrop-click close uses the existing e.target === e.currentTarget pattern, and closing is blocked while the rollback request is in flight.

bun lint + bun check: 0 errors. Verified against bun dev:mock with Playwright:

before after
SweetAlert title only side-by-side revision comparison

🤖 Generated with Claude Code

The rollback confirm was a bare SweetAlert title ("Rollback web to
revision 6") with no detail. Replace it with an in-page modal that
shows the currently active revision and the rollback target side by
side — revision number, image, deploy time, and author — plus a note
that rollback redeploys the target's image and configuration as a new
revision without deleting history. In-page modal (not modal.confirm
html) so the user-provided image refs render through Svelte
interpolation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploying deploys-app--console with  Cloudflare Pages  Cloudflare Pages

Latest commit: bd5968b
Status: ✅  Deploy successful!
Preview URL: https://e3ea4111.deploys-app--console.pages.dev
Branch Preview URL: https://rollback-modal-detail.deploys-app--console.pages.dev

View logs

deployment.rollback re-deploys the target revision's image, env (+
groups), scaling, type/port, command/args, workload identity, pull
secret, disks, schedule, and resources — but passes no sidecars or
mountData, which Deploy treats as "keep current". Say so in the modal
instead of implying everything is restored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@acoshift

Copy link
Copy Markdown
Member Author

Rechecked the copy against the apiserver (server/deployment.go Rollback): it re-Deploys the target revision's image, env (+ groups), min/max replicas, type, port, command/args, workload identity, pull secret, disks, schedule, and resources — but passes no Sidecars/MountData/TTL, which Deploy treats as "keep current". cd73a5f updates the modal note accordingly: "…(env, scaling, command, disks, schedule)… Sidecars and mounted files keep their current configuration."

Fetch the target revision's full spec (deployment.get with revision)
when the modal opens and list what actually changes hands: settings
rows (scaling, port, schedule, command, args, env groups, workload
identity, pull secret, disk, memory) and a per-key env diff with
added/removed/changed badges, current vs after-rollback. Falls back
gracefully while loading, on fetch failure, and when only the image
differs.

The panel grows to 56rem, scrolls when the diff is long, and the
comparison cards stack on small screens. Mock deployment.get now
honors the revision arg with per-revision differences so the diff
renders in offline dev.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@acoshift

Copy link
Copy Markdown
Member Author

Follow-up: the modal is now wider (56rem, scrolls when long, cards stack on mobile) and fetches the target revision's full spec via deployment.get { revision } to show a configuration diff — settings rows (scaling, port, schedule, command, args, env groups, workload identity, pull secret, disk, memory) plus a per-key env diff with +/−/± badges, current vs after-rollback. Loading/failure/no-changes states included; mock deployment.get now honors revision so the diff renders in offline dev.

@acoshift acoshift merged commit f01483c into main Jun 11, 2026
5 checks passed
@acoshift acoshift deleted the rollback-modal-detail branch June 11, 2026 06:34
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