Files
Maximilian Roos cff085edf9 docs: fix misplaced copy buttons by dropping terminal frames (#4090)
On every shell code block the copy button sat 40px below the top of the
code: on the second line of multi-line blocks, and hanging below
one-line blocks such as `wt merge --no-ff` on /merge/. Shell blocks were
Expressive Code terminal frames, and the terminal plugin deleted their
title bar, but Expressive Code still offsets the copy button by that
bar's height.

## Changes

- `docs/astro.config.mjs` sets `defaultProps: { frame: 'code' }`, so no
block is a terminal frame and there is no title bar to remove. The
plugin's header-removal hook and its `props.frame = 'terminal'` go, and
so does the `wt-commands-only` class: mobile wrapping in `custom.css`
now keys on whether a block contains captured output
(`:has(.wt-output)`).
- Blocks with several commands had a whole-block copy button and
per-line buttons in the same corner, handed over on hover by opacity. A
hidden button still takes clicks, so clicking a line's button could copy
the whole block, and on touch screens one button covered another. Most
of these blocks are lists of alternatives, so they now get only per-line
buttons, and the hover rule is deleted.
- Those blocks wrap (Expressive Code's `wrap` prop) unless they carry
captured output, since a per-line button sits at the end of its line and
scrolled out of view on the long `jq` examples on /list/. A per-line
button is no taller than its line, so buttons on adjacent lines no
longer overlap.
- The two multi-command blocks that only work run in order, the FAQ's
stash recipe and the `Equivalent to:` block under `wt step diff`'s **How
it works** (in `src/cli/step.rs`), are now `bash` fences, the form
`docs/CLAUDE.md` prescribes for a copyable recipe, so they keep one copy
button for the whole recipe. Terminal `--help` renders `console` and
`bash` fences alike (it strips `$ `), and the help snapshots are
unchanged.

## Side effect

Expressive Code strips comment lines only from what terminal frames
copy. The eight `bash` and `powershell` blocks with comments on
/shell-integration/ now copy them, as console blocks already did. Pasted
into zsh without `interactivecomments`, each comment line prints
`command not found: #`; the commands still run.

## Tests

A browser test checks every copy button on every page, at 393px with
touch and at 1376px, for three things: it sits on the line it copies, it
is inside the visible code, and it doesn't overlap another button. These
checks fail against worktrunk.dev and against a build without the wrap
and the height cap. The built-site and plugin tests now expect per-line
payloads and no block payload on multi-command blocks, and a plugin test
pins that blocks carrying output never wrap.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_013U96NY8qKtZhavBSwnfCYq

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-13 10:00:25 -07:00
..

Worktrunk Plugin for Claude Code

Git worktree management CLI integration with activity tracking.

Requires the wt CLI (worktrunk.dev) and jq (used by the worktree-lifecycle hooks).

Features

  1. Configuration skill — Guides LLM-powered commit message setup, project hooks (pre-start, pre-merge), and worktree path customization
  2. Activity tracking — Shows which branches have active Claude sessions via indicators in wt list
  3. /wt-switch-create command — Creates a worktrunk worktree and moves the current Claude session into it

Examples

Activity tracking across worktrees

The plugin installs Claude Code hooks that track session activity per branch. When a prompt is submitted, the hook sets 🤖 on that branch. When Claude finishes and waits for input, it switches to 💬. When the session ends, the marker clears.

These markers appear in wt list output, making it easy to see which worktrees have active Claude sessions — useful when running multiple instances in parallel.

Set up LLM commit message generation

The configuration skill guides through configuring an AI tool (Claude Code, Codex, llm, or aichat) and adding [commit.generation] to the user config so wt merge can auto-generate commit messages.

Add pre-start hooks to run npm install automatically

The skill configures .config/wt.toml with project hooks. Pre-start hooks run when creating worktrees, pre-merge hooks validate before merging.

Start work in a fresh worktree

/wt-switch-create fix-auth -- Investigate the 5-minute session timeout creates a fix-auth worktree in worktrunk's normal sibling layout (<repo>.fix-auth/), switches the session into it, and starts the task there. The branch name is optional (/wt-switch-create -- <task>). The worktree persists after the session — merge or remove it with wt merge / wt remove like any other.