feat(website): casts for first-project/modes/undo-redo; quit invisibly via Ctrl-C
Three more casts on "doing" pages:
- first-project reuses the quickstart cast (the create→insert→show tour)
- modes (new): a simple command, then `mode advanced` where the same command
also prints "Executing SQL: …" (the teaching echo — "learn the SQL underneath")
- undo-redo (new): insert two rows, `undo` (Y-confirm modal) backs one out,
`redo` restores it
Also fix the cast endings (review feedback): scripts ended by typing a `quit`
command, which — once the trim drops the shell exit — left a dangling "quit" in
frame with no payoff. End every cast with Ctrl-C instead (the app's quit key,
KeyCode::Char('c')+CTRL): it types nothing, so the cast ends cleanly on the
last content frame. Generator gains a `CtrlC` key; all six casts regenerated.
Convert the three pages to .mdx and embed. Build clean (26 pages); 6 casts.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Undo, redo & history
|
||||
description: Step back from any change, and replay a recorded session.
|
||||
sidebar:
|
||||
order: 5
|
||||
---
|
||||
|
||||
import Demo from '../../../components/Demo.astro';
|
||||
|
||||
Every change you make is safe to undo — the playground snapshots the whole
|
||||
project before each one.
|
||||
|
||||
<Demo src="/casts/undo-redo.cast" title="Undo a row back out, then redo it — each step asks for confirmation." />
|
||||
|
||||
## Undo and redo
|
||||
|
||||
```rdbms
|
||||
undo
|
||||
```
|
||||
|
||||
```rdbms
|
||||
redo
|
||||
```
|
||||
|
||||
Each asks you to confirm, naming the exact command being undone or
|
||||
re-applied. Redo is available until you make a new change. (How snapshots
|
||||
work is explained in [Concepts](/concepts/projects-and-storage/).)
|
||||
|
||||
Starting with `--no-undo` turns this off for the session — no snapshot is
|
||||
taken before each change, and `undo`/`redo` report that undo is off.
|
||||
|
||||
## History and replay
|
||||
|
||||
Every command you run is recorded, in order, in the project's `history.log`.
|
||||
You can re-run a saved sequence of commands from a file:
|
||||
|
||||
```rdbms
|
||||
replay path/to/commands
|
||||
```
|
||||
|
||||
Replay runs each non-blank, non-`#`-comment line, stopping at the first error
|
||||
(relative paths resolve under the project directory). It re-applies the
|
||||
schema- and data-changing commands and skips app-level ones.
|
||||
Reference in New Issue
Block a user