Add wt-zellij-omnibus demo to docs build target and update demo
documentation. Fix race condition in background worktree removal by
adding delay before directory deletion to prevent "shell-init: error
retrieving current directory" when shell attempts to read cwd after
process exit. Update Fish shell configuration to disable cursor
blinking for cleaner demo recordings.
- Add wt-zellij-omnibus demo to docs site showing advanced features
(multiple Claude agents, hooks, LLM commits, merge workflow)
- Fix shell-init error after wt remove/merge by adding 1s delay before
background removal, giving shell wrapper time to cd away
- Add cursor blink disable escape sequences to fish config for cleaner
demo recordings
- Simplify dependency check to always require zellij
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Pass repo_root to setup_fish_config and call `wt config shell install`
to properly install the shell extension and completions instead of
sourcing the init output directly in the config file.
Apply Unicode monospace formatting to all command examples and CLI
snippets in the Twitter thread demo to improve readability in tweets
where traditional code formatting is unavailable.
Expand the character count and description for step 13 to better
explain the full lifecycle workflow across parallel Claude Code agents
in Zellij tabs, including the complete sequence of wt commands.
Consolidate 12 specialized demo setup functions into 8 reusable
parameterized functions. Rename functions to describe what they set up
(prepare_basic, prepare_with_hooks, etc.) rather than which demo uses
them. This makes the setup logic clearer and easier to maintain.
Also improve error handling for vhs-keystrokes availability by checking
upfront and exiting with clear error message rather than silently
skipping demos.
Remove unnecessary npm install and build commands from hooks config,
consolidate dev server commands to use hash_port templating, and clean
up wt-core tape by removing config display step and renumbering.
Add omnibus Zellij demo showcasing parallel Claude Code agents workflow.
Move demo from tweet 1 hook position to tweet 13 before CTA for better
pacing. Renumber subsequent tweets accordingly and update design decision
notes to reflect final structure.
Update README and docs to streamline descriptions of Worktrunk's
core functionality. Simplify wording around core commands, hooks,
and feature descriptions to make the documentation more accessible.
Update README and worktrunk.md to improve messaging around core
concepts. Replace "simple" with "as easy as branches" to set proper
expectations, and clarify that git worktrees are a native feature.
Restructure workflow automation section with introductory text to
emphasize the progression from core commands to advanced features.
Update auto-generated content markers to reflect new section heading.
When using `wt list --full`, conflict detection now includes uncommitted
working tree changes, not just committed content. Uses `git stash create`
to get a tree object representing the working tree state, then runs
merge-tree against the default branch.
This helps catch conflicts earlier - before committing changes that would
conflict with main. The check only runs with --full since stash create
adds ~50-100ms per worktree.
Behavior:
- Without --full: conflict symbol based on HEAD vs main (existing behavior)
- With --full: conflict symbol based on working tree vs main (new)
- Falls back to commit-based check if working tree is clean or stash fails
Co-authored-by: Claude <noreply@anthropic.com>
The 1Password browser extension rewrites code blocks with `language-*`
classes, replacing Zola's syntect-generated spans with its own Prism tokens.
This breaks all syntax highlighting colors.
Fix: Add `data-1p-ignore` attribute to code blocks via MutationObserver,
which tells 1Password to skip processing these elements.
Also fix CSS to let syntax highlighting colors apply by removing hardcoded
color from code blocks and using `color: inherit` for `.content pre code`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* Add dev server URL column to `wt list` from project config
Add support for displaying dev server URLs in `wt list` via project
configuration. URLs are computed from templates (e.g.,
`http://localhost:{{ branch | hash_port }}`) and show with health-check
styling: normal if the port is listening, dimmed otherwise.
Key changes:
- New `ProjectListConfig` with `url` template field in `.config/wt.toml`
- URL column in list output, gated by `UrlStatusTask`
- Template expansion deferred to post-skeleton (in task spawning) to
minimize time-to-skeleton
- Port availability checked via TCP connect with 50ms timeout
- JSON output includes `url` and `url_active` fields
- Layout and rendering support for variable-width URL cells
* Implement two-phase URL rendering with health check
Send URL immediately after template expansion so it appears in normal
styling right away. Health check task (port availability) runs in parallel
and dims URL if port not listening. Estimate URL width from template +
longest branch name for accurate pre-skeleton layout allocation.
* Fix URL column allocation when no template configured
When url_width is 0 (no URL template), don't allocate any space for the
URL column. Previously, fit_header(HEADER_URL, 0) would still return 3
(the header width), causing the URL column to appear in select and other
contexts where no URL template is configured.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add test coverage for URL column feature
- Unit tests for estimate_url_width: no template, hash_port, branch
variable, fallback, and static template cases
- Integration tests for JSON output with URL fields
- Integration test for JSON output without URL template (null fields)
- Integration test for {{ branch }} variable in URL template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add test for URL with --branches flag to improve coverage
Covers the URL template expansion path in collect_branch_progressive,
which was not exercised by existing tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add dev server URL workflow to tips-patterns docs
- Add test_tips_dev_server_workflow to generate snapshot showing URL column
- Add "Dev server per worktree" section to tips-patterns.md
- Shows post-start hook + list.url config working together
- Snapshot auto-synced via AUTO-GENERATED-HTML marker
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add dev server URL workflow to tips-patterns docs
- Add test_tips_dev_server_workflow to generate snapshot showing URL column
- Add "Dev server per worktree" section to tips-patterns.md
- Shows post-start hook + list.url config working together
- Snapshot auto-synced via AUTO-GENERATED-HTML marker
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add dev server URL column to `wt list` from project config
Add support for displaying dev server URLs in `wt list` via project
configuration. URLs are computed from templates (e.g.,
`http://localhost:{{ branch | hash_port }}`) and show with health-check
styling: normal if the port is listening, dimmed otherwise.
Key changes:
- New `ProjectListConfig` with `url` template field in `.config/wt.toml`
- URL column in list output, gated by `UrlStatusTask`
- Template expansion deferred to post-skeleton (in task spawning) to
minimize time-to-skeleton
- Port availability checked via TCP connect with 50ms timeout
- JSON output includes `url` and `url_active` fields
- Layout and rendering support for variable-width URL cells
* Implement two-phase URL rendering with health check
Send URL immediately after template expansion so it appears in normal
styling right away. Health check task (port availability) runs in parallel
and dims URL if port not listening. Estimate URL width from template +
longest branch name for accurate pre-skeleton layout allocation.
* Fix URL column allocation when no template configured
When url_width is 0 (no URL template), don't allocate any space for the
URL column. Previously, fit_header(HEADER_URL, 0) would still return 3
(the header width), causing the URL column to appear in select and other
contexts where no URL template is configured.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add test coverage for URL column feature
- Unit tests for estimate_url_width: no template, hash_port, branch
variable, fallback, and static template cases
- Integration tests for JSON output with URL fields
- Integration test for JSON output without URL template (null fields)
- Integration test for {{ branch }} variable in URL template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add test for URL with --branches flag to improve coverage
Covers the URL template expansion path in collect_branch_progressive,
which was not exercised by existing tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Reduce time-to-skeleton by deferring non-essential git operations:
- Add worktrunk.default-branch cache for O(1) default branch lookup
- Batch timestamp fetching in single git command for sorting
- Detect current worktree via path comparison (no git command)
- Defer previous_branch lookup until after skeleton
- Defer effective_integration_target until after skeleton
- Pre-compute is_bare and pass to hot path functions
Skeleton now shows `·` placeholder for gutter symbols, filled in
when data loads. Added documentation explaining skeleton performance
requirements and the minimal pre-skeleton operation set.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Add a new `post-switch` hook that runs in the background after every
`wt switch` operation. Unlike post-start (which only runs on creation),
post-switch runs on all switch results: Created, Existing, and AlreadyAt.
Use cases include renaming terminal tabs, updating tmux window names,
and IDE notifications.
Execution order on `wt switch --create`:
1. Create worktree
2. Run post-create hooks (blocking)
3. Show success message
4. Spawn post-switch hooks (background)
5. Spawn post-start hooks (background)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Add introductory text explaining that `wt merge` executes from the
feature worktree and merges into the target branch, similar to GitHub's
merge button. Update example descriptions for consistency.
* Update docs and help text to clarify default branch references
* Replace "main" with "default branch" in docs and help text
Update references throughout documentation and help snapshots to use
"default branch" instead of hardcoded "main" for clarity. Changes include:
- Help text descriptions for list, merge, switch, and remove commands
- Configuration file documentation and examples
- JSON output field descriptions
- Status symbol explanations
- Example commands and shortcuts
Also update environment variable from GIT_EDITOR to GIT_CONFIG_GLOBAL
in test snapshots and add missing RUST_LOG variable.
Use prepare_demo_repo() with alpha/beta/hooks branches instead of custom
streaming/doctor/llm-templates setup. This makes all three demos (wt-core,
wt-merge, wt-select) use the same base repository.
- Add utils.rs fixture to alpha branch for larger committed diff (+272 lines)
- Update demo.tape to navigate alpha and filter with "alp"
- Simplify CLAUDE.md to reflect unified approach
- Remove unused create_branches parameter from prepare_demo_repo()
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Convert --help-page output to HTML with ANSI colors preserved,
matching how `wt list` outputs render in the web docs. The doc
sync test now converts command reference blocks from markdown
code fences to Zola's {% terminal() %} shortcode with proper
HTML styling.
- Add with_colors parameter to get_help_reference()
- Use std::println! to preserve ANSI codes (bypass anstream TTY detection)
- Add strip_ansi_codes() helper for pattern matching
- Convert command reference blocks to HTML in readme_sync test
- Fix URL typo in config docs (/hooks/ → /hook/)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Add clean_ansi_output and run_fish_script helper functions to shared
lib.py to eliminate duplication in wt-core and wt-merge build scripts.
Update both scripts to use the new helpers instead of inline subprocess
and regex calls.
Document the workflow pattern that pre-merge hooks enable: faster iteration
with many small changes. Explains how local hooks provide the same process
enforcement that remote CI provided historically.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Arguments after `--` are now appended to the execute command, enabling
shell aliases like:
alias wsc='wt switch --create -x claude'
wsc feature -- 'implement login'
Uses `shlex::try_quote()` for POSIX shell escaping (platform-independent).
Removes vestigial `adjust_completion_command` and custom `shell_escape`
in favor of standard `shlex` crate.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* Replace --internal flag with WT_DIRECTIVE_FILE environment variable
* Rename directive file environment variable to WORKTRUNK_DIRECTIVE_FILE
* Update stale comments referencing directive scripts
Codex review identified comments that still referenced "directive scripts"
after migrating to file-based directive passing. Updated to reference
"data output" which is the current terminology.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Address documentation review feedback
- Add WORKTRUNK_DIRECTIVE_FILE to env var tables (cli.rs, config.md)
- Update stale "directive mode" terminology in test comments to use
"shell integration" or "data output" as appropriate
- Regenerate help snapshot
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Refactor progressive table output to use output module
Remove finalize_non_tty method and simplify non-TTY output path to use
output::table() directly, consistent with buffered mode. Add WORKTRUNK_SHELL
environment variable support for PowerShell-specific path escaping. Update
documentation and templates accordingly.
* Preserve directive script exit code in PowerShell
Add logic to use the directive script's exit code when wt succeeds, and
add redaction for WORKTRUNK_DIRECTIVE_FILE in test snapshots.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Move backslash normalization to start of filter chain (#263)
By normalizing backslashes to forward slashes FIRST, all subsequent
path filters only need the forward-slash version. This removes:
- Duplicate path filters for backslash versions
- The later backslash normalization filter
Simplifies the filter chain by having one canonical path format.
Co-authored-by: Claude <noreply@anthropic.com>
* Combine ~/repo pattern with optional worktree suffix (#264)
Use a single pattern with optional capture group instead of two separate
patterns. The optional suffix (\.[a-zA-Z0-9_-]+)? matches worktree paths
like ~/repo.feature while also matching plain ~/repo.
Co-authored-by: Claude <noreply@anthropic.com>
* Inline symbol literals in formatted messages
Replace symbol constant references with their literal characters inside
cformat! color blocks. This ensures symbols render with proper coloring
instead of appearing outside the colored sections.
* Add demo-simple scaffold with shared fixtures and library
Extract common demo setup logic into reusable lib.py functions:
- prepare_base_repo() for git repo, Rust project, mock CLIs
- prepare_demo_repo() for full rich repo with varied branches
- commit_dated() for dated commits with offsets
- Helper functions for creating alpha/beta/hooks branches
Create shared fixtures directory:
- lib.rs and lib-hooks.rs for Rust project variants
- gh-mock.sh for mocked GitHub CLI with per-branch CI status
- alpha-readme.md for large diff demo content
- starship.toml for consistent shell prompt
Add demo-simple demo scaffold:
- Build script and VHS tape for simple workflow demo
- Shows hooks execution, branch creation, and removal
- Uses shared fixtures and library for setup
Update wt demo to use shared library, reducing duplication
by ~190 lines while maintaining identical repo structure.
* Refactor demo infrastructure: consolidate shared code and rename demos
- Create shared/ Python package with unified imports
- Move lib.py and themes.py into shared/
- Add __init__.py that re-exports all utilities
- Move fixtures into shared/fixtures/
- Rename demos for clarity
- demo-simple → wt-core (core workflow demo)
- wt → wt-merge (merge-focused demo)
- Update doc references
- Homepage and README use wt-core.gif
- merge.md page uses wt-merge.gif
- Simplify gitignore
- Use single glob pattern docs/demos/*/out/
- Remove per-demo .gitignore files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add merge.md to lychee exclude_path
The merge.md page now has root-relative asset paths (/assets/wt-merge.gif)
that lychee can't resolve locally. These assets are fetched at deploy time.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add wt-merge demo GIF to merge command help
Add demo placeholder in cli.rs so the GIF appears in generated docs.
The placeholder expands to an HTML figure with light/dark variants.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update help snapshots for merge demo placeholder
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Add a `hash_port` filter that hashes any string to a port number in the
range 10000-19999. This enables running dev servers on unique ports per
worktree without port collisions.
Example usage in hooks:
```toml
[post-start]
dev = "npm run dev --port {{ branch | hash_port }}"
```
The filter uses Rust's DefaultHasher for simple deterministic hashing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Detached processes now use process_group(0) instead of nohup, allowing
them to survive PTY closure while remaining responsive. Shell wrappers
now detect piping via `[[ ! -t 1 ]]` and bypass the wrapper when stdout
isn't a terminal, enabling commands like `wt list --format=json | jq`.
Updated shell templates (bash, zsh, fish, PowerShell) to check for
redirected output and run the binary directly in those cases. Removed
dev-detach dependency in favor of portable PTY for shell integration
tests. Simplified output routing by removing data_raw() function and
consolidating data output handling. Added FAQ entry explaining JSON
output routing and piping behavior.
Changes {{ branch }} to provide raw branch names (e.g., feature/auth) and
adds a sanitize filter for filesystem-safe paths. Users now explicitly use
{{ branch | sanitize }} to replace / and \ with -.
This makes sanitization visible in templates rather than implicit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* Replace emojis with single-width Unicode symbols
Switch from graphical emojis (🔄, ✅, ❌, etc.) to single-width Unicode
symbols (◎, ✓, ✗, etc.) for message indicators:
- ◎ Progress (bullseye)
- ✓ Success (checkmark)
- ✗ Error (x mark)
- ▲ Warning (triangle)
- ↳ Hint (corner arrow)
- ○ Info (empty circle)
- ❯ Prompt (shell prompt)
Benefits:
- Better terminal compatibility (emojis render inconsistently)
- More serious/professional aesthetic
- Consistent single-character width for alignment
Also reduces gutter indentation from 3 to 2 columns to align with 1-char
symbols, and adds colors to the symbols themselves (red for errors, green
for success, etc.).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update shell integration test snapshots
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update documentation and comments to use new symbols
Update help text examples, doc comments, and .claude rules files
to reflect the new single-width Unicode symbols.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update .claude rules to use symbol terminology
Rename emoji→symbol consistently in documentation guidelines.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Use cstr! for pre-colored symbols
Symbols now have their semantic colors embedded using color_print's cstr!
macro, which creates colored &'static str constants. This ensures symbols
are always consistently colored without needing to wrap each usage site.
- PROGRESS_SYMBOL: cyan ◎
- SUCCESS_SYMBOL: green ✓
- ERROR_SYMBOL: red ✗
- WARNING_SYMBOL: yellow ▲
- HINT_SYMBOL: dim ↳
- INFO_SYMBOL: dim ○
- PROMPT_SYMBOL: cyan ❯
Message formatting functions now apply color only to the text content,
since symbols are pre-colored.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update shell integration test snapshots for pre-colored symbols
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add filter for shell-escaped paths in test snapshots
When shell_escape quotes paths, the filters replace the path portion
but leave the quotes. Add filters to normalize '[REPO]' to [REPO].
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Filter syntax-highlighted [REPO] placeholders
Shell-escaped paths get green syntax highlighting. Add filter to
normalize colored [REPO] placeholders back to plain [REPO].
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix snapshot filters for shell-escaped path formatting
CI (Ubuntu/Windows) produces different ANSI formatting around
shell-escaped paths than local macOS. Add filters to normalize
the dim formatting codes around [REPO] placeholders.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update snapshots for single-width Unicode symbols
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update PTY test snapshots for new symbols
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update snapshots for new symbols after merge
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
The current worktree is already distinguished by the @ gutter symbol
and its position at the top of the list, so bolding adds no additional
information.
This simplifies the styling code by removing the position_style function
entirely and only applying dimming for removable worktrees.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
The docs linked to `@/switch.md#argument-resolution` but that anchor
doesn't exist - the section in switch.md is named "Shortcuts".
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* Show paths relative to main worktree in wt list
Previously, paths were shown relative to a computed common prefix, which could
degenerate to `/` when worktrees were in unrelated locations, resulting in
confusing output like `./Users/max/project`.
Now paths are computed relative to the main worktree:
- Main worktree: `.`
- Children: `./subdir`
- Siblings: `../project.feature`
Uses `pathdiff` crate for cross-platform relative path computation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Move CI status cache to file-based storage
Fixes flaky Windows CI test where parallel git operations would fail
with "Permission denied" on .git/config. The git config write
temporarily locks the file, blocking concurrent reads on Windows.
Changes:
- Store CI cache in .git/wt-cache/ci-status/<branch>.json instead of git config
- Add robust branch name sanitization for Windows filenames
- Update demo scripts to use new file-based cache
- Update test helpers for new cache location
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Show integration reason in remove output
When removing a worktree, show why the branch is safe to delete
(e.g., "ancestor of main", "trees match"). Pre-computes integration
reason before spawning background removal to avoid race conditions
with git locks.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Previously, paths were shown relative to a computed common prefix, which could
degenerate to `/` when worktrees were in unrelated locations, resulting in
confusing output like `./Users/max/project`.
Now paths are computed relative to the main worktree:
- Main worktree: `.`
- Children: `./subdir`
- Siblings: `../project.feature`
Uses `pathdiff` crate for cross-platform relative path computation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- Change opening to "Change directory to a worktree"
- Add "Creating a branch" section for --create flag
- Rewrite "Creating worktrees" intro to explain existing worktree behavior
- Remove redundant "For interactive selection" (already in See also)
- Remove technical "Argument resolution" section
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
- Update FAQ to use new config command syntax
- Clarify default branch references in switch help
- Reorganize merge help to better explain cleanup behavior
- Improve wording in merge pipeline description
- Simplify tips-patterns documentation language
The docs previously implied post-create runs before switching directories
and post-start runs after. In reality, both hooks run with the new worktree
as their working directory (via subprocess current_dir), and the shell cd
happens at the very end via terminate_output().
Reorder the steps to match the conceptual model: you've "entered" the
worktree before hooks run. This is accurate since hooks execute in the
new directory.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* Add table wrapping in help output and expand JSON documentation
Tables in --help now wrap at terminal width with continuation lines
properly aligned. This replaces the previous approach of setting
term_width(200) to prevent clap from breaking tables.
Key changes:
- Add ```table code fence format for markdown tables
- Clap no longer wraps content (HELP_TERM_WIDTH = usize::MAX)
- Our markdown renderer handles all wrapping
- Expand wt list JSON documentation with Type column and nested
object details (commit, working_tree, main, remote, worktree, ci)
- Fix ANSI reset codes appearing at start of wrapped lines
- Rename JSON field pr → ci for clarity
The table format uses a simpler pipe-delimited syntax that's easier
to maintain in source, while rendering with proper column alignment
and width constraints.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace custom table rendering with termimad
Use termimad for markdown table rendering in help text. This provides:
- Automatic column width calculation and balancing
- Cell content wrapping with proper alignment
- Simpler implementation (~100 lines removed)
Trade-offs:
- +99 KB binary size (0.8% increase)
- 9 new crate dependencies
- Backticks stripped from table cells
- 1-space column gaps instead of 2
The custom table rendering code is replaced with termimad's text()
function using a no_style skin with custom border characters for
our separator style (separate line segments under each column).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Simplify md_help and standardize JSON boolean fields
- Remove ```table code fence format (use standard markdown tables)
- Deduplicate link stripping by having render_inline_formatting call strip_markdown_links
- Remove bare field from JSON output (worktrees are never bare by definition)
- Make boolean fields always present in JSON (is_current, is_previous, detached)
- Simplify HELP_TERM_WIDTH comment
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Wrap command reference at 80 chars for web docs
Add width parameter to get_help_reference() so web docs via --help-page
can request wrapped output. Terminal help uses default (no limit, our
markdown renderer handles it).
This prevents horizontal scroll in the command reference sections on
the docs site. Example terminal output tables still have internal
scroll (contained within their blocks), which is expected for wide
tabular output.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Reduce README example width to fit docs terminal blocks
Changed COLUMNS from 115 to 90 for README examples so the table
output fits within the docs terminal block width (~87 chars max)
without horizontal scroll.
Trade-off: Message column is now hidden in examples (shows
"1 column hidden" / "2 columns hidden"). All other columns
(Branch, Status, HEAD±, main↕, Path, Remote⇅, Commit, Age)
remain visible.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add Message column to list output
Replace Path column with Message column by default. Message shows the last
commit message (truncated to fit available width). Path is now hidden unless
explicitly shown. Adjust minimum Message width from 20 to 10 chars, increase
README example terminal width from 90 to 98 columns, and update column
allocation logic to handle spacing after Gutter columns correctly.
* Tune list output width and rename truncation function
- Reduce README_COLUMNS from 105 to 98 to fit browser viewport
- Reduce MIN_MESSAGE from 20 to 10 to show Message in narrow layouts
- Rename truncate_at_word_boundary → truncate_to_width (now truncates
mid-word for consistent column widths)
- Fix spacing calculation after Gutter column with needs_spacing helper
- Update tests that incorrectly assumed Path always visible
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix help output indentation by preserving leading whitespace
The clap library's next_line_help(true) option adds proper indentation
to help descriptions (2 spaces before flags, 10 spaces before descriptions).
However, wrap_ansi's default trim_whitespace(true) was stripping this
indentation.
Changes:
- Add next_line_help(true) to apply_help_template_recursive in cli.rs
- Remove term_width(usize::MAX) which was no longer needed
- Configure wrap_ansi with trim_whitespace(false) to preserve indentation
The fix ensures help output is properly indented:
Commands:
config
Manage configuration and shell integration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Refactor help template to remove next_line_help
* Add DEFAULT_HELP_WIDTH constant for consistent doc width
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
When `wt switch` encounters a stale directory or file at the target
worktree path, the new `--clobber` flag moves it to a timestamped .bak
file (e.g., `repo.feature.bak.20250102-000000`) instead of failing.
This is separate from `--force`, which only skips approval prompts.
The backup preserves the original content and fails if the backup path
already exists.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Change table width from 100% to fit-content with max-width constraint
to allow tables to display at their natural width while preventing
overflow beyond the container.
Document the yellow warning symbol (⚠) that appears when CI status
fetch fails due to rate limiting or network issues. Update help text,
CLI output, HTML rendering, and terminal colorization accordingly.