Skip to content

cli(test[load]): Snapshot multi-pane window layouts - #1121

Open
tony wants to merge 4 commits into
feat/vt-snapshotsfrom
feat/vt-window-snapshots
Open

tony wants to merge 4 commits into
feat/vt-snapshotsfrom
feat/vt-window-snapshots

Conversation

@tony

@tony tony commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Snapshot a 3-pane main-vertical workspace built by tmuxp load via Window.capture_vt().
  • Assert live control-mode parity via VtSessionObserver.snapshot_window() and assert_window_screen_box().
  • Snapshot zoomed window expansion and split-to-zoomed frame deltas with vt_snapshot.
  • Point [tool.uv.sources] at tmux-python/libtmux#939 and tmux-python/libvt#137.

Companion PR

Changes

  • pyproject.toml, uv.lock: point libtmux and libvt in [tool.uv.sources] at tmux-python/libtmux#939 and tmux-python/libvt#137 while preserving Python 3.11 markers.
  • tests/test_vt_snapshots.py, tests/__snapshots__/test_vt_snapshots.ambr: add test_cli_load_multipane_workspace_window_vt_snapshots covering main-vertical split borders, pane-border-status, CJK and SGR styles, live VtSessionObserver.snapshot_window parity, and zoomed window deltas.

Test plan

  • Formatting and lint checks pass via uv run ruff format . .github/scripts --check and uv run ruff check . .github/scripts
  • Static type checks pass on Python 3.11 and Python 3.15 via uv run --no-sync ty check --python-version 3.11 and uv run --no-sync ty check --python-version 3.15
  • Multi-pane workspace .ambr snapshots pass on Python 3.15 and skip cleanly on Python 3.11 via uv run pytest tests/test_vt_snapshots.py --reruns=0
  • Full tmux 3.3a to master matrix in CI

@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.15%. Comparing base (08fbd21) to head (8c11923).

Additional details and impacted files
@@                Coverage Diff                 @@
##           feat/vt-snapshots    #1121   +/-   ##
==================================================
  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 added 4 commits December 5, 2026 20:29
why: tmuxp #1121 consumes Window.capture_vt and VtSessionObserver window
capture APIs from tmux-python/libtmux#939, which now requires libvt
>=0.0.1a7,<0.1.

what:
- Pin libtmux in [tool.uv.sources] to 0f83e37c545787bf089047ade1357c4c1197b6d2
- Refresh uv.lock against libvt 0.0.1a7
why: Verify that a multi-pane tmuxp YAML workspace renders split borders,
junctions, pane-border-status labels, CJK and SGR styles, zoom state,
and live control-mode parity into a single composited Snapshot.

what:
- Add test_cli_load_multipane_workspace_window_vt_snapshots exercising
  main-vertical layout, pane-border-status, Window.capture_vt,
  VtSessionObserver.snapshot_window, assert_window_screen_box, and zoom
  frame deltas with .ambr snapshots
why: tmux < 3.6 assigns odd remainder rows in layout_spread_cell to the
bottom split pane whereas tmux >= 3.6 assigns them to the top pane; an
8-row window gives 3 + 3 interior rows with zero remainder across all
tmux versions.

what:
- Size the dashboard PTY to 35x8 and refresh .ambr snapshots
why: libvt 0.0.1a6+ formats vt_screen(..., diff=...) with row-paired
changes, per-row caret markers, and a compact styles summary.

what:
- Update the zoom-frame step-diff snapshot in tests/__snapshots__/test_vt_snapshots.ambr
@tony
tony force-pushed the feat/vt-window-snapshots branch from 7254e6f to 8c11923 Compare December 6, 2026 02:30

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