Skip to content

docs: add a visual command map (docs/commands.html) - #32

Merged
colevels merged 1 commit into
mainfrom
docs/visual-command-map
Jul 21, 2026
Merged

docs: add a visual command map (docs/commands.html)#32
colevels merged 1 commit into
mainfrom
docs/visual-command-map

Conversation

@colevels

Copy link
Copy Markdown
Owner

Why

The command surface is documented three ways — README.md, CLAUDE.md, and tabbrew help — and all three are prose. None of them draws the thing that actually matters: the CLI straddles three different places (this disk, a loopback bridge to Chrome, and tabbrew.com), and no command in it can change a tab.

This adds one self-contained HTML page that shows that instead of describing it.

What's in it

Eight sections, diagram-first:

§ Section The idea
01 The map Every command as a card, coloured by reach — offline / loopback 127.0.0.1 / account over HTTPS / GitHub Releases. Legend chips filter the map to one reach.
02 Two workflows One request → one script, and the auto-mode loop. Both end on the step where a human presses a button.
03 Turning it on Auto mode from the user's side: three setup steps with what success looks like for each, plus the Accept/Deny card drawn out.
04 The bridge The routes across their three conversations, and the four gates that make a no-token loopback server defensible.
05 TabBrew Script Six verbs + the fixed DEL → UNPIN → UNGROUP → GROUP → PIN → MOVE phase order, with real tabs check output.
06–08 Verdicts, state, index The four verdicts, the three 0600 files, and an "I want to… → run this" index.

Reach is the one idea the page adds — it isn't stated anywhere else in the repo, and it's the fastest way to answer "what can this command actually touch". §03 is likewise new: SKILL.auto.md documents the loop for the agent, but nothing documented the three things a person has to do to start it.

How it's built

  • Self-contained. Zero CDN, font, or image requests, so it renders identically from a file:// open, tabbrew docs push, or a strict-CSP host. The one external URL is an <a href> back to this repo.
  • Themed once. color-scheme drives every light-dark() token, and a host's data-theme stamp just re-declares it — system preference, a viewer toggle, and a raw file open all work from one definition.
  • No dependencies, no build step. Hand-built CSS diagrams (not Mermaid, for control in both themes) and ~20 lines of vanilla JS for the reach filter.

The maintenance cost, stated up front

The page is a hand-written mirror of registry.ts — nothing generates it and no test pins it, so a new command or a reworded summary has to be carried over by hand. Rather than leave that implicit, CLAUDE.md now says so directly next to the "adding a command = a row here + a case in index.ts" checklist, and the layout tree lists docs/.

It's the only file in the repo that duplicates registry.ts.

Verified

  • bun run typecheck and bun run test — clean (20 pass), though this PR touches no TypeScript.
  • Rendered at 1280px and 485px, in both light and dark: no horizontal body scroll, reach filter works, no clipped or wrapped labels.
  • Every card's summary and flag list diffed against bun run src/index.ts help --all.
  • grep confirms no src= / <link> / @import / url() anywhere in the file.

Preview

open docs/commands.html — or tabbrew docs push docs/commands.html --cloud to read it in the sidepanel Docs view it was partly written for.

🤖 Generated with Claude Code

The command surface was documented three ways — README, CLAUDE.md, and
`tabbrew help` — all of them prose. None of them drew the thing that
actually matters: that the CLI straddles three different places (this
disk, a loopback bridge to Chrome, and tabbrew.com), and that no command
in it can change a tab.

So: one self-contained HTML page, diagram-first. Eight sections —

- every command as a card, colour-coded by **reach** (offline / loopback
  127.0.0.1 / account over HTTPS / GitHub Releases), with a legend that
  filters the map down to one reach at a time. The reach idea is new; it
  isn't stated anywhere else, and it's the fastest way to answer "what
  can this one actually touch";
- both workflows as step diagrams — one request → one script, and the
  auto-mode loop — each ending on the step where a human presses a button;
- how to *turn auto mode on*, from the user's side: the three setup steps
  with what success looks like for each, and the Accept/Deny card drawn
  out, since that card is the only screen most people ever read;
- the bridge's routes across its three conversations, plus the four gates
  that make a no-token loopback server defensible;
- the six-verb grammar with the fixed DEL → UNPIN → UNGROUP → GROUP →
  PIN → MOVE phase order, and real `tabs check` output;
- the four verdicts, where state lives on disk, and an "I want to…" index.

Self-contained by construction: no CDN, font, or image requests, so it
renders identically from a `file://` open, `tabbrew docs push`, or any
strict-CSP host. Themed through `color-scheme` + `light-dark()` tokens, so
system preference and a host's `data-theme` stamp both work from one
definition.

The page is a hand-written mirror of `registry.ts` — nothing generates it
and no test pins it — so CLAUDE.md now says that out loud next to the
"adding a command" checklist, and the layout tree lists `docs/`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@colevels
colevels merged commit a356859 into main Jul 21, 2026
1 check passed
@colevels
colevels deleted the docs/visual-command-map branch July 21, 2026 13:12
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