Skip to content

docs(readme): Refresh quickstart and cut boxes - #220

Merged
tony merged 1 commit into
masterfrom
readme-refresh
Dec 6, 2026
Merged

tony merged 1 commit into
masterfrom
readme-refresh

Conversation

@tony

@tony tony commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #218

Stacked on #219 (docs-codeblocks), exercising its plain python (including two-pass syrupy vt_snapshot execution) and runnable console code-block runner across README.md.

1. Owner and boundary

  • Rule changed and module that owns it: README.md (package landing page and PyPI readme). No runtime modules under src/libvt/ changed.
  • Sibling entry points checked (sync/async, CLI/API, single/batch, or N/A): Verified README.md against tests/_docs_codeblocks.py (pytest -m documentation README.md), tests/test_libvt.py (test_markdown_code_fences_are_collected_and_classified, test_documented_examples_include_explicit_imports), libvt.contrib.subprocess (open_terminal, run_terminal, send_line, Windows build 26100 ConPTY ReleasePseudoConsole check, .snapshot / .snapshot() boundaries), libvt.aio (AsyncTerminalStream and open_pty), libvt.pytest_plugin (vt_factory default recorder=None vs vt_terminal/vt_pty and --vt-replay-dir), libvt.contrib.syrupy (vt_snapshot, VtSnapshotExtension), libvt.contrib.tmux (decode_tmux_capture, parse_tmux_window_layout, composite_tmux_window, TmuxPaneSync, tmux_version=), python -m libvt CLI subcommands (with POSIX \033 printf), and all 30 https://libvt.git-pull.com/ links and anchors against freshly built Sphinx -W HTML.
  • Why this belongs here (owner fix, boundary adapter, or single-PR ownership transfer): Documentation-only refresh in README.md; VT emulation semantics are unchanged so VT byte-replay comparisons in REVIEW.md section 2 are inapplicable.

2. Failure before the fix (N/A for docs, lockfile bumps, or pure refactors)

  • N/A (documentation refresh). Net length shrank from 278 to 268 lines (-10), Quickstart shrank from 7 to 5 subsections, and rendered boxes shrank from 5 to 1 while adding live-tested pytest, syrupy, python -m libvt, and pure-Python tmux examples. Negative controls verified that perturbing each of the 7 plain python blocks (including stripping explicit imports) and the runnable python -m libvt explain console block fails pytest README.md for cause and passes again once restored.

3. Verification and tool disclosure

  • Gates run (plus production-only revert check for behavioral fixes, or N/A): uv run ruff format --check ., uv run ruff check ., uv run ty check across Python 3.12–3.15 and --python-version 3.12 --python-platform win32 (plus ty check on all 7 extracted README.md Python blocks), PYTHONDONTWRITEBYTECODE=1 uv run python -B scripts/check_workarounds.py, uv run pytest README.md -v (10 passed), uv run pytest -m documentation (47 passed), uv run pytest -m "" (1409 passed, 3 skipped), uv run sphinx-build -W -b dirhtml -d docs/_build/doctrees docs docs/_build/html plus built-HTML link/anchor verification (all 30 URLs verified, fixing the broken vt_snapshot anchor), and uv build wheel cleanliness (48 libvt-only entries) + unpacked-sdist pytest README.md (10 passed).
  • .github/workarounds.toml updates (None if none): None.
  • Tool use: git, gh, uv, ruff, ty, pytest, sphinx-build.

why: Replace repeated boxed serialize_vt_snapshot() snippets with
executable plain Python and console examples that surface core
inspection, synchronous process control, pytest/syrupy testing,
CLI disassembly, and pure-Python tmux compositing while shrinking
README.md.

what:
- Collapse optional extra install fences into prose and rewrite the
  opening quickstart around Terminal.feed(), term.committed,
  Snapshot.lines/cursor, Cell.style, and RowView.runs without
  libvt.testing
- Replace the async-only PTY example with synchronous open_terminal()
  and send_line(), noting Windows build 26100 ConPTY and .snapshot
  caveats alongside pointers to libvt.aio (AsyncTerminalStream,
  open_pty()) and pytest vt_pty replay capture
- Keep wide-char assert_screen_box(), consolidate testing into a real
  pytest test_status_diff() using vt_factory(..., recorder=vt_recorder),
  feed_str(), tmp_path scrubbing, and vt_screen(..., diff=...), plus
  --vt-replay-dir -> python -m libvt replay and a runnable syrupy
  vt_snapshot test
- Contrast render() and strip() on overwrite input, state render()
  viewport/no-scrollback boundaries and defaults accurately, and run
  POSIX-safe printf | python -m libvt explain
- Cover Snapshot.format()/to_dict(), drain_replies()/Profile/Policy/
  Limits, prompt_zones/cwd/Notification, migrating-from-pyte, and add
  a pure-Python libvt.contrib.tmux capture and window-compositing
  example while fixing the vt_snapshot anchor link
@tony
tony changed the base branch from docs-codeblocks to master December 6, 2026 01:53
@tony
tony merged commit 78c2f73 into master Dec 6, 2026
10 checks passed
@tony
tony deleted the readme-refresh branch December 6, 2026 02:09

This branch was successfully deployed

1 active deployment
docs — 2e9ceee5 Deployed Dec 6, 2026 by tony via build (3.14) #550
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.

Refresh README.md to surface key APIs and cut duplicate boxes

1 participant