You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(self-updating-mastra): history offers per-commit undo and reset-to-state
The console's single "Revert" button did `git revert <sha>` (unpick one
commit's diff) while its dialog said "restoring the previous state", which
reads as reset-to-state — clicking Revert on an old commit left newer
changes in place, and "reverting back to" a wanted commit removed it
instead. Hit live on the beta stack 2026-07-18.
Every history entry now offers both mental models, with copy that says
exactly what will happen:
- "Undo change" (existing /revert): unpick just this commit; everything
after it stays. Now offered on any todo-app-scoped commit — including
admin undo/reset commits, so an undo can itself be undone — instead of
only agent-run commits.
- "Reset to here" (new /restore): append a commit returning todo-app/ to
exactly its state at that point (git rm + checkout <sha> -- todo-app,
so files added later are removed too). Any older entry is a valid
target, including baseline and publish markers; no-op when already in
that state; on failure the live tree is put back to HEAD.
Both endpoints now also refuse while a publish is in flight (mutating the
tree mid-packaging would corrupt the upload), and share one typecheck
report helper.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
if (!confirm("Revert commit " + sha.slice(0, 8) + "? This creates a new commit restoring the previous state, and the live dev app updates immediately.")) return;
290
+
async function undoCommit(sha, btn) {
291
+
if (!confirm("Undo the changes from commit " + sha.slice(0, 8) + "? Only this one change is unpicked — everything made after it stays. This adds a new commit, and the live dev app updates immediately.")) return;
if (!data.typecheckOk) alert("Reverted, but the app no longer typechecks — later changes may depend on this commit. Consider reverting the revert, or dispatch a repair run.\\n\\n" + (data.typecheckOutput || ""));
if (!data.typecheckOk) alert("Undone, but the app no longer typechecks — later changes may depend on this commit. Consider undoing the undo, or dispatch a repair run.\\n\\n" + (data.typecheckOutput || ""));
298
+
loadData();
299
+
} finally { btn.disabled = false; }
300
+
}
301
+
302
+
async function resetToCommit(sha, btn) {
303
+
if (!confirm("Reset the app back to how it was at commit " + sha.slice(0, 8) + "? Every change made after this point is removed from the app. History is kept, so the reset itself can be undone. This adds a new commit, and the live dev app updates immediately.")) return;
0 commit comments