diff --git a/docs/assets/workspace-first-run.gif b/docs/assets/workspace-first-run.gif index 595a0e6..e4ad6b1 100644 Binary files a/docs/assets/workspace-first-run.gif and b/docs/assets/workspace-first-run.gif differ diff --git a/docs/assets/workspace-first-run.tape b/docs/assets/workspace-first-run.tape index f7fa7da..df33f48 100644 --- a/docs/assets/workspace-first-run.tape +++ b/docs/assets/workspace-first-run.tape @@ -5,10 +5,10 @@ Require python3 Set Shell "zsh" Set FontSize 18 -Set Width 1400 -Set Height 860 +Set Width 1480 +Set Height 900 Set Theme "Dracula" -Set TypingSpeed 35ms +Set TypingSpeed 34ms Set Padding 24 Set WindowBar Colorful @@ -25,62 +25,68 @@ Type "alias pyro='uv run pyro'" Enter Type "SEED_DIR=$(mktemp -d)" Enter -Type "SYNC_DIR=$(mktemp -d)" -Enter Type "EXPORT_DIR=$(mktemp -d)" Enter Type 'printf "%s\n" "hello from seed" > "$SEED_DIR/note.txt"' Enter -Type 'printf "%s\n" "hello from sync" > "$SYNC_DIR/note.txt"' +Type 'printf "%s\n" "--- a/note.txt" "+++ b/note.txt" "@@ -1 +1 @@" "-hello from seed" "+hello from patch" > "$SEED_DIR/fix.patch"' +Enter +Type 'printf "%s\n" "temporary drift" > "$SEED_DIR/drift.txt"' Enter Type "pyro env pull debian:12 >/dev/null" Enter Show -Type "# Create a stable workspace from host content and capture its id" +Type "# Create a named workspace from host content" Enter Sleep 700ms -Type 'pyro workspace create debian:12 --seed-path "$SEED_DIR" --json | tee /tmp/pyro-workspace.json' +Type 'WORKSPACE_ID="$(pyro workspace create debian:12 --seed-path "$SEED_DIR" --name repro-fix --label issue=123 --id-only)"' Enter -Sleep 2200ms - -Hide -Type 'export WORKSPACE_ID=$(python3 -c "import json; print(json.load(open(\"/tmp/pyro-workspace.json\", encoding=\"utf-8\"))[\"workspace_id\"])")' +Sleep 500ms +Type 'echo "$WORKSPACE_ID"' Enter -Show +Sleep 1600ms -Type "# Push a later host-side change into the same workspace" +Type "# Inspect the seeded file, then patch it without shell quoting" Enter Sleep 700ms -Type 'pyro workspace sync push "$WORKSPACE_ID" "$SYNC_DIR"' +Type 'pyro workspace file read "$WORKSPACE_ID" note.txt --content-only' +Enter +Sleep 1400ms +Type 'pyro workspace patch apply "$WORKSPACE_ID" --patch-file "$SEED_DIR/fix.patch"' +Enter +Sleep 1800ms +Type 'pyro workspace exec "$WORKSPACE_ID" -- cat note.txt' Enter Sleep 1800ms -Type "# Run inside the live workspace" -Enter -Sleep 700ms -Type 'pyro workspace exec "$WORKSPACE_ID" -- cat note.txt' -Enter -Sleep 2000ms - -Type "# Capture a checkpoint, then start one long-running service" +Type "# Capture a checkpoint, then drift away from it" Enter Sleep 700ms Type 'pyro workspace snapshot create "$WORKSPACE_ID" checkpoint' Enter +Sleep 1600ms +Type 'pyro workspace file write "$WORKSPACE_ID" note.txt --text-file "$SEED_DIR/drift.txt"' +Enter Sleep 1800ms +Type 'pyro workspace exec "$WORKSPACE_ID" -- cat note.txt' +Enter +Sleep 1800ms + +Type "# Start one service, then reset the whole sandbox to the checkpoint" +Enter +Sleep 700ms Type 'pyro workspace service start "$WORKSPACE_ID" web --ready-file .web-ready -- sh -lc "touch .web-ready && while true; do sleep 60; done"' Enter Sleep 2200ms - -Type "# Reset the full sandbox back to that checkpoint" -Enter -Sleep 700ms Type 'pyro workspace reset "$WORKSPACE_ID" --snapshot checkpoint' Enter Sleep 2200ms +Type 'pyro workspace exec "$WORKSPACE_ID" -- cat note.txt' +Enter +Sleep 1800ms -Type "# Export one file back to the host and inspect it locally" +Type "# Export the recovered file back to the host" Enter Sleep 700ms Type 'pyro workspace export "$WORKSPACE_ID" note.txt --output "$EXPORT_DIR/note.txt"' @@ -88,7 +94,7 @@ Enter Sleep 1800ms Type 'cat "$EXPORT_DIR/note.txt"' Enter -Sleep 1800ms +Sleep 1600ms Type "# Remove the workspace when the loop is done" Enter