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:
30
tasks/restore-ux-design.md
Normal file
30
tasks/restore-ux-design.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Restore di dalam Vault (dibangun)
|
||||
|
||||
Keputusan Sen: tidak ada menu baru. Halaman Refresh dihapus; di detail snapshot tombol "Export file on hub" diganti
|
||||
"Restore", modal restore mendapat selector restore point, lalu hitung mundur dan stepper.
|
||||
|
||||
## Alur
|
||||
|
||||
1. Klik orbit. 2. Capture bila ingin yang terbaru, atau klik snapshot yang ada. 3. Detail snapshot: tombol Restore
|
||||
(nonaktif dengan teks "No restore point" bila admin belum membuat relasi). 4. Modal: selector Development/Staging bila
|
||||
keduanya ada. 5. Begin restore -> hitung mundur 10 detik (Abort tidak mengirim apa pun) -> stepper Checking, Safety copy,
|
||||
Applying, Completed (Abort masih bisa sampai Applying).
|
||||
|
||||
## Yang dibangun
|
||||
|
||||
- Izin: tanpa skema baru. Melihat snapshot dan menekan Capture memakai grant orbit yang sudah ada (viewer + capture.run);
|
||||
Restore memakai grant relasi `refresh.run` yang sudah ada. Pemegang hanya grant relasi tidak lagi punya layar sendiri.
|
||||
- `POST /api/v1/refresh-runs` menerima `snapshot_id`: restore snapshot yang sudah ada milik orbit sumber relasi (bukan
|
||||
safety, bukan orbit lain), memakai mesin run yang sama (idempotensi, satu run per target, batal sampai applying,
|
||||
otorisasi ulang sebelum menimpa). Tanpa `snapshot_id` perilaku lama (capture baru) tetap ada sebagai API.
|
||||
- `GET /api/v1/refresh-relations` memuat `source_orbit_id`; `GET /api/v1/snapshots` memuat `kind` (capture|safety); UI
|
||||
menyembunyikan safety.
|
||||
- Admin: modal yang sama, plus "Other registered target..." (jalur lama dengan ketik konfirmasi).
|
||||
- Dihapus dari UI: halaman Refresh, layar khusus pemegang refresh, "Export file on hub".
|
||||
|
||||
## Belum dikerjakan
|
||||
|
||||
- Endpoint `POST /api/v1/reconstitute` (export ke berkas hub) masih ada sebagai API admin: CLI dan fixture `tests/mbu`
|
||||
masih memakainya. Hapus (beserta folder exports) sebagai keputusan terpisah sebelum rilis publik.
|
||||
- "Restore ke dua target sekaligus" dilakukan sebagai dua restore berurutan oleh orang yang sama (modal tetap terbuka
|
||||
setelah selesai: "Restore again" / ganti restore point). Belum ada tombol "keduanya" sekali klik.
|
||||
Reference in New Issue
Block a user