Files
Maximilian Roos 4f26e9a1c1 docs: keep code frames in the content column and dev-server styling current (#4076)
## Code frames leave the content column on wide screens

#4000 stretched every terminal frame to the full content panel at 72rem
and up, to give `wt list --full` room. Once the panel is wider than the
62rem column, Starlight offsets the column inside it, so shell snippets
moved left of the prose they belong to and spanned past it on the right,
while TOML frames stayed in the column. On
https://worktrunk.dev/tips-patterns/ at 2560px, prose starts at x=760
and shell frames at x=248, 1504px wide.

#4039 had already made terminal output fit the column. With the stretch
disabled, no output-bearing frame on any of the 15 pages overflows;
three long one-line commands on `/config/`, `/list/` and `/step/`
scroll, as long TOML lines already do. So the rule is removed rather
than narrowed.

The desktop browser test ran only at 1152px and 1376px, where the panel
and the column are the same width and the rule changed nothing. It now
also runs at 1920px and asserts every code frame stays within the
column; with the old rule restored, it fails on the homepage.

## The dev server loses code styling after a merge

Astro caches rendered Markdown with the Expressive Code stylesheet URL
baked in. That URL's hash comes from the code-rendering config and
plugins, which Astro's content-cache key doesn't cover. A merge that
changes `astro.config.mjs` and the terminal plugin under a running dev
server makes Astro restart it in place: the server serves the new
stylesheet while content keeps rendering with the old renderer, so every
page links a stylesheet that returns 404. Restarting the process doesn't
recover, because the cache survives it.

- `docs/package.json`: `dev` passes `--force`, as `build` already does,
so a restart re-renders.
- `.config/wt.toml`: the docs hook sets `ASTRO_DEV_BACKGROUND=1`. When
`astro dev` detects an AI agent, it respawns itself detached, which
drops `--force` and escapes `wt step tether`; three worktrees currently
run their dev servers that way.
- `docs/CLAUDE.md`: explains the cache and says to restart with `wt hook
post-start docs` after `astro.config.mjs` changes, since the in-place
restart is Astro's to fix.

> _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_016NGjseUKXkyL8qHLhaXsnt

---------

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