feat: restore inside the Vault; the Refresh page and file export UI are gone

- POST /refresh-runs accepts snapshot_id: restore a snapshot somebody picked (a restorable capture of the
  relation's own source, never a safety copy or another orbit's) through the same run engine
- refresh-relations carries source_orbit_id; snapshots carry kind (capture|safety), and the UI hides safety copies
- snapshot detail: Restore replaces Export file on hub (disabled with No restore point without a relation);
  modal with a restore point selector, a ten second countdown with Abort, and a four step progress view
- administrators keep Other registered target; the Refresh menu and refresh-only screen are removed
- proven with a real agent and PostgreSQL in the browser: capture, restore to Development, abort, no relation

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 16:13:44 +07:00
parent f52fc1930f
commit 3bd0a1c9a3
20 changed files with 778 additions and 508 deletions

View File

@@ -74,6 +74,9 @@ struct SnapshotSummary {
orbit_name: String,
size_bytes: u64,
capture: Option<CaptureSnapshotSummary>,
/// `capture` for a backup of an orbit, `safety` for the copy a restore took of its target before
/// overwriting it. Pickers leave the latter out.
kind: &'static str,
stored_bytes: Option<u64>,
new_data_chunks: Option<u64>,
}
@@ -444,6 +447,11 @@ async fn list_snapshots(
orbit_id: s.manifest.orbit_id,
taken_at: s.taken_at,
capture: CaptureSnapshotSummary::from_manifest(&s.manifest),
kind: if s.manifest.is_restore_safety() {
"safety"
} else {
"capture"
},
// the orbit's current name; the manifest keeps the one it was written under
orbit_name: names
.get(&s.manifest.orbit_id)