feat(website): sql-echo cast — the DSL→SQL teaching echo demo

Advanced-mode cast running simple commands (create table, add column),
culminating in `create m:n relationship` expanding to a full junction
table, each tagged `Executing SQL:`. Recorded at height 34 so the long
m:n echo + junction structure stay fully on screen. Verified against
real app output.
This commit is contained in:
claude@clouddev1
2026-06-11 13:28:37 +00:00
parent 6778c338d4
commit 5908891d6b
2 changed files with 258 additions and 0 deletions
+27
View File
@@ -48,6 +48,33 @@ export const casts = [
{ key: 'CtrlC' }, // quit invisibly (Ctrl-C) — cast ends on the last content frame
],
},
{
name: 'sql-echo',
title: 'Run simple-mode commands in advanced mode and watch the SQL they map to',
width: 90,
// Taller than the other casts (26): the m:n command's echo + the junction
// structure it prints are long, and at 26 rows the head of the `Executing
// SQL:` echo — the payoff — scrolled off the top. The extra rows all go to
// the output pane (the surrounding panels are fixed-height), keeping the
// whole echo visible. Stays < 40 so the compact 1-row-input layout holds.
height: 34,
typeSpeed: '45ms',
steps: [
{ wait: 1000 },
{ type: 'mode advanced', after: 1300 },
// Each simple-mode command, run in advanced mode, echoes the equivalent
// SQL beneath it (the ADR-0038 teaching echo).
{ type: 'create table books with pk', after: 1700 },
{ type: 'add column to books: title (text)', after: 1800 },
{ type: 'create table tags with pk', after: 1600 },
{ type: 'add column to tags: label (text)', after: 1900 },
// The crescendo: one m:n command expands to a whole junction table —
// split type + Enter so the command reads before the long echo lands.
{ type: 'create m:n relationship from books to tags', enter: false, after: 1700 },
{ key: 'Enter', after: 3200 },
{ key: 'CtrlC' }, // quit invisibly (Ctrl-C) — cast ends on the last content frame
],
},
{
name: 'projects',
title: 'Save a project, start fresh, then load it back',