Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Refactor demo scripts with improved formatting

Maximilian Roosb029e6c4d674
diff --git a/docs/demos/build b/docs/demos/build
index 46ef83be2..5b29afec6 100755
--- a/docs/demos/build
+++ b/docs/demos/build
@@ -26,13 +26,22 @@ from pathlib import Path
SCRIPT_DIR = Path(__file__).parent
sys.path.insert(0, str(SCRIPT_DIR))
-from shared import (
+from shared import ( # noqa: E402
VALIDATION_RS,
- DemoEnv, DemoSize, git, prepare_demo_repo,
- setup_claude_code_config, setup_zellij_config, setup_fish_config,
- check_dependencies, setup_demo_output, record_all_themes,
- SIZE_DOCS, SIZE_SOCIAL,
- record_text, build_tape_replacements,
+ DemoEnv,
+ DemoSize,
+ git,
+ prepare_demo_repo,
+ setup_claude_code_config,
+ setup_zellij_config,
+ setup_fish_config,
+ check_dependencies,
+ setup_demo_output,
+ record_all_themes,
+ SIZE_DOCS,
+ SIZE_SOCIAL,
+ record_text,
+ build_tape_replacements,
)
REPO_ROOT = SCRIPT_DIR.parent.parent
@@ -41,8 +50,7 @@ TAPES_DIR = SCRIPT_DIR / "tapes"
# Custom VHS binary with keystroke overlay
VHS_KEYSTROKES = os.environ.get(
- "VHS_KEYSTROKES",
- str(SCRIPT_DIR / "vhs-keystrokes" / "vhs-keystrokes")
+ "VHS_KEYSTROKES", str(SCRIPT_DIR / "vhs-keystrokes" / "vhs-keystrokes")
)
@@ -50,6 +58,7 @@ VHS_KEYSTROKES = os.environ.get(
# Setup Helpers
# =============================================================================
+
def _add_billing_branch(env: DemoEnv):
"""Add a billing branch at same commit as main (merged state)."""
branch = "billing"
@@ -67,20 +76,22 @@ def _add_staged_validation(env: DemoEnv):
git(["-C", str(hooks_path), "add", "src/validation.rs"])
-def _write_user_config(env: DemoEnv, approved_commands: list[str], commit_generation: bool = False):
+def _write_user_config(
+ env: DemoEnv, approved_commands: list[str], commit_generation: bool = False
+):
"""Write worktrunk user config."""
config_dir = env.home / ".config" / "worktrunk"
project_id = str(env.bare_remote).removesuffix(".git")
content = ""
if commit_generation:
- content += '''[commit-generation]
+ content += """[commit-generation]
command = "llm"
args = ["-m", "claude-haiku-4.5"]
-'''
+"""
content += f'[projects."{project_id}"]\n'
- content += f'approved-commands = {approved_commands!r}\n'
+ content += f"approved-commands = {approved_commands!r}\n"
(config_dir / "config.toml").write_text(content)
@@ -89,6 +100,7 @@ args = ["-m", "claude-haiku-4.5"]
# Demo Setup Functions
# =============================================================================
+
def prepare_basic(env: DemoEnv):
"""Basic repo setup - no hooks, no extras."""
prepare_demo_repo(env, REPO_ROOT)
@@ -122,7 +134,9 @@ cleanup = "{cleanup_cmd}"
_add_billing_branch(env)
-def prepare_merge_demo(env: DemoEnv, commit_generation: bool = True, staged_changes: bool = True):
+def prepare_merge_demo(
+ env: DemoEnv, commit_generation: bool = True, staged_changes: bool = True
+):
"""Merge demo setup. Use commit_generation=False for social (no LLM in GIF)."""
prepare_demo_repo(env, REPO_ROOT)
_write_user_config(env, ["cargo nextest run"], commit_generation=commit_generation)
@@ -136,11 +150,14 @@ def prepare_switch(env: DemoEnv):
prepare_demo_repo(env, REPO_ROOT, hooks_config=hooks_config)
_write_user_config(env, ["npm install"])
- setup_claude_code_config(env, [
- str(env.repo),
- str(env.work_base / "acme.alpha"),
- str(env.work_base / "acme.dashboard"),
- ])
+ setup_claude_code_config(
+ env,
+ [
+ str(env.repo),
+ str(env.work_base / "acme.alpha"),
+ str(env.work_base / "acme.dashboard"),
+ ],
+ )
def prepare_devserver(env: DemoEnv):
@@ -173,7 +190,7 @@ fi
def prepare_zellij_omnibus(env: DemoEnv):
"""Setup for wt-zellij-omnibus demo - comprehensive showcase."""
- hooks_config = '''[post-start]
+ hooks_config = """[post-start]
dev = "npm run dev -- --port {{ branch | hash_port }}"
[pre-merge]
@@ -181,7 +198,7 @@ test = "cargo nextest run"
[list]
url = "http://localhost:{{ branch | hash_port }}"
-'''
+"""
prepare_demo_repo(env, REPO_ROOT, hooks_config=hooks_config)
# Clean up branches that might exist from previous runs (billing, feature created during demo)
@@ -189,8 +206,7 @@ url = "http://localhost:{{ branch | hash_port }}"
for branch in ["billing", "feature"]:
# Delete from origin if exists (ignore errors if not)
subprocess.run(
- ["git", "-C", str(origin), "branch", "-D", branch],
- capture_output=True
+ ["git", "-C", str(origin), "branch", "-D", branch], capture_output=True
)
# Enable git colors for non-TTY environments (VHS)
@@ -210,7 +226,7 @@ echo "Add placeholder module for user profile settings."
_write_user_config(
env,
["npm run dev -- --port {{ branch | hash_port }} &", "cargo nextest run"],
- commit_generation=True
+ commit_generation=True,
)
# Zellij + Fish configs (with --create in wsl abbreviation)
@@ -222,18 +238,29 @@ echo "Add placeholder module for user profile settings."
worktree_paths = [str(env.repo)] + [
str(env.work_base / f"acme.{branch}") for branch in worktree_branches
]
- allowed_tools = ["Bash", "Read", "Write", "Edit", "Glob", "Grep", "Task", "TodoWrite"]
+ allowed_tools = [
+ "Bash",
+ "Read",
+ "Write",
+ "Edit",
+ "Glob",
+ "Grep",
+ "Task",
+ "TodoWrite",
+ ]
setup_claude_code_config(env, worktree_paths, allowed_tools)
# Pre-create worktrees (api and auth only - billing created during demo)
demo_env = {
**os.environ,
"HOME": str(env.home),
- "PATH": f"{REPO_ROOT}/target/debug:{env.home}/.local/bin:{os.environ.get('PATH', '')}"
+ "PATH": f"{REPO_ROOT}/target/debug:{env.home}/.local/bin:{os.environ.get('PATH', '')}",
}
def run_wt(args, cwd):
- result = subprocess.run(["wt"] + args, cwd=str(cwd), env=demo_env, capture_output=True, text=True)
+ result = subprocess.run(
+ ["wt"] + args, cwd=str(cwd), env=demo_env, capture_output=True, text=True
+ )
if result.returncode != 0:
raise RuntimeError(f"wt {' '.join(args)} failed: {result.stderr}")
@@ -271,10 +298,20 @@ SOCIAL_DEMOS = [
("wt-statusline.tape", "wt-statusline", prepare_switch, "vhs"),
("wt-list.tape", "wt-list", prepare_with_hooks, "vhs"),
("wt-list-remove.tape", "wt-list-remove", prepare_with_hooks, "vhs"),
- ("wt-hooks.tape", "wt-hooks", partial(prepare_with_hooks, include_deps=True), "vhs"),
+ (
+ "wt-hooks.tape",
+ "wt-hooks",
+ partial(prepare_with_hooks, include_deps=True),
+ "vhs",
+ ),
("wt-devserver.tape", "wt-devserver", prepare_devserver, "vhs"),
("wt-commit.tape", "wt-commit", prepare_merge_demo, "vhs"),
- ("wt-merge.tape", "wt-merge", partial(prepare_merge_demo, commit_generation=False, staged_changes=False), "vhs"),
+ (
+ "wt-merge.tape",
+ "wt-merge",
+ partial(prepare_merge_demo, commit_generation=False, staged_changes=False),
+ "vhs",
+ ),
("wt-select-short.tape", "wt-select-short", prepare_basic, "vhs-keystrokes"),
("wt-core.tape", "wt-core", prepare_with_hooks, "vhs"),
("wt-zellij-omnibus.tape", "wt-zellij-omnibus", prepare_zellij_omnibus, "vhs"),
@@ -298,6 +335,7 @@ TARGETS = {
# Parallel Recording
# =============================================================================
+
def record_demo(
tape_file: str,
output_name: str,
@@ -313,7 +351,6 @@ def record_demo(
if not tape_path.exists():
raise FileNotFoundError(f"{tape_file} not found")
-
vhs_binary = VHS_KEYSTROKES if vhs_type == "vhs-keystrokes" else "vhs"
# Create fresh environment in temp directory
@@ -335,7 +372,14 @@ def record_demo(
theme_dir.mkdir(parents=True, exist_ok=True)
output_gifs[theme] = theme_dir / f"{output_name}.gif"
- record_all_themes(env, tape_path, output_gifs, REPO_ROOT, vhs_binary=vhs_binary, size=demo_size)
+ record_all_themes(
+ env,
+ tape_path,
+ output_gifs,
+ REPO_ROOT,
+ vhs_binary=vhs_binary,
+ size=demo_size,
+ )
print(f"✓ {output_name}: GIFs saved: {', '.join(themes)}")
@@ -343,20 +387,23 @@ def record_demo(
# Main
# =============================================================================
+
def spawn_debug_shell(env: DemoEnv, starship_config: Path):
"""Spawn an interactive fish shell with the demo environment set up."""
shell_env = os.environ.copy()
- shell_env.update({
- "HOME": str(env.home),
- "XDG_CONFIG_HOME": str(env.home / ".config"),
- "STARSHIP_CONFIG": str(starship_config),
- "PATH": f"{REPO_ROOT / 'target' / 'debug'}:{env.home / '.local' / 'bin'}:{os.environ.get('PATH', '')}",
- # Keep real rustup/cargo for any rust tools
- "RUSTUP_HOME": str(Path.home() / ".rustup"),
- "CARGO_HOME": str(Path.home() / ".cargo"),
- })
-
- print(f"\nSpawning fish shell in demo environment...")
+ shell_env.update(
+ {
+ "HOME": str(env.home),
+ "XDG_CONFIG_HOME": str(env.home / ".config"),
+ "STARSHIP_CONFIG": str(starship_config),
+ "PATH": f"{REPO_ROOT / 'target' / 'debug'}:{env.home / '.local' / 'bin'}:{os.environ.get('PATH', '')}",
+ # Keep real rustup/cargo for any rust tools
+ "RUSTUP_HOME": str(Path.home() / ".rustup"),
+ "CARGO_HOME": str(Path.home() / ".cargo"),
+ }
+ )
+
+ print("\nSpawning fish shell in demo environment...")
print(f" HOME={env.home}")
print(f" Demo repo: {env.repo}\n")
@@ -375,17 +422,25 @@ Examples:
./build docs --only wt-merge Build specific demo for docs
./build docs --text Build text output instead of GIFs
./build social --only wt-zellij-omnibus --shell Debug shell for demo
-"""
+""",
+ )
+ parser.add_argument(
+ "target", choices=["docs", "social"], help="Target to build demos for"
)
- parser.add_argument("target", choices=["docs", "social"],
- help="Target to build demos for")
parser.add_argument("--only", help="Only record specific demo (e.g., wt-switch)")
- parser.add_argument("--shell", action="store_true",
- help="Build demo and spawn interactive shell for debugging (requires --only)")
- parser.add_argument("--text", action="store_true",
- help="Record text output instead of GIFs")
- parser.add_argument("--sequential", action="store_true",
- help="Record demos sequentially instead of in parallel")
+ parser.add_argument(
+ "--shell",
+ action="store_true",
+ help="Build demo and spawn interactive shell for debugging (requires --only)",
+ )
+ parser.add_argument(
+ "--text", action="store_true", help="Record text output instead of GIFs"
+ )
+ parser.add_argument(
+ "--sequential",
+ action="store_true",
+ help="Record demos sequentially instead of in parallel",
+ )
args = parser.parse_args()
if args.shell and not args.only:
@@ -423,7 +478,7 @@ Examples:
needs_keystrokes = any(vhs_type == "vhs-keystrokes" for _, _, _, vhs_type in demos)
if needs_keystrokes and not vhs_keystrokes_available:
- print(f"Error: vhs-keystrokes required but not found", file=sys.stderr)
+ print("Error: vhs-keystrokes required but not found", file=sys.stderr)
print(f"Not found at: {VHS_KEYSTROKES}", file=sys.stderr)
print("See docs/demos/CLAUDE.md for build instructions", file=sys.stderr)
sys.exit(1)
@@ -446,8 +501,14 @@ Examples:
for tape_file, output_name, setup_func, vhs_type in demos:
try:
record_demo(
- tape_file, output_name, setup_func, vhs_type,
- mode_out_dir, themes, demo_size, args.text,
+ tape_file,
+ output_name,
+ setup_func,
+ vhs_type,
+ mode_out_dir,
+ themes,
+ demo_size,
+ args.text,
)
except Exception as e:
print(f"✗ {output_name}: {e}")
@@ -459,8 +520,15 @@ Examples:
with ProcessPoolExecutor(max_workers=max_workers) as executor:
futures = {
executor.submit(
- record_demo, tape_file, output_name, setup_func, vhs_type,
- mode_out_dir, themes, demo_size, args.text,
+ record_demo,
+ tape_file,
+ output_name,
+ setup_func,
+ vhs_type,
+ mode_out_dir,
+ themes,
+ demo_size,
+ args.text,
): output_name
for tape_file, output_name, setup_func, vhs_type in demos
}
@@ -475,7 +543,7 @@ Examples:
failed.append(output_name)
if failed:
- print(f"\n{'='*60}")
+ print(f"\n{'=' * 60}")
print(f"Failed: {', '.join(failed)}")
sys.exit(1)
diff --git a/docs/demos/shared/lib.py b/docs/demos/shared/lib.py
index 1030cf6dc..7271da9eb 100644
--- a/docs/demos/shared/lib.py
+++ b/docs/demos/shared/lib.py
@@ -15,7 +15,7 @@ REAL_HOME = Path.home()
FIXTURES_DIR = Path(__file__).parent / "fixtures"
# Shared content for demos
-VALIDATION_RS = '''//! Input validation utilities.
+VALIDATION_RS = """//! Input validation utilities.
/// Validates that a number is positive.
pub fn is_positive(n: i32) -> bool {
@@ -38,7 +38,7 @@ mod tests {
assert!(!is_positive(-1));
}
}
-'''
+"""
@dataclass
@@ -73,8 +73,7 @@ class DemoEnv:
def run(cmd, cwd=None, env=None, check=True, capture=False):
"""Run a command."""
result = subprocess.run(
- cmd, cwd=cwd, env=env, check=check,
- capture_output=capture, text=True
+ cmd, cwd=cwd, env=env, check=check, capture_output=capture, text=True
)
return result.stdout if capture else None
@@ -106,7 +105,7 @@ def render_tape(template_path: Path, replacements: dict, repo_root: Path) -> str
source_path = repo_root / match.group(1).strip().strip('"')
return source_path.read_text()
- rendered = re.sub(r'^Source\s+(.+)$', inline_source, rendered, flags=re.MULTILINE)
+ rendered = re.sub(r"^Source\s+(.+)$", inline_source, rendered, flags=re.MULTILINE)
# Apply template variable replacements
for key, value in replacements.items():
@@ -189,7 +188,7 @@ def prepare_base_repo(env: DemoEnv, repo_root: Path):
# Rust project
(env.repo / "Cargo.toml").write_text(
- "[package]\nname = \"acme\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[workspace]\n"
+ '[package]\nname = "acme"\nversion = "0.1.0"\nedition = "2021"\n\n[workspace]\n'
)
(env.repo / "src").mkdir()
shutil.copy(FIXTURES_DIR / "lib.rs", env.repo / "src" / "lib.rs")
@@ -250,46 +249,58 @@ def setup_claude_code_config(
worktree_paths: List of worktree paths to pre-approve for trust
allowed_tools: List of tools to pre-approve (default: none, Claude will ask)
"""
- api_key_suffix = os.environ.get("ANTHROPIC_API_KEY", "")[-20:] if os.environ.get("ANTHROPIC_API_KEY") else ""
+ api_key_suffix = (
+ os.environ.get("ANTHROPIC_API_KEY", "")[-20:]
+ if os.environ.get("ANTHROPIC_API_KEY")
+ else ""
+ )
# Build projects config - pre-approve trust for all worktree paths
# Use resolved paths to handle macOS symlinks (/var -> /private/var)
projects_config = {}
for path in worktree_paths:
resolved_path = str(Path(path).resolve())
- projects_config[resolved_path] = {"allowedTools": [], "hasTrustDialogAccepted": True}
+ projects_config[resolved_path] = {
+ "allowedTools": [],
+ "hasTrustDialogAccepted": True,
+ }
claude_json = env.home / ".claude.json"
- claude_json.write_text(json.dumps({
- "numStartups": 100,
- "installMethod": "global",
- "theme": "light",
- "firstStartTime": "2025-01-01T00:00:00.000Z",
- "hasCompletedOnboarding": True,
- "hasCompletedClaudeInChromeOnboarding": True,
- "claudeInChromeDefaultEnabled": False,
- "sonnet45MigrationComplete": True,
- "opus45MigrationComplete": True,
- "thinkingMigrationComplete": True,
- "hasShownOpus45Notice": {},
- "lastReleaseNotesSeen": "99.0.0",
- "lastOnboardingVersion": "99.0.0",
- "oauthAccount": {
- "displayName": "wt",
- "emailAddress": "[email protected]"
- },
- "customApiKeyResponses": {
- "approved": [api_key_suffix] if api_key_suffix else [],
- "rejected": []
- },
- "officialMarketplaceAutoInstalled": True,
- "tipsHistory": {
- "new-user-warmup": 100,
- "terminal-setup": 100,
- "theme-command": 100
- },
- "projects": projects_config
- }, indent=2))
+ claude_json.write_text(
+ json.dumps(
+ {
+ "numStartups": 100,
+ "installMethod": "global",
+ "theme": "light",
+ "firstStartTime": "2025-01-01T00:00:00.000Z",
+ "hasCompletedOnboarding": True,
+ "hasCompletedClaudeInChromeOnboarding": True,
+ "claudeInChromeDefaultEnabled": False,
+ "sonnet45MigrationComplete": True,
+ "opus45MigrationComplete": True,
+ "thinkingMigrationComplete": True,
+ "hasShownOpus45Notice": {},
+ "lastReleaseNotesSeen": "99.0.0",
+ "lastOnboardingVersion": "99.0.0",
+ "oauthAccount": {
+ "displayName": "wt",
+ "emailAddress": "[email protected]",
+ },
+ "customApiKeyResponses": {
+ "approved": [api_key_suffix] if api_key_suffix else [],
+ "rejected": [],
+ },
+ "officialMarketplaceAutoInstalled": True,
+ "tipsHistory": {
+ "new-user-warmup": 100,
+ "terminal-setup": 100,
+ "theme-command": 100,
+ },
+ "projects": projects_config,
+ },
+ indent=2,
+ )
+ )
# Copy claude binary to prevent "installMethod is native" warnings
# Claude Code detects native install by checking if ~/.local/bin/claude exists
@@ -303,16 +314,12 @@ def setup_claude_code_config(
claude_dir = env.home / ".claude"
claude_dir.mkdir(exist_ok=True)
settings = {
- "permissions": {
- "allow": allowed_tools or [],
- "deny": [],
- "ask": []
- },
+ "permissions": {"allow": allowed_tools or [], "deny": [], "ask": []},
"model": "claude-opus-4-5-20251101",
"statusLine": {
"type": "command",
- "command": "wt list statusline --claude-code"
- }
+ "command": "wt list statusline --claude-code",
+ },
}
(claude_dir / "settings.json").write_text(json.dumps(settings, indent=2))
@@ -342,7 +349,7 @@ def setup_zellij_config(env: DemoEnv, default_cwd: str = None) -> None:
default_cwd_line = f'default_cwd "{default_cwd}"' if default_cwd else ""
zellij_config = zellij_config_dir / "config.kdl"
- zellij_config.write_text(f'''// Demo Zellij config
+ zellij_config.write_text(f"""// Demo Zellij config
default_shell "fish"
{default_cwd_line}
pane_frames false
@@ -398,7 +405,7 @@ keybinds clear-defaults=true {{
bind "Esc" {{ SwitchToMode "normal"; }}
}}
}}
-''')
+""")
def setup_fish_config(env: DemoEnv, wsl_create: bool = False) -> None:
@@ -418,10 +425,14 @@ def setup_fish_config(env: DemoEnv, wsl_create: bool = False) -> None:
fish_config_dir = env.home / ".config" / "fish"
fish_config_dir.mkdir(parents=True, exist_ok=True)
- wsl_cmd = "wt switch --execute=claude --create" if wsl_create else "wt switch --execute=claude"
+ wsl_cmd = (
+ "wt switch --execute=claude --create"
+ if wsl_create
+ else "wt switch --execute=claude"
+ )
fish_config = fish_config_dir / "config.fish"
- fish_config.write_text(f'''# Demo fish config
+ fish_config.write_text(f"""# Demo fish config
set -U fish_greeting ""
# wsl abbreviation: switch to worktree and launch Claude
abbr --add wsl '{wsl_cmd}'
@@ -445,7 +456,7 @@ function __zellij_tab_rename --on-variable PWD
end
end
end
-''')
+""")
def setup_mock_clis(env: DemoEnv) -> None:
@@ -580,7 +591,9 @@ def prepare_demo_repo(env: DemoEnv, repo_root: Path, hooks_config: str = None):
# Commit to main so beta is behind
readme = env.repo / "README.md"
- readme.write_text(readme.read_text() + "\n## Development\n\nSee CONTRIBUTING.md for guidelines.\n")
+ readme.write_text(
+ readme.read_text() + "\n## Development\n\nSee CONTRIBUTING.md for guidelines.\n"
+ )
(env.repo / "notes.md").write_text("# Notes\n")
git(["-C", str(env.repo), "add", "README.md", "notes.md"])
commit_dated(env.repo, "docs: add development section", "1d")
@@ -599,7 +612,7 @@ def _create_branch_alpha(env: DemoEnv):
git(["-C", str(env.repo), "checkout", "-q", "-b", branch, "main"])
# Initial README changes
- (env.repo / "README.md").write_text('''# Acme App
+ (env.repo / "README.md").write_text("""# Acme App
A demo application for showcasing worktrunk features.
@@ -613,7 +626,7 @@ A demo application for showcasing worktrunk features.
## Getting Started
Run `wt list` to see all worktrees.
-''')
+""")
git(["-C", str(env.repo), "add", "README.md"])
commit_dated(env.repo, "docs: expand README", "3d")
@@ -721,7 +734,7 @@ def is_interactive_tape(tape_path: Path) -> bool:
# Also check for keystroke overlay which indicates visual TUI demo
interactive_pattern = re.compile(
r"^(Down|Up|Left|Right|Ctrl\+|Tab\s|Backspace|Escape|Set KeyStrokes)",
- re.MULTILINE
+ re.MULTILINE,
)
return bool(interactive_pattern.search(content))
@@ -759,11 +772,15 @@ def record_text(
# Modify for text output
temp_txt = (demo_env.out_dir / ".text-output.txt").resolve()
- rendered = re.sub(r'^Output\s+"[^"]+"', f'Output "{temp_txt}"', rendered, flags=re.MULTILINE)
- rendered = re.sub(r'^Set Width .*$', 'Set Width 120', rendered, flags=re.MULTILINE)
- rendered = re.sub(r'^Set Height .*$', 'Set Height 120', rendered, flags=re.MULTILINE)
+ rendered = re.sub(
+ r'^Output\s+"[^"]+"', f'Output "{temp_txt}"', rendered, flags=re.MULTILINE
+ )
+ rendered = re.sub(r"^Set Width .*$", "Set Width 120", rendered, flags=re.MULTILINE)
+ rendered = re.sub(
+ r"^Set Height .*$", "Set Height 120", rendered, flags=re.MULTILINE
+ )
for setting in ["FontSize", "Theme", "Padding"]:
- rendered = re.sub(rf'^Set {setting} .*$\n?', '', rendered, flags=re.MULTILINE)
+ rendered = re.sub(rf"^Set {setting} .*$\n?", "", rendered, flags=re.MULTILINE)
# Write and run
tape_rendered = (demo_env.out_dir / ".text-rendered.tape").resolve()
@@ -782,6 +799,7 @@ def record_text(
@dataclass
class DemoSize:
"""Canvas and font size for demo recording."""
+
width: int
height: int
fontsize: int
@@ -789,7 +807,7 @@ class DemoSize:
# Predefined sizes for different contexts
SIZE_SOCIAL = DemoSize(width=1200, height=700, fontsize=26) # Big text for mobile
-SIZE_DOCS = DemoSize(width=1600, height=900, fontsize=24) # More content for docs
+SIZE_DOCS = DemoSize(width=1600, height=900, fontsize=24) # More content for docs
def build_tape_replacements(demo_env: DemoEnv, repo_root: Path) -> dict:
diff --git a/docs/demos/shared/themes.py b/docs/demos/shared/themes.py
index 0f341ea85..613ea2692 100644
--- a/docs/demos/shared/themes.py
+++ b/docs/demos/shared/themes.py
@@ -40,26 +40,26 @@ LIGHT_THEME = {
# Terminal colors: --cyan: #67d4d4, --green: #4ade80, --red: #f87171, etc.
DARK_THEME = {
"name": "Warm Workbench Dark",
- "black": "#6b7280", # --bright-black from CSS
- "red": "#f87171", # --red dark mode
- "green": "#4ade80", # --green dark mode
- "yellow": "#fbbf24", # --yellow dark mode
- "blue": "#60a5fa", # --blue dark mode
- "magenta": "#c084fc", # --magenta dark mode
- "cyan": "#67d4d4", # --cyan dark mode
- "white": "#a8a29e", # --wt-color-text-muted
- "brightBlack": "#6b7280", # same as black
- "brightRed": "#fca5a5", # lighter red
- "brightGreen": "#86efac", # lighter green
- "brightYellow": "#fde047", # lighter yellow
- "brightBlue": "#93c5fd", # lighter blue
- "brightMagenta": "#d8b4fe", # lighter magenta
- "brightCyan": "#a5f3fc", # lighter cyan
- "brightWhite": "#e8e6e3", # --wt-color-text
- "background": "#1c1b1a", # --wt-color-bg dark mode
- "foreground": "#e8e6e3", # --wt-color-text dark mode
- "cursor": "#f59e0b", # --wt-color-accent dark mode
- "selection": "#422006", # --wt-color-accent-soft dark mode
+ "black": "#6b7280", # --bright-black from CSS
+ "red": "#f87171", # --red dark mode
+ "green": "#4ade80", # --green dark mode
+ "yellow": "#fbbf24", # --yellow dark mode
+ "blue": "#60a5fa", # --blue dark mode
+ "magenta": "#c084fc", # --magenta dark mode
+ "cyan": "#67d4d4", # --cyan dark mode
+ "white": "#a8a29e", # --wt-color-text-muted
+ "brightBlack": "#6b7280", # same as black
+ "brightRed": "#fca5a5", # lighter red
+ "brightGreen": "#86efac", # lighter green
+ "brightYellow": "#fde047", # lighter yellow
+ "brightBlue": "#93c5fd", # lighter blue
+ "brightMagenta": "#d8b4fe", # lighter magenta
+ "brightCyan": "#a5f3fc", # lighter cyan
+ "brightWhite": "#e8e6e3", # --wt-color-text
+ "background": "#1c1b1a", # --wt-color-bg dark mode
+ "foreground": "#e8e6e3", # --wt-color-text dark mode
+ "cursor": "#f59e0b", # --wt-color-accent dark mode
+ "selection": "#422006", # --wt-color-accent-soft dark mode
}
THEMES = {