Skip to content

docs: fit terminal examples on desktop - #4039

Merged
max-sixty merged 2 commits into
mainfrom
codex/docs-responsive-examples
Sep 7, 2026
Merged

max-sixty merged 2 commits into
mainfrom
codex/docs-responsive-examples

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Widen the documentation content rail and defer the right-hand table of contents until the viewport can accommodate it, so terminal examples use the available desktop space.

Capture every documentation-backed wt list example at the shared 98-column width. Full-mode examples now exercise Worktrunk's real column hiding and truncation instead of embedding 134-column output, and the activity example no longer inherits the test suite's 500-column default.

Add a browser regression that crawls every public route at both sides of the responsive breakpoint and rejects horizontal overflow in output-bearing terminal blocks.

This was written by Codex on behalf of max-sixty

# Conflicts:
#	docs/src/content/docs/claude-code.md
#	docs/src/content/docs/list.md
#	docs/src/generated/terminal-styles.json
#	plugins/worktrunk/skills/worktrunk/reference/claude-code.md
#	plugins/worktrunk/skills/worktrunk/reference/list.md
#	skills/worktrunk/reference/claude-code.md
#	skills/worktrunk/reference/list.md
#	src/cli/mod.rs
#	tests/snapshots/integration__integration_tests__help__help_list_long.snap
#	tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
#	tests/snapshots/integration__integration_tests__list__list_with_user_marker.snap
#	tests/snapshots/integration__integration_tests__list__readme_example_list_branches.snap
#	tests/snapshots/integration__integration_tests__list__readme_example_list_full.snap
@max-sixty
max-sixty merged commit a0ad432 into main Sep 7, 2026
37 checks passed
@max-sixty
max-sixty deleted the codex/docs-responsive-examples branch September 7, 2026 23:51
max-sixty added a commit that referenced this pull request Sep 12, 2026
…urrent (#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) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants