Skip to content

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

Reorganize demo assets into mode/theme subdirectories

Maximilian Roose0c41ca8e478
diff --git a/README.md b/README.md
index 48e4656e7..70805abc1 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ Worktrunk's three core commands make worktrees as easy as branches. Plus, Worktr
Scaling agents becomes trivial. Here's a quick demo:
-![Worktrunk Demo](https://cdn.jsdelivr.net/gh/max-sixty/worktrunk-assets@main/demos/wt-core.gif)
+![Worktrunk Demo](https://cdn.jsdelivr.net/gh/max-sixty/worktrunk-assets@main/demos/docs/light/wt-core.gif)
> ## πŸ“š Full documentation at [worktrunk.dev](https://worktrunk.dev) πŸ“š
@@ -93,7 +93,7 @@ git branch -d feat</pre></td>
Here's a demo with some of the more advanced features:
-![Worktrunk omnibus demo: multiple Claude agents in Zellij tabs with hooks, LLM commits, and merge workflow](https://raw.githubusercontent.com/max-sixty/worktrunk-assets/main/demos/wt-zellij-omnibus.gif)
+![Worktrunk omnibus demo: multiple Claude agents in Zellij tabs with hooks, LLM commits, and merge workflow](https://raw.githubusercontent.com/max-sixty/worktrunk-assets/main/demos/docs/light/wt-zellij-omnibus.gif)
<!-- END AUTO-GENERATED -->
diff --git a/dev/fetch-assets b/dev/fetch-assets
index 48bb920fd..5ba2aca30 100755
--- a/dev/fetch-assets
+++ b/dev/fetch-assets
@@ -6,14 +6,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(dirname "$SCRIPT_DIR")"
ASSETS_DIR="$REPO_ROOT/docs/static/assets"
+echo "Fetching demo assets..."
+rm -rf "$ASSETS_DIR"
mkdir -p "$ASSETS_DIR"
-echo "Fetching demo assets..."
-for file in $(curl -fsSL https://api.github.com/repos/max-sixty/worktrunk-assets/contents/demos \
- | jq -r '.[].name'); do
- echo " $file"
- curl -fsSL -o "$ASSETS_DIR/$file" \
- "https://raw.githubusercontent.com/max-sixty/worktrunk-assets/main/demos/$file"
-done
+curl -fsSL "https://github.com/max-sixty/worktrunk-assets/archive/refs/heads/main.tar.gz" \
+ | tar -xz --strip-components=2 -C "$ASSETS_DIR" "worktrunk-assets-main/demos"
-echo "Done. Assets in docs/static/assets/"
+echo "Done. Assets in $ASSETS_DIR/"
diff --git a/dev/publish-assets b/dev/publish-assets
index 9cdb5edcd..afadce32f 100755
--- a/dev/publish-assets
+++ b/dev/publish-assets
@@ -27,46 +27,26 @@ if ! git pull --ff-only; then
exit 1
fi
-# Copy all GIFs
-echo "Copying assets..."
-copied=()
-for src in "$DEMOS_DIR"/*.gif; do
- [[ -f "$src" ]] || continue
- name="$(basename "$src")"
- cp "$src" "$ASSETS_REPO/demos/"
- copied+=("$name")
- echo " $name"
-done
-
-if [[ ${#copied[@]} -eq 0 ]]; then
- echo "No demo GIFs found. Build them first:"
+# Copy demo assets
+if [[ ! -d "$DEMOS_DIR" ]] || [[ -z "$(ls -A "$DEMOS_DIR")" ]]; then
+ echo "No demo assets found. Build them first:"
echo " ./docs/demos/build docs"
exit 1
fi
+rsync -av --delete "$DEMOS_DIR/" "$ASSETS_REPO/demos/"
+
# Check for changes
if git diff --quiet demos/; then
echo "No changes to publish"
exit 0
fi
-# Show what changed
-echo ""
-echo "Changes:"
-git diff --stat demos/
-
# Commit and push
+git diff --stat demos/
git add demos/
git commit -m "Update demo assets"
git push
echo ""
-echo "Published:"
-for name in "${copied[@]}"; do
- echo " https://raw.githubusercontent.com/max-sixty/worktrunk-assets/main/demos/$name"
-done
-echo ""
-echo "CDN (~1 min to update):"
-for name in "${copied[@]}"; do
- echo " https://cdn.jsdelivr.net/gh/max-sixty/worktrunk-assets@main/demos/$name"
-done
+echo "Published: https://github.com/max-sixty/worktrunk-assets/tree/main/demos"
diff --git a/docs/CLAUDE.md b/docs/CLAUDE.md
index 2dc74f44d..2330f7b08 100644
--- a/docs/CLAUDE.md
+++ b/docs/CLAUDE.md
@@ -276,7 +276,7 @@ Demo GIFs (~2MB each) are stored in a separate `worktrunk-assets` repo to avoid
```bash
./docs/demos/build docs # Doc site demos (light + dark)
-./docs/demos/build twitter # Twitter demos (light only)
+./docs/demos/build social # Social media demos (light only)
./dev/publish-assets # Publish to assets repo
```
@@ -290,8 +290,8 @@ In markdown, use `<picture>` with media queries:
```html
<figure class="demo">
<picture>
- <source srcset="/assets/wt-select-dark.gif" media="(prefers-color-scheme: dark)">
- <img src="/assets/wt-select.gif" alt="wt select demo" width="1600" height="800">
+ <source srcset="/assets/docs/dark/wt-select.gif" media="(prefers-color-scheme: dark)">
+ <img src="/assets/docs/light/wt-select.gif" alt="wt select demo" width="1600" height="800">
</picture>
</figure>
```
diff --git a/docs/content/merge.md b/docs/content/merge.md
index 28bf6da20..9de221a39 100644
--- a/docs/content/merge.md
+++ b/docs/content/merge.md
@@ -10,8 +10,8 @@ group = "Commands"
<figure class="demo">
<picture>
- <source srcset="/assets/wt-merge-dark.gif" media="(prefers-color-scheme: dark)">
- <img src="/assets/wt-merge.gif" alt="wt merge demo" width="1600" height="900">
+ <source srcset="/assets/docs/dark/wt-merge.gif" media="(prefers-color-scheme: dark)">
+ <img src="/assets/docs/light/wt-merge.gif" alt="wt merge demo" width="1600" height="900">
</picture>
</figure>
diff --git a/docs/content/select.md b/docs/content/select.md
index c34a6f0e4..dc6b49339 100644
--- a/docs/content/select.md
+++ b/docs/content/select.md
@@ -12,8 +12,8 @@ Interactive worktree picker with live preview. Navigate worktrees with keyboard
<figure class="demo">
<picture>
- <source srcset="/assets/wt-select-dark.gif" media="(prefers-color-scheme: dark)">
- <img src="/assets/wt-select.gif" alt="wt select demo" width="1600" height="800">
+ <source srcset="/assets/docs/dark/wt-select.gif" media="(prefers-color-scheme: dark)">
+ <img src="/assets/docs/light/wt-select.gif" alt="wt select demo" width="1600" height="800">
</picture>
</figure>
diff --git a/docs/content/worktrunk.md b/docs/content/worktrunk.md
index 67dde006f..8bdd1c461 100644
--- a/docs/content/worktrunk.md
+++ b/docs/content/worktrunk.md
@@ -14,8 +14,8 @@ Scaling agents becomes trivial. Here's a quick demo:
<figure class="demo">
<picture>
- <source srcset="/assets/wt-core-dark.gif" media="(prefers-color-scheme: dark)">
- <img src="/assets/wt-core.gif" alt="Worktrunk demo showing wt list, wt switch, and hooks" width="1600" height="900">
+ <source srcset="/assets/docs/dark/wt-core.gif" media="(prefers-color-scheme: dark)">
+ <img src="/assets/docs/light/wt-core.gif" alt="Worktrunk demo showing wt list, wt switch, and hooks" width="1600" height="900">
</picture>
<figcaption>Listing worktrees, switching, cleaning up</figcaption>
</figure>
@@ -89,8 +89,8 @@ Here's a demo with some of the more advanced features:
<figure class="demo">
<picture>
- <source srcset="/assets/wt-zellij-omnibus-dark.gif" media="(prefers-color-scheme: dark)">
- <img src="/assets/wt-zellij-omnibus.gif" alt="Worktrunk omnibus demo: multiple Claude agents in Zellij tabs with hooks, LLM commits, and merge workflow" width="1600" height="900">
+ <source srcset="/assets/docs/dark/wt-zellij-omnibus.gif" media="(prefers-color-scheme: dark)">
+ <img src="/assets/docs/light/wt-zellij-omnibus.gif" alt="Worktrunk omnibus demo: multiple Claude agents in Zellij tabs with hooks, LLM commits, and merge workflow" width="1600" height="900">
</picture>
<figcaption>Multiple Claude agents in parallel with hooks, LLM commits, and merge</figcaption>
</figure>
diff --git a/docs/demos/CLAUDE.md b/docs/demos/CLAUDE.md
index 60cf5eafd..d7ed41088 100644
--- a/docs/demos/CLAUDE.md
+++ b/docs/demos/CLAUDE.md
@@ -10,21 +10,26 @@ docs/demos/
vhs-keystrokes/ # Custom VHS binary (gitignored, built on demand)
docs/static/assets/ # Output GIFs (gitignored, shared with fetch-assets)
+ docs/ # Doc site demos (1600x900)
+ light/ # Light theme variants
+ dark/ # Dark theme variants
+ social/ # Social media demos (1200x700)
+ light/ # Light theme only
```
-Tape files use template variables (`{{FONTSIZE}}`, `{{WIDTH}}`, `{{HEIGHT}}`) so the same tape produces different sizes for docs vs Twitter.
+Tape files use template variables (`{{FONTSIZE}}`, `{{WIDTH}}`, `{{HEIGHT}}`) so the same tape produces different sizes for docs vs social.
## Regenerating demos
```bash
./docs/demos/build docs # Doc site demos (1600x900, light + dark)
-./docs/demos/build twitter # Twitter demos (1200x700, light only)
+./docs/demos/build social # Social media demos (1200x700, light only)
```
Regenerate a single demo:
```bash
-./docs/demos/build twitter --only wt-switch
+./docs/demos/build social --only wt-switch
./docs/demos/build docs --only wt-merge
```
@@ -33,7 +38,7 @@ Regenerate a single demo:
| Target | Demos |
|--------|-------|
| docs | wt-core, wt-merge, wt-select, wt-zellij-omnibus |
-| twitter | wt-switch, wt-statusline, wt-list, wt-list-remove, wt-hooks, wt-devserver, wt-commit, wt-merge, wt-select-short, wt-core, wt-zellij-omnibus |
+| social | wt-switch, wt-statusline, wt-list, wt-list-remove, wt-hooks, wt-devserver, wt-commit, wt-merge, wt-select-short, wt-core, wt-zellij-omnibus |
## Publishing demos
@@ -43,7 +48,7 @@ After building, publish to the assets repo:
./dev/publish-assets
```
-This copies `docs/static/assets/*.gif` to the `worktrunk-assets` repo (sibling directory), commits, and pushes. The script clones the repo via `gh` if missing.
+This copies `docs/static/assets/{docs,social}/` to the `worktrunk-assets` repo (sibling directory), commits, and pushes. The script clones the repo via `gh` if missing.
To fetch published assets (without rebuilding):
@@ -115,12 +120,12 @@ Branch setup (from shared infrastructure):
## Light/dark theme variants
-The docs build generates both light and dark GIF variants:
-- `wt-core.gif` / `wt-core-dark.gif`
-- `wt-merge.gif` / `wt-merge-dark.gif`
-- `wt-select.gif` / `wt-select-dark.gif`
+The docs build generates both light and dark GIF variants in separate directories:
+- `docs/light/wt-core.gif` / `docs/dark/wt-core.gif`
+- `docs/light/wt-merge.gif` / `docs/dark/wt-merge.gif`
+- `docs/light/wt-select.gif` / `docs/dark/wt-select.gif`
-Twitter build generates light only (Twitter doesn't support theme-switching media queries).
+Social build generates light only (social media doesn't support theme-switching media queries).
Theme definitions are in `docs/demos/shared/themes.py`, matching the CSS variables in `_variables.html`.
@@ -129,7 +134,7 @@ Theme definitions are in `docs/demos/shared/themes.py`, matching the CSS variabl
Use `--shell` to spawn an interactive fish shell with the demo environment:
```bash
-./docs/demos/build twitter --only wt-switch --shell
+./docs/demos/build social --only wt-switch --shell
```
This builds the demo and drops you into a fish shell with `HOME`, `PATH`, starship, and wt shell integration all configured. You're already in the demo repo and ready to test:
@@ -193,17 +198,17 @@ Key fields in `.claude.json` for suppressing notifications:
Inline viewing options:
```bash
# Quick Look (macOS)
-qlmanage -p docs/static/assets/wt-select.gif
+qlmanage -p docs/static/assets/docs/light/wt-select.gif
# iTerm2 inline images
-imgcat docs/static/assets/wt-select.gif
+imgcat docs/static/assets/docs/light/wt-select.gif
```
## Extracting frames from a GIF for inspection
```bash
mkdir -p /tmp/frames
-magick docs/static/assets/wt-switch.gif -coalesce /tmp/frames/frame_%03d.png
+magick docs/static/assets/social/light/wt-switch.gif -coalesce /tmp/frames/frame_%03d.png
# View a specific frame
open /tmp/frames/frame_200.png
diff --git a/docs/demos/build b/docs/demos/build
index 50224fab7..0b64732a3 100755
--- a/docs/demos/build
+++ b/docs/demos/build
@@ -3,15 +3,19 @@
Usage:
./build docs # Build doc site demos (light + dark, 1600x900)
- ./build twitter # Build Twitter demos (light only, 1200x700)
+ ./build social # Build social media demos (light only, 1200x700)
./build docs --only wt-merge # Build specific demo for docs
- ./build twitter --only wt-zellij-omnibus --shell # Debug shell for Twitter demo
+ ./build social --only wt-zellij-omnibus --shell # Debug shell for social demo
+
+Output is written to docs/static/assets/{mode}/{theme}/, ensuring docs and social
+builds don't overwrite each other. The assets repo mirrors this structure.
"""
import argparse
import os
import subprocess
import sys
+import tempfile
from pathlib import Path
# Add docs/demos/ to path for shared library
@@ -20,10 +24,10 @@ sys.path.insert(0, str(SCRIPT_DIR))
from shared import (
VALIDATION_RS,
- DemoEnv, DemoSize, git, prepare_demo_repo,
+ DemoEnv, 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_TWITTER,
+ SIZE_DOCS, SIZE_SOCIAL,
is_interactive_tape, record_text, build_tape_replacements,
)
@@ -31,10 +35,6 @@ REPO_ROOT = SCRIPT_DIR.parent.parent
OUT_DIR = SCRIPT_DIR.parent / "static" / "assets"
TAPES_DIR = SCRIPT_DIR / "tapes"
-# Sizes
-SIZE_ZELLIJ = DemoSize(width=1200, height=700, fontsize=16)
-SIZE_DEVSERVER = DemoSize(width=1400, height=700, fontsize=24) # Wider to show URL column
-
# Custom VHS binary with keystroke overlay
VHS_KEYSTROKES = os.environ.get(
"VHS_KEYSTROKES",
@@ -252,39 +252,39 @@ echo "Add placeholder module for user profile settings."
# Demo Registrations
# =============================================================================
-# Format: (tape_file, output_name, setup_func, vhs_type, size_override)
-# size_override is optional - if None, uses target default
+# Format: (tape_file, output_name, setup_func, vhs_type)
+# All demos in a mode use that mode's default size.
DOCS_DEMOS = [
- ("wt-core.tape", "wt-core", prepare_with_hooks, "vhs", None),
- ("wt-merge.tape", "wt-merge", prepare_with_llm_commit, "vhs", None),
- ("wt-select.tape", "wt-select", prepare_basic, "vhs-keystrokes", None),
- ("wt-zellij-omnibus.tape", "wt-zellij-omnibus", prepare_zellij_omnibus, "vhs", None),
+ ("wt-core.tape", "wt-core", prepare_with_hooks, "vhs"),
+ ("wt-merge.tape", "wt-merge", prepare_with_llm_commit, "vhs"),
+ ("wt-select.tape", "wt-select", prepare_basic, "vhs-keystrokes"),
+ ("wt-zellij-omnibus.tape", "wt-zellij-omnibus", prepare_zellij_omnibus, "vhs"),
]
-TWITTER_DEMOS = [
- ("wt-switch.tape", "wt-switch", prepare_switch, "vhs", None),
- ("wt-statusline.tape", "wt-statusline", prepare_switch, "vhs", None),
- ("wt-list.tape", "wt-list", prepare_with_hooks, "vhs", None),
- ("wt-list-remove.tape", "wt-list-remove", prepare_with_hooks, "vhs", None),
- ("wt-hooks.tape", "wt-hooks", lambda env: prepare_with_hooks(env, include_deps=True), "vhs", None),
- ("wt-devserver.tape", "wt-devserver", prepare_devserver, "vhs", SIZE_DEVSERVER),
- ("wt-commit.tape", "wt-commit", prepare_with_llm_commit, "vhs", None),
- ("wt-merge.tape", "wt-merge", prepare_merge_only, "vhs", None),
- ("wt-select-short.tape", "wt-select-short", prepare_basic, "vhs-keystrokes", None),
- ("wt-core.tape", "wt-core", prepare_with_hooks, "vhs", None),
- ("wt-zellij-omnibus.tape", "wt-zellij-omnibus", prepare_zellij_omnibus, "vhs", SIZE_ZELLIJ),
+SOCIAL_DEMOS = [
+ ("wt-switch.tape", "wt-switch", prepare_switch, "vhs"),
+ ("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", lambda env: prepare_with_hooks(env, include_deps=True), "vhs"),
+ ("wt-devserver.tape", "wt-devserver", prepare_devserver, "vhs"),
+ ("wt-commit.tape", "wt-commit", prepare_with_llm_commit, "vhs"),
+ ("wt-merge.tape", "wt-merge", prepare_merge_only, "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"),
]
TARGETS = {
"docs": {
"demos": DOCS_DEMOS,
- "default_size": SIZE_DOCS,
+ "size": SIZE_DOCS,
"themes": ["light", "dark"],
},
- "twitter": {
- "demos": TWITTER_DEMOS,
- "default_size": SIZE_TWITTER,
+ "social": {
+ "demos": SOCIAL_DEMOS,
+ "size": SIZE_SOCIAL,
"themes": ["light"],
},
}
@@ -322,13 +322,13 @@ def main():
epilog="""
Examples:
./build docs Build all doc site demos (light + dark)
- ./build twitter Build all Twitter demos (light only)
+ ./build social Build all social media demos (light only)
./build docs --only wt-merge Build specific demo for docs
./build docs --text Build text output for non-interactive demos
- ./build twitter --only wt-zellij-omnibus --shell Debug shell for demo
+ ./build social --only wt-zellij-omnibus --shell Debug shell for demo
"""
)
- parser.add_argument("target", choices=["docs", "twitter"],
+ 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",
@@ -349,25 +349,27 @@ Examples:
deps = ["wt", "vhs", "starship", "zellij"]
check_dependencies(deps)
- starship_config = setup_demo_output(OUT_DIR)
+ # Output goes to mode/theme subdirectories
+ mode_out_dir = OUT_DIR / args.target
+ starship_config = setup_demo_output(mode_out_dir)
target_config = TARGETS[args.target]
demos = target_config["demos"]
- default_size = target_config["default_size"]
+ demo_size = target_config["size"]
themes = target_config["themes"]
# Filter demos if --only specified
if args.only:
- demos = [(t, n, s, v, sz) for t, n, s, v, sz in demos if n == args.only]
+ demos = [(t, n, s, v) for t, n, s, v in demos if n == args.only]
if not demos:
- all_names = [n for _, n, _, _, _ in target_config["demos"]]
+ all_names = [n for _, n, _, _ in target_config["demos"]]
print(f"Unknown demo: {args.only}")
print(f"Available for {args.target}: {', '.join(all_names)}")
return
# Check vhs-keystrokes availability
vhs_keystrokes_available = Path(VHS_KEYSTROKES).exists()
- needs_keystrokes = any(vhs_type == "vhs-keystrokes" for _, _, _, vhs_type, _ in demos)
+ 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)
@@ -376,7 +378,7 @@ Examples:
sys.exit(1)
# Record each demo
- for tape_file, output_name, setup_func, vhs_type, size_override in demos:
+ for tape_file, output_name, setup_func, vhs_type in demos:
tape_path = TAPES_DIR / tape_file
if not tape_path.exists():
print(f"Skipping {output_name}: {tape_file} not found")
@@ -388,17 +390,15 @@ Examples:
continue
vhs_binary = VHS_KEYSTROKES if vhs_type == "vhs-keystrokes" else "vhs"
- demo_size = size_override or default_size
print(f"\n{'='*60}")
print(f"Recording {output_name} ({args.target}){' [text]' if args.text else ''}...")
print(f"{'='*60}")
- # Create fresh environment for each demo
- # Use /private/tmp for Zellij demos to isolate Claude instances
- demo_out_dir = Path("/private/tmp/wt-demos") if output_name.startswith("wt-zellij") else OUT_DIR
- setup_demo_output(demo_out_dir)
- env = DemoEnv(name=output_name, out_dir=demo_out_dir, repo_name="acme")
+ # Create fresh environment in temp directory (keeps output dir clean)
+ demo_env_dir = Path(tempfile.mkdtemp(prefix="wt-demo-"))
+ setup_demo_output(demo_env_dir)
+ env = DemoEnv(name=output_name, out_dir=demo_env_dir, repo_name="acme")
setup_func(env)
print(f"Demo repo: {env.repo}")
@@ -410,14 +410,17 @@ Examples:
replacements = build_tape_replacements(env, REPO_ROOT)
if args.text:
- output_txt = OUT_DIR / f"{output_name}.txt"
+ # Text output goes to mode directory (not theme subdirectory)
+ output_txt = mode_out_dir / f"{output_name}.txt"
record_text(env, tape_path, output_txt, replacements)
print(f"Text saved to {output_txt}")
else:
- # Build output GIF paths based on themes
- output_gifs = {"light": OUT_DIR / f"{output_name}.gif"}
- if "dark" in themes:
- output_gifs["dark"] = OUT_DIR / f"{output_name}-dark.gif"
+ # Build output GIF paths: mode/theme/name.gif
+ output_gifs = {}
+ for theme in themes:
+ theme_dir = mode_out_dir / theme
+ 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)
diff --git a/docs/demos/shared/__init__.py b/docs/demos/shared/__init__.py
index db31a7489..2c61ad26d 100644
--- a/docs/demos/shared/__init__.py
+++ b/docs/demos/shared/__init__.py
@@ -6,7 +6,7 @@ from .lib import (
VALIDATION_RS,
DemoEnv,
DemoSize,
- SIZE_TWITTER,
+ SIZE_SOCIAL,
SIZE_DOCS,
run,
git,
@@ -37,7 +37,7 @@ __all__ = [
"VALIDATION_RS",
"DemoEnv",
"DemoSize",
- "SIZE_TWITTER",
+ "SIZE_SOCIAL",
"SIZE_DOCS",
"run",
"git",
diff --git a/docs/demos/shared/lib.py b/docs/demos/shared/lib.py
index 569d83c6e..3b8e5aa2e 100644
--- a/docs/demos/shared/lib.py
+++ b/docs/demos/shared/lib.py
@@ -807,8 +807,8 @@ class DemoSize:
# Predefined sizes for different contexts
-SIZE_TWITTER = 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_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
def build_tape_replacements(demo_env: DemoEnv, repo_root: Path) -> dict:
diff --git a/docs/static/demos/twitter/thread.md b/docs/static/demos/twitter/thread.md
index 41643add5..223e7586c 100644
--- a/docs/static/demos/twitter/thread.md
+++ b/docs/static/demos/twitter/thread.md
@@ -43,7 +43,7 @@ Announcing Worktrunk! A git worktree manager, designed for running AI agents in
A few points on why I'm so excited about the project, and why I hope it becomes broadly adopted 🧡
-[wt-core.gif](../../../assets/wt-core.gif)
+[wt-core.gif](../../../assets/social/light/wt-core.gif)
<!-- NOTE: Considered Zellij demo here but it's too complex for tweet 1's hook role.
Placed omnibus demo at tweet 13 instead (before CTA). -->
@@ -78,7 +78,7 @@ In contrast to the git command, the Worktrunk command to create a new worktree i
𝚠𝚝 πšœπš πš’πšπšŒπš‘ --πšŒπš›πšŽπšŠπšπšŽ πšŠπš™πš’
-[wt-switch.gif](../../../assets/wt-switch.gif)
+[wt-switch.gif](../../../assets/social/light/wt-switch.gif)
**6/** (105 chars)
Worktrunk's other core commands:
@@ -86,7 +86,7 @@ Worktrunk's other core commands:
𝚠𝚝 πš•πš’πšœπš: see all worktrees with status
𝚠𝚝 πš›πšŽπš–πš˜πšŸπšŽ: delete a worktree
-[wt-list-remove.gif](../../../assets/wt-list-remove.gif)
+[wt-list-remove.gif](../../../assets/social/light/wt-list-remove.gif)
<!-- ============ PHASE 4: FEATURES ============ -->
<!-- Goal: List additional capabilities, one per tweet, snappy -->
@@ -96,7 +96,7 @@ Beyond core commands, Worktrunk has quality-of-life features to simplify working
Hooks: Post-start hooks run after creating a worktree: install deps, copy caches, start dev servers, etc. And there's a hook for every stage of a worktree lifecycle.
-[wt-hooks.gif](../../../assets/wt-hooks.gif)
+[wt-hooks.gif](../../../assets/social/light/wt-hooks.gif)
<!-- TODO: Consider cutting or merging tweets 8-9. Reviewers noted:
- "50ms" is too technical / doesn't connect to AI workflows
@@ -108,32 +108,32 @@ Hooks: Post-start hooks run after creating a worktree: install deps, copy caches
𝚠𝚝 πš•πš’πšœπš --πšπšžπš•πš•: CI status as clickable dots. Green/blue/red. Clicking opens the PR.
-[wt-list.gif](../../../assets/wt-list.gif)
+[wt-list.gif](../../../assets/social/light/wt-list.gif)
**9/** (45 chars)
𝚠𝚝 πšœπšŽπš•πšŽπšŒπš: fuzzy picker across all branches.
-[wt-select-short.gif](../../../assets/wt-select-short.gif)
+[wt-select-short.gif](../../../assets/social/light/wt-select-short.gif)
**10/** (99 chars)
LLM Commits: When running 𝚠𝚝 πšœπšπšŽπš™ πšŒπš˜πš–πš–πš’πš or 𝚠𝚝 πš–πšŽπš›πšπšŽ, worktrunk can have an LLM write the commit message, with a customizable template.
-[wt-commit.gif](../../../assets/wt-commit.gif)
+[wt-commit.gif](../../../assets/social/light/wt-commit.gif)
**11/** (78 chars)
𝚠𝚝 πš–πšŽπš›πšπšŽ: squash, rebase, merge, remove worktree, delete branch, in one command.
-[wt-merge.gif](../../../assets/wt-merge.gif)
+[wt-merge.gif](../../../assets/social/light/wt-merge.gif)
**12/** (83 chars)
@claudeai status line integration. See branch, diff stats, CI status at a glance.
-[wt-statusline.gif](../../../assets/wt-statusline.gif)
+[wt-statusline.gif](../../../assets/social/light/wt-statusline.gif)
**13/** (168 chars)
Putting it all together: parallel Claude Code agents in Zellij tabs, each in its own worktree. The full lifecycle: 𝚠𝚝 πšœπš πš’πšπšŒπš‘, 𝚠𝚝 πš•πš’πšœπš, 𝚠𝚝 πšœπšŽπš•πšŽπšŒπš, 𝚠𝚝 πš–πšŽπš›πšπšŽ.
-[wt-zellij-omnibus.gif](../../../assets/wt-zellij-omnibus.gif)
+[wt-zellij-omnibus.gif](../../../assets/social/light/wt-zellij-omnibus.gif)
<!-- ============ PHASE 5: CTA ============ -->
<!-- Goal: Install instructions, docs, invite feedback, star -->
diff --git a/src/main.rs b/src/main.rs
index 3c9857c42..15047bfa3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -565,9 +565,9 @@ fn expand_demo_placeholders(text: &str) -> String {
// Use figure.demo class for proper mobile styling (no shrink, horizontal scroll)
// Generate <picture> element for light/dark theme switching
- let dark_filename = filename.trim_end_matches(".gif").to_string() + "-dark.gif";
+ // Assets are organized as: /assets/docs/{light,dark}/filename.gif
let replacement = format!(
- "<figure class=\"demo\">\n<picture>\n <source srcset=\"/assets/{dark_filename}\" media=\"(prefers-color-scheme: dark)\">\n <img src=\"/assets/{filename}\" alt=\"{alt_text} demo\"{dim_attrs}>\n</picture>\n</figure>"
+ "<figure class=\"demo\">\n<picture>\n <source srcset=\"/assets/docs/dark/{filename}\" media=\"(prefers-color-scheme: dark)\">\n <img src=\"/assets/docs/light/{filename}\" alt=\"{alt_text} demo\"{dim_attrs}>\n</picture>\n</figure>"
);
let end = after_prefix + end_offset + SUFFIX.len();
result.replace_range(start..end, &replacement);
diff --git a/tests/snapshots/integration__integration_tests__help__help_page_merge.snap b/tests/snapshots/integration__integration_tests__help__help_page_merge.snap
index f4b19983c..c1e8175e6 100644
--- a/tests/snapshots/integration__integration_tests__help__help_page_merge.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_page_merge.snap
@@ -20,8 +20,8 @@ exit_code: 0
<figure class="demo">
<picture>
- <source srcset="/assets/wt-merge-dark.gif" media="(prefers-color-scheme: dark)">
- <img src="/assets/wt-merge.gif" alt="wt merge demo" width="1600" height="900">
+ <source srcset="/assets/docs/dark/wt-merge.gif" media="(prefers-color-scheme: dark)">
+ <img src="/assets/docs/light/wt-merge.gif" alt="wt merge demo" width="1600" height="900">
</picture>
</figure>