Demoshell's guide needs Bash to report command exit status before it can
verify successful steps. Put the command-tracker prompt and OSC 133 exit
markers in the startup rcfile, skipping the initial prompt so Studio
does not mistake it for the app exiting. Keep the recipe and published
guide representation aligned with the working demo.
Shorten the Try it page to the introduction, loading note, full-page
fallback, attribution, and install link. This follows
[#4280](https://github.com/max-sixty/worktrunk/pull/4280).
Validation: ARM64 Alpine recipe and guide walkthrough; startup,
failed-command, and successful-command marker checks; published demo
walkthrough; docs sync test and build; rendered copy review.
The full local gate ran 5,392 tests: 5,389 passed and three PowerShell
tests failed because the installed PowerShell 7.5.2 crashes with `Stack
overflow.` even on `pwsh -NoProfile -Command '1 + 1'` outside the
repository. Pre-commit checks pass separately.
> _This was written by Codex on behalf of max-sixty_
Adds a **Try it** page at `/try-it/`, available by direct URL while
production embedding is tested; excluded from navigation, site search,
and the sitemap, with a noindex directive, with a live Worktrunk demo in
a browser-local Alpine ARM64 VM via [Demoshell](https://demoshell.com).
Nothing downloads until Run is pressed. The page includes Demoshell
attribution and a permanent full-page fallback link.
The VM definition lives in `docs/demos/demoshell/`: the setup recipe,
Bash startup rcfile, and guide. The guide covers list → create → edit →
list → merge, followed by an optional manual picker step. Merge commits
the change automatically. Studio must launch Bash explicitly: changing
root's login shell does not replace its running ash session. The prompt
retains the `arm64js:` prefix required by Demoshell's command tracker.
The README maps each file to its Studio field and provides an ARM64
Alpine Docker check using the same Bash entry point.
**Production test rollout:** `m/tui:worktrunk` resolves from the allowed
`worktrunk.dev` origin. The recipe, startup file, and guide draft are
entered in Studio, but the final snapshot upload is stalled at 1% after
setup completes. The currently published snapshot predates the prompt
repair, and visitors still receive the old guide. The page is
intentionally unlinked so it can be merged and tested on the accepted
production origin before broader exposure. The corrected snapshot must
finish saving, then the new guide must be published and tested in a
fresh visitor session.
Validation: the required command patterns and output checks pass on
ARM64 Alpine with `wt v0.81.0`. In the real Studio preview, applying the
Bash/prompt corrections allowed the required steps to check off, merge
to commit automatically, and the shell to return to main. The optional
picker opens and exits; its guide step uses manual completion because
Demoshell did not detect the alternate-screen exit. Local docs build,
type checks, plugin/site tests, and docs sync passed. Final snapshot
publication and a fresh end-to-end run remain blocked by the upload.
The sidebar-order test accepts Astro page routes, and the page-outline
test exempts `/try-it/`, whose table of contents is disabled to give the
demo more width.
Disclosure from the original author: they run Demoshell. Hosting is free
for eligible open-source projects, and the embed carries attribution.
> _This was written by Codex on behalf of max-sixty_
---------
Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Maximilian Roos <m@maxroos.com>
`docs/demos/build` recorded the wrong output whenever it took its
parallel path, which it does for any run with more than one non-TUI demo
unless `--sequential` is passed. #4178 added a positional `target`
parameter to `record_demo`, but only the sequential call site was
updated. The `executor.submit(...)` call still passed `args.text` and
`args.snapshot` in the old positions, so:
- `./build docs --snapshot` wrote `.txt` text output instead of updating
`docs/demos/snapshots/*.snap`, because `snapshot_mode` was always
`False`.
- `./build docs --text` recorded GIFs.
- A plain GIF run passed `target=False` to checkpoint validation.
The parallel call now passes `target`. Both call sites pass `text_mode=`
and `snapshot_mode=` by keyword, so the next positional parameter can't
shift them.
There's no regression test: the script drives VHS and has no test
harness in this repo. The sequential call site, which already passed
`target`, shows the intended argument order. I checked the edit by
parsing the script; it hasn't been run end to end.
Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
Claude Code reads the existing AGENTS.md files directly, so remove the
nine one-line CLAUDE.md imports that duplicate them.
> _This was written by Codex on behalf of max-sixty_
The repository guidance had grown into long implementation histories,
especially in the plugin instructions surfaced by #4241. This trims the
nine guidance files from 2,769 lines to 380, keeping active contracts
and fragile workflows while moving enduring cache semantics into the
owning module docstring and updating trace and feature-spec references.
This follows #4245, which moved the guidance into `AGENTS.md`. The nine
`CLAUDE.md` forwarding files remain in place.
Verified with the plugin-layout and documentation-sync integration
tests, `pre-commit`, JSON parsing for the updated feature
specifications, and `git diff --check`.
> _This was written by Codex on behalf of max-sixty_
Make `AGENTS.md` the canonical project instructions in nine directories.
Each directory also has a one-line `CLAUDE.md` importing its adjacent
`AGENTS.md`, so Claude Code loads the instructions even on accounts
where native `AGENTS.md` support is gated off. The root `AGENTS.md`
replaces the old symlink; ordinary files work on Windows checkouts
without symlink support. References in source comments, CI, Clawpatch
metadata, maintainer skills, and the demo fixture point to the canonical
paths.
I verified Claude Code's `@` import in a live isolated probe with tools
disabled: a `CLAUDE.md` import loaded a marker found only in the
imported file. The wrappers keep the existing Claude Code
instruction-loading path while Codex reads `AGENTS.md` directly.
Verified: `test_docs_are_in_sync`, `test_plugin_layout_is_consolidated`,
`test_no_host_specific_paths_in_snapshots`, the docs production build,
20 built-site tests, Python compilation of the demo helper, JSON parsing
of the feature metadata, and `git diff --check`.
> _This was written by Codex on behalf of max-sixty_
The interactive picker had no demo, and the two things that sell it
don't survive a still image: rows painting from local git before any
network call, and a preview pane you page through without leaving the
list. Making that recordable meant giving the demo environment a forge
that answers on a schedule, which is what most of this diff is.
## The mocked forge
`docs/demos/shared/fixtures/gh-mock.sh` answers every `gh` call from a
file that `write_gh_mock_data` writes once the branches exist — first
line a delay, the rest a JSON body. The per-branch delays are the point:
wt runs one `gh pr list` per branch concurrently, so staggered replies
land the CI cells one at a time behind a frame that already painted.
`fixtures/llm-mock.sh` does the same for the Summary column, picking a
sentence from the paths in each branch's diff.
Three things have to hold or the CI column silently empties rather than
failing, and `docs/demos/CLAUDE.md` now records all three: a parseable
origin (set via `url.<bare>.pushInsteadOf`, so `git remote get-url`
still hands wt the URL while pushes go to the local bare repo), `gh
--version` and `gh auth status` both exiting 0, and `DEMO_PROJECT_ID`
matching the URL.
## The recordings
`wt-switch-picker` is the full tour, and it is the one demo that records
at its own size — `SIZE_DOCS_PICKER`, the same 1600x900 canvas in
smaller text, giving 139x34 instead of 102x25. At the usual size the CI
and Summary columns fall off the right edge and the preview is too short
to page a diff. It runs against sixteen worktrees with varied CI, a
ten-comment PR thread, and a working tree dirty in several different
ways.
`wt-zellij-omnibus` opens on the picker rather than passing through it:
`alt-p` widens the rows, the CI cells land behind them, `ctrl-d` pages a
diff, then Enter selects. That beat is the picker's showing on the
homepage, which stays at two demos.
## Bugs this turned up
**`wt merge` on a dirty worktree described the wrong changes.**
`build_squash_prompt` diffed `merge_base..HEAD`, but the squash commits
the index — `handle_squash` stages the working tree before generating
the message and soft-resets afterwards. So the generated message covered
the branch's older commits and said nothing about the work just staged
into the same commit, which on a dirty `wt merge` is the whole reason it
ran. It now diffs `merge_base` against the index, matching the stats
`handle_squash` prints for that same commit. With nothing staged the two
spans are identical, so there is no second path.
**`wt step squash --dry-run` previewed a different prompt than it would
send.** `wt step commit --dry-run` stages into a temp index so its
preview spans what a real run would commit, while `--show-prompt`
deliberately shows only what is already staged. Making the squash prompt
read the index broke that parity for squash — its `--dry-run` showed
neither. It now mirrors `--stage` the same way, with the flag plumbed
through from the CLI. The task line in the default squash template moved
with it: "the combined effect of these commits" pointed at the one block
that doesn't carry the staged work, and now names `<diff>` as what the
squash records and `<commits>` as what it folds in.
**The picker preview dropped a character.** The pane rendered one column
wider than skim paints, so a wrapped line breaking flush against the
right edge lost its last character — "when" as "whe", mid-sentence, with
nothing that reads as clipping. Reproduced outside VHS in a pyte PTY at
139 columns before the fix and again after; `PREVIEW_RESERVED_COLS`
documents where the column goes.
## VHS fork
Three commits on `max-sixty/vhs` `keypress-overlay`, all pushed: pass
`macOptionIsMeta` so `Alt+<key>` reaches the program at all rather than
typing a bare letter into the query; time the keystroke overlay by
recorded frames instead of the wall clock, which removed a 640ms lag and
the fixed fudge that was hiding it; and record a modified key as one
keystroke, so `Alt+"8"` draws a highlighted `⌥8` rather than a greyed
`⌥` and an unrelated `8`. `_VHS_FORK_MARKER` names the newest of them,
because a clone that predates one records a wrong GIF and reports
nothing.
## Checks
All five affected recordings re-recorded and OCR-validated, and
published to `worktrunk-assets`. New tests:
`test_squash_prompt_covers_what_its_run_would_commit` covers both
preview paths — `--show-prompt` on the real index, `--dry-run` on the
mirrored one.
`test_preview_width_stops_short_of_the_column_skim_leaves_unpainted`
covers 80/120/139/200.
> _This was written by Claude Code on behalf of max-sixty_
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The demo recorder kept its own copies of the docs site's colors, and
they had drifted from `docs/src/styles/custom.css`:
- The VHS terminal's ANSI colors were still the Zola site's palette,
which #3866 deleted and #3936 replaced with `--wt-terminal-*`. Light
yellow had 2.65:1 contrast against the page background; the site's
browser test requires 4.5:1 for its own dim terminal text.
- `brightWhite`, the background of Worktrunk's gutter, used the ink
color, so dark GIFs drew the gutter as a near-white bar.
- Zellij, the starship prompt, and Claude Code were configured for light
in both themes, so dark GIFs showed a light Zellij tab bar and Claude
Code's light theme.
`docs/demos/shared/themes.py` now reads the hex `--wt-*` properties from
`custom.css` when the build runs. The VHS theme maps ANSI colors the way
the site renders snapshot output (`terminal_color_class` and
`terminal_background_class` in
`tests/integration_tests/readme_sync.rs`). `DemoEnv` carries the
recording's theme, so Zellij, the starship palette, and Claude Code
follow it. This replaces the `(pre-Starlight; site is #…)` comments the
PR first added.
Recording from inside a Claude Code session also leaked into the Claude
demos. The demo's Claude Code inherited that session's `CLAUDE*`
variables and warned that transcript saving was off, and it started
Remote Control, which printed a live claude.ai session URL into the GIF.
The recorder now drops inherited `CLAUDE*` variables except
`CLAUDE_CODE_OAUTH_TOKEN`, and the demo's `settings.json` sets
`remoteControlAtStartup` to false.
The GIFs are re-recorded locally (`./docs/demos/build docs` and
`./docs/demos/build social`) and published in
max-sixty/worktrunk-assets@bb3bfba.
## Verification
- `pytest docs/demos/tests`: 4 passed.
- OCR of every 20th frame of the Claude demos (354 frames) finds no
`remote-control`, `claude.ai/code`, `rc active`, or `Transcript saving`.
The same check matches on frames from the leaking recording.
- Frames checked by eye in both themes for the ANSI colors, the gutter,
and the Zellij chrome.
- TUI validation passes for all nine Claude demo GIFs. The `wt-switch`
and `wt-statusline` checkpoints named absolute frames past the end of
these faster recordings (274–318 frames, against 344–465 in the
previously published GIFs), so a negative checkpoint frame now counts
back from the last frame; the omnibus checkpoint on its closing `wt
list` uses the same anchoring. The previously published GIFs pass the
new checkpoints too. Those checkpoints also forbid `claude.ai/code` and
`Transcript saving`, and a GIF made from a leaking frame fails on them.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01TQPDxs2csvGFGBr2j4MtrA
> _This was written by Claude Code on behalf of max-sixty_
---------
Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
Co-authored-by: Maximilian Roos <m@maxroos.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two references in `docs/demos/CLAUDE.md` point at files and directories
that do not exist, so anyone following them to change a demo's colors or
find a recorded GIF lands nowhere.
- The **Light/dark theme variants** section lists the outputs as
`docs/light/wt-core.gif` and friends. The build writes them to
`docs/public/assets/<target>/<theme>/<name>.gif` (`OUT_DIR` in
`docs/demos/build`), which is exactly what the directory-structure block
at the top of the same file already says — the two sections contradicted
each other.
- The same section points at `_variables.html` as the palette source.
That file was removed in #3866 when the site moved to Astro and
Starlight; the `--wt-*` custom properties now live in
`docs/src/styles/custom.css`, which is also what
`docs/demos/shared/themes.py` names in its own docstring.
Documentation-only, so there is no regression test to add; the claims
are verified against `docs/demos/build` and against the file's own
structure block.
Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
The demo recorder inherited `NO_COLOR` from its caller, which made
generated `wt list` tables monochrome. GIF recording now clears
`NO_COLOR` and sets `CLICOLOR_FORCE=1` at the shared VHS boundary.
OCR validation now adds a theme-aware high-contrast fallback for dim
terminal text, preserving the stable `Opus` and worktree assertions
without relying on task text that can reflow. Enhanced OCR is also
checked for forbidden error text.
Testing: `cargo run -- hook pre-merge --yes`; re-recorded `wt-list`,
`wt-core`, `wt-merge`, and `wt-zellij-omnibus` in both docs themes plus
all three narrower social Claude demos; all nine TUI validation
combinations passed; visually reviewed every dark table scene and the
social recordings.
> _This was written by Codex on behalf of max-sixty_
The docs now build with Astro and Starlight instead of Zola. This
removes the Tera 2 migration blocker from #3827 while keeping the
published routes, anchors, generated references, metadata, and crawler
URLs stable. It replaces the approach closed in #3840.
## What changed
- Move the site into Starlight, with a custom Worktrunk homepage and a
shared copper, gold, paper, and ink design system.
- Keep generated docs as portable Markdown. The Rust sync pipeline no
longer needs Zola shortcodes, template escaping, ANSI-to-HTML
conversion, or reverse transforms for skill and README output.
- Preserve terminal semantics and command-only copying, add responsive
handling for short wide tables, retain stable heading IDs, and give
repeated command-reference headings useful search labels.
- Move docs CI and publishing to Node, Astro, and built-site contract
tests. The tests cover public routes, links, assets, metadata,
navigation, tables, terminal frames, and compatibility aliases.
- Record demo themes from isolated environments, add a mobile core demo,
and test the recording contract. The matching mobile assets are
published in `max-sixty/worktrunk-assets`.
Closes#3827.
## Verification
- `cargo run -- hook pre-merge --yes` (4,660 tests)
- `npm --prefix docs run check`
- `npm --prefix docs test` (9 tests)
- `npm --prefix docs run build` (16 pages)
- `npm --prefix docs run test:site` (12 tests)
- `pytest docs/demos/tests/test_recording.py` (4 tests)
> _This was written by Codex on behalf of max-sixty_
Each demo theme now records from a fresh repository and home, so the
light pass cannot change the dark pass's starting state. Claude demos
can reuse the current macOS Keychain login without copying credentials,
while every recorder mode keeps Claude configuration under the
disposable home.
The recorder validates each generated theme and checks Claude scenes for
login failures, promotions, temporary paths, and mismatched merge
output. The tapes also avoid the marketplace setup race and hide
disposable demo output.
Testing: `cargo run -- hook pre-merge --yes`; regenerated and visually
reviewed all eight dark documentation GIFs and the three Claude light
variants.
> _This was written by Codex on behalf of max-sixty_
The CI column in `wt list --full` (and the statusline) previously showed
a single colored dot. It now shows the branch's open PR/MR reference —
`#3035` on GitHub/Gitea/Azure DevOps, `!3035` on GitLab — colored by CI
status, dimmed when stale, and hyperlinked to the PR. When no number is
available (branch workflows without a PR/MR, pre-number cache entries,
or a number wider than the allocated column), the cell shows a bare `#`
in the same colors. Fetch errors always render `⚠`, even when a number
is known — Error and Conflicts share yellow, so a yellow `#3035` would
read as a conflicted PR.
The branch merges main's review-state feature (#3044): review colors
(magenta/cyan) and draft dimming apply to the number cells exactly as
they did to the dot, and the `--help` legend shows colored `#` samples
for all seven states (the interim version had dropped the colored
samples from the legend entirely).
## The width problem
`wt list` renders skeleton-first: column widths are fixed before any CI
data arrives, and the table never resizes mid-render. The PR number's
width therefore has to be known up front. The solution is a repo-level
ratchet cache (`.git/wt/cache/pr-number/max.json`) holding the largest
PR number any fetch has seen — PR numbers are monotonic per repo, so the
value needs no invalidation. Pre-skeleton, `collect` reads that one file
and sizes the column exactly; on a cold cache the estimate is 5 chars
(`#9999`). A number that outgrows the estimate renders as the bare `#`
for that run and sizes correctly on the next run once the ratchet
records it. The ratchet is deliberately separate from the per-branch
`ci-status/` entries so the width hint isn't coupled to branch-entry
retention, and `detect` re-ratchets on cache hits too, so a deleted or
racily regressed `max.json` heals from locally cached numbers instead of
waiting out the TTL.
## Reviewer's map
- `src/commands/list/ci_status/mod.rs` — `PrRef` (number + forge sigil,
`PrRef::pr`/`PrRef::mr` constructors), `PrStatus.number` (serde-default
so pre-existing cache entries still deserialize, rendering `#` until
their 30–60s TTL expires), `format_cell` width-aware renderer with the
Error guard, ratchet in `detect` (both cache-hit and fetch paths)
- `src/commands/list/ci_status/cache.rs` — `MaxPrNumber` ratchet
(read/ratchet/clear)
- `src/commands/list/ci_status/{github,gitlab,gitea,azure}.rs` — each
fetcher populates the number (`gh --json number`, `iid`, Gitea `number`,
`pullRequestId`); GitLab's mr-view-failure path carries the
iid/URL/review state into the error status so the `⚠` stays clickable
- `src/commands/list/layout.rs`, `collect/mod.rs` — width estimate
threading
- `src/commands/list/render.rs`, `model/item.rs` — table cell and
statusline both go through `format_cell`
- `src/commands/list/json_output.rs` — `ci.number` field
- `src/commands/config/state.rs` — ratchet shown by `state get`/`cache
get` (table + JSON) and swept with the CI cache category, including the
deprecated `ci-status clear --all` path
- `src/md_help.rs`, `src/help.rs` — legend colorization rules rewritten
from `●` to `#` (terminal + website)
Most of the diff is snapshot churn from the column width and glyph
changes plus regenerated docs mirrors.
Known trade-offs: concurrent statusline ratchet writes can transiently
lose an update (monotonic, re-learns on the next render, documented at
the write site); one anomalously high PR number widens the column until
`wt config state cache clear`; an open Azure DevOps PR still shows gray
`NoCI` instead of its pipeline status — a pre-existing gap, now marked
`TODO(azure-pr-pipeline)`.
Testing: unit tests for `format_cell` (including the Error-with-number
and oversized-number link cases)/`pr_ref_width`/ratchet/width estimates;
integration coverage for all four forges with real numbers (the Gitea
mocks now exercise the number path too), review-state × number
composition, the GitLab mr-view-failure `⚠` and branch-pipeline success
paths, cache-TTL expiry → refetch, the statusline number view, and the
`wt config state` surfaces.
> _This was written by Claude Code on behalf of max_
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Follow-up to #2979. The shared demo tape set `Env CLAUDECODE ""` so that
a `claude` invoked while recording would not be rejected as a nested
session. Claude Code no longer blocks nested `claude -p`, and #2979
dropped the matching workaround in commit generation, so the override is
unneeded. It is not part of the recorded output, so the GIFs are
unchanged; no re-record.
> _This was written by Claude Code on behalf of max_
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per @max-sixty's [direction in
#2838](https://github.com/max-sixty/worktrunk/issues/2838#issuecomment-4509447593):
revert the docs portion of #2840 and keep the code. Docs continue to
recommend `pre-start`/`post-start`; both names work in code so anyone
who already followed the briefly-changed docs (e.g. @EcksDy) isn't
stranded once a release ships these aliases.
## User-visible — back to `pre-start`/`post-start`
- README, docs site, skill mirrors, `dev/*.example.toml`,
`plugins/worktrunk/README.md`, `flake.nix`, `.config/wt.toml`
- `src/cli/mod.rs` / `src/cli/config.rs` / `src/cli/step.rs` /
`src/help.rs` after_long_help and example snippets — and the auto-synced
`docs/content/` and `skills/worktrunk/reference/` mirrors
- `wt hook --help` canonical subcommand names; completion advertises
`-start` only
- `HookType` Display via strum, serde `rename`, and clap `ValueEnum`
name — all `pre-start`/`post-start`. The Rust variant identifiers stay
`PreCreate`/`PostCreate` (internal; we already paid for that rename in
#2840, and now the eventual flip is a Display-only change)
- `HooksConfig` serde canonical fields
## `*-create` still works (kept code)
- `wt hook pre-create` / `post-create` — CLI alias on the canonical
subcommand
- `pre-create` / `post-create` in config: top-level, `[hooks.*]`, and
per-project, in string, `[table]`, and `[[array-of-tables]]` form.
Mechanism: serde `alias = ...` on the field, plus a silent in-memory
rename in `migrate_content()` so the round-trip in `unknown_tree`
doesn't flag table forms as schema-unknown.
- The pre-0.32.0 `post-create` fatal-load-error machinery stays removed
— the name is reclaimed, and both forms load without error.
## Smaller bits
- `valid_user_config_keys()` / `valid_project_config_keys()` append
`pre-create` / `post-create` so the unknown-field round-trip skips them.
`test_valid_*_keys_all_deserialize` skips both aliases (they can't sit
alongside the canonical without a duplicate-field error).
- `DEPRECATED_SECTION_KEYS` drops the `pre-start`/`post-start` entries
#2840 added — `pre-start`/`post-start` are canonical again.
- `find_pre_start_from_doc` / `find_post_start_from_doc` /
`find_renamed_hook_key` / `is_non_empty_item` /
`migrate_start_hooks_doc` and their tests are removed; the migration
direction flips via a new `migrate_create_hooks_doc` (silent, mirrors
the prior shape).
- Test files `e2e_shell_post_create.rs` and `post_create_commands.rs`
rename back to `_post_start_` (via `git mv`, so the rename shows as a
rename).
## Testing
`cargo run -- hook pre-merge --yes` — 3806 tests pass; the 10 failures
are all `case_4` of `shell_wrapper::unix_tests::*` (nu-shell case; `nu`
isn't installed in this runner; same failures occur on `main`).
Also manually verified that a fresh `wt switch --create` against a
project config with `[post-create]` loads cleanly with no unknown-field
warning and the hook fires as `post-start`.
## Follow-up
Per @max-sixty: in a couple of weeks, once a release with
both-names-work is out and users have had a chance to upgrade, the docs
flip is straightforward (most of it is in `src/cli/mod.rs`'s
`after_long_help` and the doc-sync test propagates).
Re #2838.
Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Phase 1 of the staged hook rename tracked in #2838: the worktree-creation hooks `pre-start`/`post-start` become `pre-create`/`post-create`. The old names keep working with no deprecation warning yet (Phase 2, months out, adds the warning).
## What changes
- `pre-create`/`post-create` are canonical everywhere: the `HookType` enum, the `HooksConfig` serde fields, the `wt hook` CLI, completion, and all docs.
- Old names keep working: `migrate_content()` rewrites `pre-start`/`post-start` config keys to `-create` before serde, and `parse_hook_type` accepts the old CLI names as silent aliases. `wt config update` rewrites them on disk; `wt config show` shows the migration diff. `wt hook <type>` execution and `wt hook show` both accept the old names; completion and `--help` advertise only the canonical names.
- `detect_deprecations()` flags the old keys so `update`/`show` act on them, but `format_deprecation_warnings()` stays silent (Phase 2 adds the warning). A new empty-warnings guard in `check_and_migrate` keeps a `-start`-only config from emitting a stray hint.
- The dead pre-0.32.0 `post-create` machinery is removed: the fatal `POST_CREATE_REMOVED_MSG` load error, the vestigial `HooksConfig.post_create` merge-fold, and `find_post_create_from_doc`. `post-create` is reclaimed as the canonical background creation hook.
## Semantic flip
Before v0.32.0, the key `post-create` named a *blocking* hook. It now names the *background* one.
Since v0.44.0, a pre-0.32.0 `post-create` config is a fatal load error on the `check_and_migrate` paths: `ProjectConfig::load` and user/system config loading, which fire on essentially every `wt` command. A repo carrying one has been unusable ever since. The one path that skips that check is `project_config_at_ref` (the base-ref read behind `wt switch --create`), which applies only structural migration. A pre-0.32.0 `post-create` surviving solely on a base ref, never checked out into a worktree, would now load as a background hook rather than folding into the blocking `pre-start`. That edge case is accepted: once `post-create` is valid again, reclaiming the name and detecting the dead key are mutually exclusive.
## Reviewing this diff
205 files, but the substance is ~36 files under `src/`. The rest is regenerated snapshots and auto-synced doc mirrors. Start with:
- `src/config/deprecation.rs` — detection (`find_renamed_hook_key`), migration (`rename_hook_key`), removal of the fatal block, the empty-warnings guard, and the `DEPRECATED_SECTION_KEYS` entries that stop unknown-field detection from flagging the migrated keys.
- `src/config/hooks.rs`, `src/git/mod.rs` — the serde field and enum renames.
- `src/config/project.rs` — `ProjectConfig::load` deserializes `check_and_migrate`'s migrated content, so a current-worktree config using the old keys loads into the canonical fields.
- `src/cli/hook.rs`, `src/commands/hook_commands.rs`, `src/completion.rs`, `src/main.rs` — the CLI alias layer; `wt hook show` accepts the old type names as hidden value-parser aliases.
- `src/cli/mod.rs` — the `wt hook` docs, including the soft-deprecation note linking #2838.
The ~93 modified snapshots also pick up deterministic env-block lines (`GIT_*: ""`, `LLVM_PROFILE_FILE`) that pre-existing snapshots already carry. That is stale-snapshot drift surfaced by the regeneration, not a behavior change.
## Testing
Full suite green (3799 tests). New coverage: `snapshot_migrate_start_to_create` (migration preserves value shape and position), `test_deprecated_start_hook_key_runs_silently` and `test_standalone_hook_start_alias_runs_silently` (old config and CLI names run with no warning), `test_config_show_displays_start_hook_migration` (`config show` reveals the diff without an "unknown field" warning), and `test_hook_show_accepts_deprecated_start_hooks` (a current-worktree config using the old keys loads, and `wt hook show` takes both the canonical and the deprecated type arguments).
Part of #2838.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Single ffmpeg call per checkpoint instead of ~20 separate calls. Builds
a `select` filter expression for the full frame range and extracts all
sampled frames in one pass with `-vsync vfr`. OCR still short-circuits
on first match.
> _This was written by Claude Code on behalf of maximilian_
Co-authored-by: Claude <noreply@anthropic.com>
OCR validation checked a single exact frame number, which broke whenever
Claude Code's UI shifted timing slightly. Now uses a `Checkpoint`
dataclass with frame ranges — scans every 10th frame across a ~200-frame
window and passes if any frame matches. Resilient to normal timing
shifts without losing validation rigor.
Build script now automatically runs TUI demos sequentially (Zellij
conflicts when parallel were the root cause of previous failures), while
non-TUI demos continue running in parallel. Adds per-demo and per-target
timing summaries.
> _This was written by Claude Code on behalf of maximilian_
Co-authored-by: Claude <noreply@anthropic.com>
Three improvements to demo GIF recordings:
- **Fish syntax highlighting** — commands render in amber matching the
website's `.cmd` accent. Params/args use the default foreground.
Starship prompt uses craft-brown (`#8b7355`) to differentiate from
commands. Two delivery mechanisms: `fish_variables` for
`--shell`/`--snapshot` mode, `colors.fish` sourced in VHS hidden section
(VHS applies `Env HOME` after fish starts).
- **Delta diff viewer** — `GIT_PAGER` set per-theme (`delta
--paging=never --light` for light, `delta --paging=never` for dark).
Empty for text/snapshot recordings.
- **Light theme aligned to website** — terminal colors updated to match
`_variables.html`. Cyan and green desaturated to avoid garish bold
rendering.
Also: build script accepts multiple targets (`./build docs social`),
kills stale Zellij processes before recording, and requires delta only
for GIF mode.
> _This was written by Claude Code on behalf of maximilian_
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Add early `check_ffmpeg_libass()` at demo build startup — exits with
install
instructions when ffmpeg lacks libass (required for keystroke overlay
ASS
subtitles)
- Add output verification in `record_vhs()` — catches silent failures
where VHS
exits 0 but produces no GIF
- Document the Homebrew API-bottle vs tap-formula issue in demos
CLAUDE.md
Homebrew's API-sourced formula strips `libass`; the tap formula includes
it.
The fix is `HOMEBREW_NO_INSTALL_FROM_API=1 brew install
--build-from-source ffmpeg`.
## Test plan
- [x] Verified `check_ffmpeg_libass()` passes with correct ffmpeg
- [x] Verified full demo build succeeds with `--only wt-switch-picker`
- [x] Lints pass (`pre-commit run --all-files`)
> _This was written by Claude Code on behalf of @max-sixty_
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Add `IS_DEMO=1` to `shared-commands.tape` so all demo recordings hide
email/org from the Claude Code UI
## Test plan
- [ ] Rebuild a demo that launches Claude Code (e.g., `wt-switch`) and
verify no account info in header
> _This was written by Claude Code on behalf of @max-sixty_
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Remove stale "Approved hook commands" subsection from config docs —
approvals moved to `approvals.toml` and no longer belong in the user
config section
- Fix version regex filters in test infra that failed to handle `-dirty`
suffix on bare hash versions (when `git describe` has no reachable
tags), making snapshots non-deterministic
- Add `commands.jsonl` documentation to `wt config state logs` help text
- Add "Documentation accuracy" checklist to PR review skill
- Remove deleted `test_clone_bare_repo_list_no_status_errors` (covered
by #1112's `BareRepoTest`)
- Minor cleanup: remove "select" from CLAUDE.md command list, remove
stale pre-release-replacements, update skill version marker
## Test plan
- [x] All 1084 tests pass locally
- [x] Pre-commit lints pass
- [x] Snapshot tests reviewed — version snap now shows `wt [VERSION]`
(not `wt [VERSION]-dirty`), config help snaps reflect removed approvals
section
- [x] Doc sync test passes
(`test_command_pages_and_skill_files_are_in_sync`)
> _This was written by Claude Code on behalf of @max-sixty_
---------
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Remove the omnibus-specific LLM mock override from `build`
- Use the shared mock from `lib.py` for all demos (same commit message,
same summary branches)
- Net -27 lines
## Test plan
- [ ] `./docs/demos/build docs --only wt-zellij-omnibus --text` builds
without error
> _This was written by Claude Code on behalf of @max-sixty_
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- LLM mock handles both commit messages and summary generation via stdin
branching
- `_write_user_config` defaults to `commit_generation=True` and always
writes `[list] summary = true`
- All demos showing `wt list --full` (wt-core, wt-list,
wt-zellij-omnibus) now display the Summary column
## Test plan
- [ ] `./docs/demos/build docs --only wt-list` — verify Summary column
in `wt list --full`
- [ ] `./docs/demos/build docs --only wt-core` — same
- [ ] Demos without `wt list --full` unaffected (extra config is
harmless)
> _This was written by Claude Code on behalf of @max-sixty_
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Replace `Ctrl+t`/`Ctrl+n` with Zellij session manager sequences
(`Ctrl+Space` → `tn`/`on`) to avoid Claude Code TUI intercepting
keystrokes
- Remove initial `wt list` — demo now starts directly with the
interactive picker
- Increase marketplace install sleep (5s → 10s) for reliability
- Suppress LSP plugin recommendation dialog via
`lspRecommendationDisabled`
- Update OCR validation checkpoints for new frame timing
## Test plan
- [x] Demo builds successfully (`./docs/demos/build docs --only
wt-zellij-omnibus`)
- [x] OCR validation passes (both frame checkpoints)
- [x] Visual review of key frames confirms no errors
> _This was written by Claude Code on behalf of @max-sixty_
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
- Add interactive picker and copy build caches to home page "Workflow
automation" section
- Update omnibus demo to showcase the picker (TAB 4 uses `wt switch`
with no args, filters to "au", selects auth)
- Fix demo infrastructure: `CLAUDECODE=""` for nested sessions, model →
Opus 4.6, approvals.toml migration, comprehensive tip suppression
## Test plan
- [x] Demo builds and validates (`./docs/demos/build docs --only
wt-zellij-omnibus`)
- [x] Assets published to worktrunk-assets repo
- [x] Doc sync test passes
- [ ] CI green
> _This was written by Claude Code on behalf of @max-sixty_
---------
Co-authored-by: Claude <noreply@anthropic.com>
The `wt select` command was moved to `wt switch` (with `wt select`
kept as a deprecated alias). The demo tape content already uses
`wt switch`, but all naming — tape filename, output name, GIF
filenames, doc references — still said wt-select. This aligns
naming with the current command structure.
Co-authored-by: Claude <noreply@anthropic.com>
* feat(switch): integrate interactive picker into `wt switch` (#890)
`wt switch` without arguments now opens the interactive picker (previously
`wt select`). This simplifies the mental model: one command for all switching.
- `wt switch` → opens interactive picker (Unix) or shows error (Windows)
- `wt switch --branches/--remotes` → customizes picker
- `wt select` → deprecated hidden alias with warning
Removes the separate `wt select` docs page since the functionality is now
documented under `wt switch`. The `[select]` config section is preserved
for backward compatibility with a TODO to rename once migration is confirmed.
Closes#890
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(test): make switch TTY test Unix-only
The test expects the Unix error message ("Interactive picker requires
an interactive terminal") but Windows shows a different message
("Interactive picker is not available on Windows").
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: trigger CI
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(switch): require branch when using --create, --base, --execute, or --clobber
These flags only make sense when switching to a specific branch, not when
opening the interactive picker. Previously, running `wt switch --create`
would silently ignore the flag and open the picker instead.
Now clap properly enforces that these flags require a branch argument:
$ wt switch --create
error: the following required arguments were not provided:
<BRANCH>
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(test): update snapshot for interactive picker error message
The snapshot was stale after integrating `wt select` into `wt switch`.
Now `wt switch` without args shows the picker error, not clap's missing
argument message.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(switch): move interactive picker section after shortcuts
The picker is a navigation method (like shortcuts), not an afterthought.
New order: Shortcuts → Interactive picker → GitHub/GitLab PRs → Troubleshooting
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(test): update help snapshot after doc reorg
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(output): unify background hook output into single line
Combine contiguous post-switch and post-start hooks into a single
output line when both are present (common in `wt switch --create`).
Old format (2 lines):
Running post-switch hooks @ ~/repo.feature: user:foo
Running post-start hooks @ ~/repo.feature: project:bar
New format (1 line):
Running post-switch: user:foo; post-start: project:bar @ ~/repo.feature
Changes:
- Rename spawn_hook_commands_background → spawn_background_hooks
- Add prepare_background_hooks() to collect hooks before spawning
- Add group_commands_by_hook_type() to group commands by type
- Update handle_switch.rs to batch hooks from both types
- Remove unused spawn_post_start_commands/spawn_post_switch_commands
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: address review feedback
- Update doc comments in global.rs to use new API functions
- Update demo snapshot to use new output format
- Make prepare_background_hooks pub(crate) (internal only)
Co-Authored-By: Claude <noreply@anthropic.com>
* test: add coverage for multiple unnamed hooks of same type
Add test_user_and_project_unnamed_post_start to exercise the unnamed
index tracking code when both user and project have unnamed hooks for
the same hook type (post-start).
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add OCR-based validation for TUI demos
TUI demos (Zellij, interactive UIs) can't be validated via text snapshots because
VHS only captures the outer terminal, not content inside multiplexers. Instead,
extract key frames from GIFs and use OCR (tesseract) to verify expected patterns.
Add `docs/demos/shared/validation.py` with checkpoint definitions and validation
logic. Update build script to validate TUI demos with defined checkpoints during
snapshot mode, skipping those without checkpoints. Document validation approach
in CLAUDE.md with requirements and checkpoint definitions for wt-zellij-omnibus.
* fix(demos): pre-populate Zellij permissions cache to avoid dialog
The zellij-tab-name plugin shows a permission dialog on first run,
which was appearing in recorded demos. Fix by pre-populating the
permissions.kdl cache file before Zellij starts.
Also simplifies the tape by removing the "y" keypress and clear
that were working around the permission dialog.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(demos): re-enable OCR validation checkpoints, handle permission dialog race
The permission dialog timing is non-deterministic (depends on macOS cache state).
Handle both cases:
- If dialog appears: "y" dismisses it
- If no dialog (cache hit): "y" + Enter + clear cleans up the shell
Re-enables validation checkpoints with calibrated frame numbers:
- Frame 100: wt list output with branch table
- Frame 500: Claude UI with Opus indicator
- Frame 2000: Final wt list --full output
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(statusline): add --format=json and --format=claude-code options
Add `--format=json` to output current worktree as JSON (same structure as
`wt list --format=json` but single-element array).
Migrate `--claude-code` to `--format=claude-code` as the canonical syntax.
The old `--claude-code` flag is hidden for backwards compatibility (no
deprecation warning).
Also fixes nested worktree detection: previously used `starts_with()` prefix
matching which would incorrectly identify the parent worktree. Now uses
`git rev-parse --show-toplevel` via `repo.worktree_at().root()` with path
canonicalization, matching the approach in `wt list`.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(statusline): require current_dir in Claude Code JSON
When parsing Claude Code JSON context, treat missing `.workspace.current_dir`
as invalid input (return None). The caller already falls back to
`env::current_dir()` when no valid context is parsed.
This is cleaner than fabricating a current_dir value - if Claude Code sends
JSON, it should include the required fields.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Add `--snapshot` flag to the demo build script that extracts wt/git
commands from VHS tapes and captures their output for regression testing.
This catches unexpected changes like new hints or warnings appearing
in demos, which would otherwise only be noticed by visually inspecting
GIFs.
Key features:
- Extracts commands from tape files (only after Show directive)
- Runs them in the demo environment and captures stdout/stderr
- Normalizes temp paths to <DEMO_DIR> for stable diffs
- Skips TUI demos (wt-select, wt-switch, etc.) automatically
- Documents expected vs regression-indicating changes
Usage: ./docs/demos/build docs --snapshot
Co-authored-by: Claude <noreply@anthropic.com>
Demo changes:
- Suppress worktree-path hint by pre-marking it as shown in git config
- Fix parallel download race condition with PID-unique temp files
The "To customize worktree locations..." hint was appearing in demos,
adding visual noise. Pre-mark the hint as shown during demo setup.
Also fixes a race condition when multiple demo builds run in parallel -
the Claude binary download could fail if two processes tried to rename
to the same destination simultaneously.
Co-authored-by: Claude <noreply@anthropic.com>
- Update deprecated [commit-generation] config format to [commit.generation]
with single command string (per f8aaead5b)
- Add context window gauge (moon phase 🌕→🌑) to statusline docs
- Add remote-only branch CI status detection note for --remotes flag
- Update demo build script to use new config format
- Sync auto-generated docs and skill references
Co-authored-by: Claude <noreply@anthropic.com>
Require manual publish when asset files are deleted to prevent
accidental removals. Refactor demo build to only copy starship config
for docs target and simplify setup_demo_output usage.
Consolidate 7 shell scripts into a single Taskfile.yml using go-task:
- coverage: run tests with coverage
- setup-web: setup Claude Code web environment
- fetch-assets: download assets from worktrunk-assets
- publish-assets: publish assets to worktrunk-assets
- build-social-cards: generate social card PNGs
- generate-logo: generate logo with Gemini AI
Remove update-homebrew task (now handled by CI workflow).
Update CLAUDE.md files to reference `task X` commands and add
task runner installation instructions for web environments.
Co-authored-by: Claude <noreply@anthropic.com>
- Add copy-ignored and dev server hooks (both as post-start for background execution)
- Use {{ branch | hash_port }} template for dev server port
- Add .env file so copy-ignored has something to demonstrate
- Use -- 'Add settings page' to showcase passing instructions to Claude
- Reduce pre-enter pause from 1s to 500ms for snappier feel
Co-authored-by: Claude <noreply@anthropic.com>
- Move `clear` before `Show` in omnibus tape (was typing "clear" on screen)
- Increase sleep after `clear` from 500ms to 1s in all tapes
- Prevents first frame from showing setup commands/SSH messages
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add pre-remove hook to .config/wt.toml that kills the zola dev server
when a worktree is removed (prevents orphaned processes)
- Add zellij quit command to demo tape after recording stops
- Document the pre-remove cleanup pattern in tips-patterns.md dev server example
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- Move VHS fork from manual setup to automatic build from source
- Download Claude Code binary and Zellij plugin on demand
- Remove hard-coded binary paths and vhs-keystrokes detection
- Simplify demo registration by removing vhs_type parameter
- Update documentation with new dependency management approach
- Requires Go for building VHS fork, automatically validates on first run
The `git diff` command was splitting across panes because the sleep
after `Ctrl+n` (new pane) was too short (600ms). Increased to 1.2s.
Also added GIF review documentation to help catch similar issues.
Co-authored-by: Claude <noreply@anthropic.com>
- Merge wt-select-short.tape into wt-select.tape for single unified demo
- Update docs and build config to use wt-select for both docs and social
- Adjust timing and interactions in unified tape
- Fix wt-zellij-omnibus demo npm dev server backgrounding
Fix the npm dev server command to remove the background ampersand to
match hook configuration, and update URL column snapshots to apply dim
formatting consistently across test outputs.
Remove is_interactive_tape function and simplify hooks config
generation in prepare_with_hooks by using list concatenation instead
of f-string formatting.
- Reformat imports and function arguments for better readability
- Consolidate multi-line imports into organized lists
- Wrap long function signatures and calls
- Normalize string quotes and spacing in configuration files
- Improve code style consistency across build, lib.py, and themes.py
Change bin directory from ~/bin to ~/.local/bin for mock CLIs (npm, llm,
gh, cat) and update PATH references in build script and tape files to
match the standard XDG Base Directory specification.
Document the requirement to set ANTHROPIC_API_KEY environment variable for demos that launch Claude Code, and explain that API credits are consumed during recording.
Remove the trailing `&` from npm dev commands in devserver and
zellij_omnibus demo configurations. The ampersand was causing
processes to run in the background unnecessarily.