feat: restore history, undo and redo in the Activity log for everyone who may refresh
- Activity lists restores from refresh runs, so the Refresh permission is enough to see them; an administrator's restore jobs add the database, the person and the snapshot - an undo is listed under the restore it reverses, and a redo under that undo; opening a restore or an undo opens its undo or redo dialog - the dialog has an explicit undo mode: it describes what is put back instead of the snapshot that was open, and an interrupted restore offers Roll back - a restore whose safety backup retention has forgotten shows "Safety backup expired" instead of a link, and the dialog says how long a safety copy is kept Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -59,3 +59,10 @@ test("restore points are named by environment, and by target only when two share
|
||||
);
|
||||
assert.equal(relationLabels([rel("a", null, "odd")])[0].label, "odd");
|
||||
});
|
||||
|
||||
test("an interrupted restore offers a rollback only when its safety copy can be used", () => {
|
||||
const names = { target: "Staging" };
|
||||
const stuck = { status: "recovery_required", restore_phase: "apply_failed" };
|
||||
assert.match(outcomeOf({ ...stuck, undo_available: true }, names).detail, /roll it back/i);
|
||||
assert.match(outcomeOf(stuck, names).detail, /administrator has to recover/i);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user