Skip to content

cli(test[load]): Add PTY acceptance snapshots - #1118

Open
tony wants to merge 2 commits into
masterfrom
feat/vt-snapshots
Open

tony wants to merge 2 commits into
masterfrom
feat/vt-snapshots

Conversation

@tony

@tony tony commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Snapshot Spinner ?2026 synchronized panel frames and CURSOR_UP_1 cleanup with vt_snapshot.
  • Exercise detached tmuxp load in vt_pty at normal (76-column) and narrow (48-column) terminal widths with a before_script hook, verifying live builder progress, panel erasure, private-path summary styling, cursor restoration, and built session state.
  • Exercise failed tmuxp load recovery in vt_pty at normal and narrow terminal widths, verifying that hook output renders first, spinner output stops before the (k)ill, (a)ttach, (d)etach? prompt, and entering k kills the session cleanly.
  • Add libvt[pytest,syrupy]>=0.0.1a4,<0.1 and syrupy to tmuxp's dev and testing dependency groups on Python 3.12+ (with no runtime tmuxp extra).

Companion PR

Changes

  • pyproject.toml, uv.lock: add libvt[pytest,syrupy]>=0.0.1a4,<0.1 and syrupy to dev and testing dependency groups on Python 3.12+, set libvt = false in [tool.uv.exclude-newer-package], and allowlist unresolved libvt and syrupy imports under [tool.ty.analysis] for Python 3.11 type-checks.
  • tests/test_vt_snapshots.py, tests/__snapshots__/test_vt_snapshots.ambr: add .ambr snapshot and PTY acceptance tests covering Spinner, detached tmuxp load progress and cleanup, and failed tmuxp load recovery prompts via vt_pty, vt_screen, and vt_snapshot (skipping cleanly on Python 3.11).

Test plan

  • Check formatting and lint rules with uv run ruff format . .github/scripts --check and uv run ruff check . .github/scripts
  • Check static types on Python 3.11 and Python 3.15 with uv run ty check --python-version 3.11 and uv run ty check --python-version 3.15
  • Verify tmuxp load PTY acceptance scenarios and Spinner .ambr snapshots on Python 3.12+ and clean skips on Python 3.11 with uv run pytest tests/test_vt_snapshots.py tests/cli/test_progress.py --reruns=0

@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.15%. Comparing base (b0c6837) to head (5e86cd4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1118   +/-   ##
=======================================
  Coverage   82.15%   82.15%           
=======================================
  Files          31       31           
  Lines        2791     2791           
  Branches      525      525           
=======================================
  Hits         2293     2293           
  Misses        355      355           
  Partials      143      143           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony
tony force-pushed the feat/vt-snapshots branch from cdb4de4 to 44c24a0 Compare November 29, 2026 18:44
@tony tony changed the title tests(feat[vt]): Add syrupy VT snapshot suite tests(feat[vt]): Add tmuxp load PTY VT snapshots Nov 30, 2026
@tony
tony force-pushed the feat/vt-snapshots branch from 94bb755 to 983083d Compare November 30, 2026 00:44
@tony tony changed the title tests(feat[vt]): Add tmuxp load PTY VT snapshots cli(test[load]): Add PTY acceptance snapshots Nov 30, 2026
@tony
tony force-pushed the feat/vt-snapshots branch from 983083d to 5e86cd4 Compare November 30, 2026 00:55
tony added 2 commits November 29, 2026 18:55
why: Provide vt_pty, vt_screen, and syrupy .ambr snapshot fixtures for
CLI acceptance tests on Python 3.12+ without adding runtime dependencies
or breaking Python 3.11 environments.

what:
- Add libvt[pytest,syrupy]>=0.0.1a4,<0.1 and syrupy>=7.0.3 (gated on
  python_version >= '3.12') to dev and testing dependency groups.
- Set libvt = false in [tool.uv.exclude-newer-package] and allowlist
  unresolved libvt and syrupy imports under [tool.ty.analysis] for
  Python 3.11 type-checks.
why: Unit tests calling Spinner.on_build_event directly cannot verify
that tmuxp load wires builder events to the spinner, clears panel rows
before printing final output, or stops repainting before showing the
error recovery prompt.

what:
- Exercise detached tmuxp load in vt_pty at normal (76-column) and
  narrow (48-column) widths with a before_script hook and multi-window
  workspace, verifying live progress, panel erasure, private-path
  summary styling, cursor restoration, and built session state.
- Exercise failed tmuxp load recovery in vt_pty at normal and narrow
  widths, verifying that hook output renders first, spinner output stops
  before the recovery prompt, and entering 'k' kills the session.
- Snapshot Spinner ?2026 panel frames, CURSOR_UP_1 cleanup, and step
  deltas, skipping cleanly on Python 3.11.

This branch has not been deployed

No deployments
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