Skip to content

Use base URL instead of file exclusions for root-relative paths - #93

Merged
max-sixty merged 1 commit into
mainfrom
ci
Dec 5, 2025
Merged

max-sixty merged 1 commit into
mainfrom
ci

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

Improves on #92 by using lychee's base config option instead of excluding entire files.

  • Added base = "https://worktrunk.dev" to rewrite root-relative paths
  • Removed file exclusions for docs/content/select.md and docs/content/why-worktrunk.md

Why this is better:

  • Still validates all other links in those files (the previous fix excluded ALL links)
  • The rewritten URLs (e.g., https://worktrunk.dev/assets/wt-demo.gif) match our --include regex so they're checked
  • More targeted solution that doesn't lose link coverage

Test plan

  • pre-commit run lychee --all-files passes locally
  • All pre-commit hooks pass

🤖 Generated with Claude Code

Instead of excluding entire files from lychee, use the `base` config
option to rewrite root-relative paths like `/assets/wt-demo.gif` to
`https://worktrunk.dev/assets/wt-demo.gif`. This is better because:

- Still validates all other links in those files
- The rewritten URLs match our --include regex so they're checked
- More targeted than excluding entire files

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

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty
max-sixty merged commit 7043dca into main Dec 5, 2025
15 checks passed
@max-sixty
max-sixty deleted the ci branch December 5, 2025 20:05
max-sixty added a commit that referenced this pull request Sep 7, 2026
Seven fixes to `wt list` — three to how the table lays out, one to what
detached and prunable worktrees show, and three to the page that
documents it.

**The table**

A single 58-character branch name sized the Branch column for every row:
at 60 columns the table degenerated into a branch list with nine columns
hidden, and at 200 it still lost Message. Branch now sizes to
`min(longest, 32)` and elides with `…`, the way Message already does.
`--format=json` still carries the whole name.

`Remote⇅` in a repo with no remote held its blank seven columns open
while Message, Commit, Age and Path — each with something to say on
every row — were dropped for want of them. The empty-column penalty now
exceeds every base priority, and the allocation loop stops admitting
empty columns once a populated one has failed to fit. `Remote⇅` also
learns it is empty before any task reports: a repo with no remote has no
branch that can track one, read O(1) off the bulk config map.

Alignment now follows the value type consistently: text and reference
columns align left; the scalar `Age` column and its header align right;
split diff fields use two right-aligned halves with centered headers and
centered whole-field states such as loading or in-sync markers. Rows no
longer carry trailing padding, and the hidden-column footer wraps at the
terminal width. The progressive renderer documents and asserts the
corresponding terminal invariant: ordinary rows and the loading footer
occupy one physical row, while only the final summary may wrap.

The familiar `main↕` and `main…±` labels remain fixed across
repositories. This avoids adding default-branch-name plumbing or a `^`
fallback without changing the meaning of either column.

**Detached and prunable rows**

A detached worktree rendered as a bare hash under Branch, wearing `⚑` on
loan from `branch_worktree_mismatch` — which it was only flagged with
because a worktree with no branch has no branch-implied path to sit at.
It gets `⊘`, and stops claiming to be off-template, so `⚑` again means
only what it says. A prunable worktree showed four `·` loading glyphs
that never resolved: its directory is gone, so no task is ever spawned
for it and no cell is coming. Those cells render blank, leaving `⊟` in
Status as the row's whole story.

**The page**

<details>
<summary>Documentation corrections</summary>

- The summary footer counted hidden columns ("3 columns hidden") without
saying which, and the page never explained that the table drops columns
to fit. The footer now names them ("hidden: Path, Commit, Message"), and
a paragraph under `## Columns` covers the drop order, `[list] columns`,
and that `--format=json` shows everything.
- The JSON section documented deprecated schema 1 at 159 lines and nine
sub-tables while schema 2 — what a future release makes the default —
got 88 lines and one table. Schema 2 now carries the full reference
(envelope, item fields, a sub-table per object, the three value
vocabularies) and the worked `jq` recipes. Schema 1 keeps a paragraph,
the deprecation pointer, and a schema-1 → schema-2 mapping table
covering every field it documented.
- The CI-cache line pointed at `wt config state`, a group with no
default action; it names `wt config state cache`.
- `wt list statusline --format=json` was documented as "a one-entry
array in the `wt list --format=json` schema", which holds only under
schema 1. It emits the current schema — an array under 1, the envelope
under 2 — and the line now records why that surface stays silent about
an unset `[list] json-schema` while plain `wt list` nags: a prompt
consumer can't act on a warning drawn over its own line.
- The Status-symbols section documented every subcolumn except the
branch marker. Both JSON schemas gain an additive `marker` field, so the
value is readable without parsing it back out of `symbols`.

</details>

UX survey items: `#24`, `#34`, `#58`, `#89`, `#90`, `#92`, `#93`.

Reviewable files: `src/commands/list/**` (`layout.rs`, `columns.rs`,
`render.rs`, `progressive_table.rs`, `model/item.rs`, `mod.rs`,
`json_v2.rs`), the list section of `src/cli/mod.rs`,
`src/styling/line.rs`, and
`.claude/skills/writing-user-outputs/SKILL.md`. Generated mirrors and
snapshots are regenerated.

Original analysis:
https://claude.ai/code/session_01XAUYWFN9d9oh6jyoQiouHb

> _This was written by Codex on behalf of max-sixty_

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant