Skip to content

Restore viewport state when replaying a VT snapshot - #180

Merged
tony merged 2 commits into
masterfrom
fix/88-vt-checkpoint-state
Dec 5, 2026
Merged

tony merged 2 commits into
masterfrom
fix/88-vt-checkpoint-state

Conversation

@tony

@tony tony commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Closes #88
Closes #110
Closes #114
Closes #115

What changed, and why:

VT snapshot output restores margins and protection, the active SGR and OSC 8 pen state, and representable pending wrap. Stored glyph widths determine the replayed cell layout.

Checks run:

On Linux, Ruff formatting and lint, ty for Python 3.12 through 3.15, the full pytest suite with doctests, compiled Ghostty comparisons, and the Sphinx warnings-as-errors build passed.

Tool use:

Codex prepared the change and ran the local checks. A separate Codex reviewer replayed the changed behavior and checked the publication tree against the reviewed patch.

tony added a commit that referenced this pull request Dec 3, 2026
why: Readers need the behavior and scope of this change at release.

what:
- Add the unreleased entry for PR #180
- Preserve previously published notes and the parent branch's entries
@tony
tony marked this pull request as ready for review December 3, 2026 01:50
@tony
tony force-pushed the fix/88-vt-checkpoint-state branch from a3bc2d9 to 5455933 Compare December 3, 2026 23:58
tony added 2 commits December 5, 2026 07:28
why: A frame replay needs the live state that governs the next write.

what:
- Restore margins, protection, active style and hyperlink state.
- Keep stored glyph widths and recreate representable pending wraps.
- Compare the viewport and following input after checkpoint replay.

Fixes #88
Fixes #110
Fixes #114
Fixes #115
why: Subsequent output depends on the margins, pen and pending wrap
     captured in a snapshot.

what:
- Describe restored state and when the margin glyph can be reprinted.
@tony
tony force-pushed the fix/88-vt-checkpoint-state branch from 5455933 to df6a617 Compare December 5, 2026 13:29
@tony
tony changed the base branch from master to fix/120-capture-grapheme-fidelity December 5, 2026 13:29
@tony
tony changed the base branch from fix/120-capture-grapheme-fidelity to master December 5, 2026 13:37
@tony
tony merged commit 51afd83 into master Dec 5, 2026
9 checks passed
@tony tony mentioned this pull request Dec 5, 2026
35 of 38 tasks
@tony
tony deleted the fix/88-vt-checkpoint-state branch December 5, 2026 20:42

This branch was successfully deployed

1 active deployment
docs — df6a6178 Deployed Dec 5, 2026 by tony via build (3.14) #408
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant