Skip to content

fix(serialize): restore altScreen mode before writing payload#40

Closed
emmanuel-martinez-dev wants to merge 2 commits into
vercel-labs:mainfrom
emmanuel-martinez-dev:pr-36
Closed

fix(serialize): restore altScreen mode before writing payload#40
emmanuel-martinez-dev wants to merge 2 commits into
vercel-labs:mainfrom
emmanuel-martinez-dev:pr-36

Conversation

@emmanuel-martinez-dev
Copy link
Copy Markdown

Fixes the alternate screen restore order issue reported by the Vercel bot in #36.

Changes

  • Enable \x1b[?1049h (enter altScreen) before writing the serialized payload
  • Restore additional modes (cursorKeysApp, bracketedPaste)
  • Set cursor position and visibility at the end

This ensures that content written to the alternate screen is not lost/hidden after restore.

Tested locally with altScreen snapshots — restoration now works correctly.

Related to: #36

mvanhorn and others added 2 commits April 18, 2026 21:05
Adds a new package that serializes wterm terminal state (grid, scrollback,
cursor, modes) into a portable snapshot and restores it into a fresh terminal,
matching the capability xterm.js users get from @xterm/addon-serialize.

Closes vercel-labs#35.
Fixes the order issue reported by Vercel bot where content was being
written before switching to alternate screen, causing it to be hidden.
Now altScreen mode is enabled first, then payload + other modes + cursor.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 19, 2026

@emmanuel-martinez-dev is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

2 participants