docs: voice-guide compliance pass, diagrams, and fixes#1072
Merged
Conversation
why: The configuration pages opened on raw keys instead of what the feature is, and a skimmer had no "you can stop here" cue. The docs voice guide asks for concept-first prose addressed to the reader. what: - top-level: open with what top-level keys are and that only session_name is required; second-person session_name prose - environmental-variables: add an orientation lead (rarely needed, works out of the box) - examples: add a gallery lead; fix "punctual"->"concise" and a stray "it's"->"its" - index: fix "It's"->"Its"; add a session->window->pane mermaid
why: The topics pages opened in third person about generic "users"
instead of addressing the reader, and the plugin hook order and the
freeze->load loop are far easier to grasp as diagrams than as prose.
what:
- plugins: second-person, concept-first intro; mark plugins
opt-in/advanced; add a hook-lifecycle mermaid (firing order
verified against the builder and load CLI); fix a dict-literal
syntax error and an invalid pyproject example (>=3.8 -> >=3.10,
tmuxp^=1.7.0 -> tmuxp>=1.7.0, PEP 621 authors)
- workflows: second-person voice, sentence-case headings, a
freeze->edit->load mermaid, {ref} the exit-codes page
- custom-workspace-builders: address the reader in the intro
- troubleshooting: tmux 3.2a -> 3.2; {ref} completion; bash/zsh/tcsh
- library-vs-cli: link quickstart and examples
why: The command pages opened straight into mechanics, shell documented -c twice in non-adjacent sections, and the inside-tmux load choice was described in prose only. what: - load: warmer concept-first open; a mermaid for the y/n/a switch/append/detached choice - shell: consolidate the duplicated -c material into one "Running code directly" section after interactive usage - completion: add a concept-first lead naming shtab vs click - exit-codes: introduce each script example instead of stacking them bare - freeze: Tmuxp -> tmuxp - recipes: link the full CLI reference
why: The architecture request flow was ASCII art; the workspace
builder reference rendered as dead text because the package had no
module target; and the API index listed its pages as a bare toctree
instead of the grid every other index page uses.
what:
- architecture: ASCII request flow -> mermaid; link the classic
builder class instead of a stale bare WorkspaceBuilder
- api/workspace/builder: register the package as a py:module so
{mod}`tmuxp.workspace.builder` resolves and links
- api/index: concept-first lead + grid cards linking each module
group, matching the other index pages
why: The quickstart still carried reStructuredText link syntax
([uv]_, [pip]\:) that renders broken under MyST, claimed python
>=3.9, and listed a .tmuxp.py config form that tmuxp does not load.
what:
- quickstart: concept-first lead; convert rST references to MyST
markdown links; one command per console block; python >=3.9 ->
>=3.10; drop the unsupported .tmuxp.py (only .tmuxp.{yaml,yml,json}
load); fold the abstraction-layer table under Pythonics
- glossary: tidy the redundant Server definition; "a layouts" ->
"layouts"
why: The tmux primer drew its session and pane diagrams as aafig ASCII art. The repo now renders mermaid and tmux-layout to theme-aware inline SVG, which reads better in light and dark themes. what: - session/window/pane hierarchy, window switching, and the detach/reattach flow -> mermaid - the two terminal-split illustrations -> tmux-layout directives - "stores it own screen" -> "its own screen"
why: contributing documented a make-based workflow, but the repo uses just; its dev-config include paths and screenshot were one directory too shallow and never resolved. releasing showed an outdated rST changelog shape. what: - contributing: make -> just throughout (real recipe names); drop a duplicated clone block and an ownerless todo; fix the tests.yml/.tmuxp.yaml includes and the screenshot path (resolves 3 build warnings); trim tab boilerplate to single commands - releasing: active voice; changelog example uses the current Markdown "## tmuxp X.Y.Z" form and the fixed subheading order
why: GitHub renders code blocks without prompt-aware copy, so a leading "$ " is copied along with the command and makes it uncopyable. The README is the sole exception to the console $-prefix convention used elsewhere in the docs. what: - drop the leading "$ " prompt from every command block - tagline -> active second person - "triage and code review and the tracker" -> "code-review on the tracker"
why: Left-to-right flowcharts overflow horizontally and do not scale on narrow or mobile viewports; top-down charts wrap within the doc column. The architecture request-flow stays LR, where the fan-out reads better wide. what: - workflows freeze->edit->load loop: LR -> TD - about_tmux window-switch and detach/reattach flows: LR -> TD
why: The architecture page named tmuxp.cli, tmuxp.cli.cli(),
tmuxp.cli._formatter, and the libtmux Server/Session/Window/Pane
objects in plain code, so none of them linked, and _formatter had
no API page to point at.
what:
- architecture: link the cli module and entry point, _formatter,
and the libtmux objects via {mod}/{func}/{class} roles
- add an api/cli/formatter page (eval-rst automodule) and wire it
into the toctree, giving {mod}`tmuxp.cli._formatter` a populated
target
why: Command, symbol, and config-key labels read as code, so they should render monospace the way inline code does, matching the workspace-builders diagram's :::cmd nodes. what: - tag command/symbol/key nodes with :::cmd across the workflows, plugins, configuration, load, and architecture diagrams - plugins: drop the inline per-hook timing from the nodes so the symbol nodes stay clean, and move it into the prose below
why: Review surfaced two conventions worth pinning so they are not
re-litigated: mermaid command nodes should be monospace and
vertical, and API pages need automodule (a bare py:module renders
an empty page).
what:
- add a "Diagrams and reference pages" section: :::cmd + flowchart
TD for mermaid; {eval-rst} automodule for API reference pages
- add a matching before-you-commit checklist item
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1072 +/- ##
=======================================
Coverage 82.56% 82.56%
=======================================
Files 31 31
Lines 2770 2770
Branches 518 518
=======================================
Hits 2287 2287
Misses 346 346
Partials 137 137 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/and the README with thedocs/AGENTS.mdvoice guide — concept-first leads, second-person voice, "you can stop here" reassurance, advanced/Python material marked opt-in — while preserving every link, cross-reference, table, and error string.tmux-layoutdiagrams where prose was carrying structural information: the plugin hook lifecycle, the CLI request flow, the workspace hierarchy, the load attach/append decision, and the freeze→edit→load loop. Diagrams are vertical and tag command/symbol nodes monospace.about_tmux) by replacing itsaafigASCII art with mermaid andtmux-layoutdirectives that render to theme-aware inline SVG.tmuxp.workspace.builder,tmuxp.cli,tmuxp.cli.cli(),tmuxp.cli._formatter, and the libtmuxServer/Session/Window/Paneobjects. The API index gains the same grid-card navigation as every other index page.make→justthroughout the contributor guide, broken include/image paths, leftover reStructuredText link syntax in the quickstart, an unsupported.tmuxp.pyclaim, and two broken code samples in the plugin guide.Changes by area
Configuration
top-level,environmental-variables,examples,index: concept-first leads; a session→window→pane hierarchy diagram; grammar and word fixes.Topics
plugins: rewritten concept-first and marked opt-in; a hook-lifecycle diagram whose firing order is verified against the builder and the load CLI; fixed a Python dict syntax error and an invalidpyproject.tomlexample.workflows: second-person voice, a freeze→edit→load diagram, a{ref}to the exit-codes page.library-vs-cli,troubleshooting,custom-workspace-builders: internal cross-references,tmux 3.2a→3.2, reader-addressed intros.CLI
load: warmer open; an attach/append/detached decision diagram.shell: consolidated the-cmaterial that previously appeared in two non-adjacent sections.completion,exit-codes,freeze,recipes: leads, per-example intros, and cross-references.Internals
architecture: ASCII request flow → mermaid; link the cli module and entry point,_formatter, the classic builder class, and the libtmux objects.api/cli/formatter: new page documentingtmuxp.cli._formatterviaautomodule, so the module reference resolves to a populated target.api/workspace/builder: register the package as a module target sotmuxp.workspace.builderresolves and links.api/index: grid cards matching the other index pages.Guides & front matter
quickstart: clean MyST (reStructuredText link artifacts removed), Python ≥3.10, dropped the unsupported.tmuxp.py.about_tmux: aafig → mermaid +tmux-layout.glossary: tidied the Server definition.project/contributing:make→just, fixed include/image paths, removed a duplicate clone block and an ownerless TODO.project/releasing: active voice; current Markdown changelog format.README: active tagline; omit the$prompt from command blocks.Conventions
docs/AGENTS.md: a "Diagrams and reference pages" section —:::cmdmonospace nodes and verticalflowchart TDfor mermaid, and{eval-rst}automodulefor API pages.Design decisions
{ref}/{class}roles were kept verbatim; only the prose around them changed.flowchart TD(the architecture fan-out stays wide on purpose); command, symbol, and config-key nodes render monospace via:::cmd.$prompts: GitHub renders code blocks without prompt-aware copy, so a leading$is copied with the command. The README is the sole exception to theconsole$-prefix convention used in the Sphinx docs.Verification
No reStructuredText reference artifacts remain in the quickstart:
No
makeinvocations remain in the contributor guide:No aafig blocks remain in the primer:
No leading
$prompts remain in the README:The builder package is registered as a module target:
Test plan
uv run ruff check .— lint cleanuv run ruff format .— no formatting changesuv run mypy— type-check cleanuv run py.test— suite green (doctests unaffected)just build-docs— full rebuild succeeds; no new broken references; contributor-guide include/image references now resolvetmux-layoutdirectives render to inline SVG; command nodes render monospacetmuxp.workspace.builder,tmuxp.cli,tmuxp.cli.cli(),tmuxp.cli._formatter, and the libtmuxServer/Session/Window/Paneobjects