fix(ui): back-to-hosting link + no-F5 backups list#46
Merged
Conversation
Two backup-flow papercuts: 1. Job progress page (/jobs/<id>) had no way back to the hosting the job belongs to — only "All jobs". Add a "← Back to <target>" button for hosting-scoped jobs. New JobView::hosting_target() allow-lists the kinds whose `target` is a single hosting selector (backup, install, migration, restore, clone, acme_issue, wp_install, profile_apply, …) so cluster/bulk/panel-import jobs (whose target is a label or nothing) don't render a dead link. 2. Backups list on the hosting detail page was served stale after returning from the job page — user had to F5. Wrap the list in a data-live-refresh region (15s) so a running backup flips to ok and a backup started elsewhere appears on its own. The shared refresh driver now fetches with cache:'no-store' (defeats the stale HTTP cache) and force-ticks every live region on bfcache pageshow (the exact back-navigation case), benefiting Stats + Service health too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two backup-flow papercuts reported after the last round of testing.
1. No way back from the job progress page
Starting a backup redirects to
/jobs/<id>(progress bar), which only had an All jobs link — no way back to the hosting. Adds a ← Back to<target>button.JobView::hosting_target()allow-lists the kinds whosetargetis a single hosting selector (backup,install,migration,restore,hosting_clone,acme_issue,wp_install,profile_apply, …). Cluster / bulk / panel-import jobs carry a label (or nothing) there, so they don't render a dead link to/hostings/<label>.2. Backups list was stale on return (needed F5)
Coming back to the hosting detail page showed the old list — the new backup only appeared after a manual refresh, because the page was cached.
data-live-refresh="15"region: a running backup flips to ok, and a backup started from the job page shows up on its own.cache: 'no-store'— defeats the stale HTTP cache that forced the F5;pageshow— the exact back-navigation case. Also benefits Stats + Service health.Verify
cargo check -p hyperion-webgreen (Askama compilesjob.hosting_target()+ the new region nesting).Note
main'sCargo.lockis missing ~218 transitive entries (chacha20,cfg_aliases, …) thatcargowants to add — a pre-existing drift, left out of this PR to keep it scoped. Worth a separatechore: sync Cargo.lockif CI ever runs--locked.🤖 Generated with Claude Code