Skip to content

test: add Termless SVG snapshot workflow - #241

Merged
John-David Dalton (jdalton) merged 1 commit into
mainfrom
test/native-terminal-snapshots
Nov 20, 2026
Merged

John-David Dalton (jdalton) merged 1 commit into
mainfrom
test/native-terminal-snapshots

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

LLM Description written by Codex:GPT-6

Adds 20 terminal screenshots of real socket-mcp commands, covering help, login, logout, stdio startup and HTTP authentication. Each screenshot keeps the Mac-style window and trims unused rows.

Run pnpm run snapshots:refresh to refresh the screenshots, or pnpm run test:e2e:update to update the full end-to-end suite. CI checks the screenshots on Linux, macOS and Windows. A failed comparison uploads the expected SVG, actual SVG and terminal text. Git shows text diffs for the SVGs.

Dependency review

Socket flagged low adoption for the pinned MIT-licensed @termless/vterm@0.11.0 backend. Its published package has no install script and the MCP uses it only in tests. Playwright and resvg are optional Termless renderers. These tests render SVG directly, so the install excludes both, including the flagged playwright-core package.

Verification

Ran pnpm test, pnpm run test:e2e, pnpm run check and a frozen install. Changed the help baseline, verified the failure produced both images and the terminal text, and confirmed pnpm run test:e2e:update restored the original.

@cursor

cursor Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are confined to test/dev tooling and snapshots; no production MCP server behavior is modified.

Overview
This PR adds e2e terminal testing that drives a real PTY, captures SVG screenshots at named checkpoints, and asserts them with Vitest snapshots (with optional animated SVG artifacts).

Test infrastructure: New helpers in test/native-terminal/terminal-animation.mts wire Termless and node-pty (createTerminalAnimationSession, createTerminalAnimationRecorder, toMatchTerminalAnimationSnapshot). An example e2e run exercises a scripted session (> ready → Enter → Scan complete) and checks frozen SVG snapshots; it can also write a combined animation under .cache/native-terminal-animations/.

Tooling: E2e Vitest config now includes test/native-terminal/**/*.test.mts, test:e2e:update refreshes snapshots, and pnpm-workspace.yaml allows building node-pty. Dev deps add @termless/core, @termless/vterm, and node-pty.

Reviewed by Cursor Bugbot for commit 2979dee. Configure here.

@socket-security

socket-security Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​termless/​vterm@​0.11.0781006990100
Addednpm/​node-pty@​1.2.0-beta.189210010098100
Addednpm/​@​termless/​core@​0.11.09810010092100
Addedgithub/​actions/​upload-artifact@​043fb46d1a93c77aae656e7c1c64a875d1fc6a0a99100100100100

View full report

@socket-security

socket-security Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
License policy violation: npm @maschwenk/tsrslint-darwin-arm64

License: LicenseRef-CC-BY-4.0-0c618849 - The applicable license policy does not permit this license (5) (package/NOTICE)

From: package.json → npm/oxlint@1.89.0 → npm/@maschwenk/tsrslint-darwin-arm64@0.1.5

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@maschwenk/tsrslint-darwin-arm64@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
License policy violation: npm @maschwenk/tsrslint-linux-arm64

License: LicenseRef-CC-BY-4.0-0c618849 - The applicable license policy does not permit this license (5) (package/NOTICE)

From: package.json → npm/oxlint@1.89.0 → npm/@maschwenk/tsrslint-linux-arm64@0.1.5

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@maschwenk/tsrslint-linux-arm64@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
License policy violation: npm @maschwenk/tsrslint-linux-x64

License: LicenseRef-CC-BY-4.0-0c618849 - The applicable license policy does not permit this license (5) (package/NOTICE)

From: package.json → npm/oxlint@1.89.0 → npm/@maschwenk/tsrslint-linux-x64@0.1.5

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@maschwenk/tsrslint-linux-x64@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
License policy violation: npm @maschwenk/tsrslint

License: LicenseRef-CC-BY-4.0-0c618849 - The applicable license policy does not permit this license (5) (package/NOTICE)

From: package.json → npm/oxlint@1.89.0 → npm/@maschwenk/tsrslint@0.1.5

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@maschwenk/tsrslint@0.1.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@socket-security-staging

socket-security-staging Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​termless/​vterm@​0.11.0781006989100
Addednpm/​node-pty@​1.2.0-beta.189210010097100
Addednpm/​@​termless/​core@​0.11.09810010092100
Addednpm/​svgo@​4.1.010010010095100

View full report

@socket-security-staging

socket-security-staging Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
License policy violation: npm playwright-core under MIT WITH Google-Patent-WebM

License: MIT WITH Google-Patent-WebM - The applicable license policy does not permit this license (5) (package/lib/webp_codec.LICENSE)

From: package.json → npm/@termless/core@0.11.0 → npm/playwright-core@1.65.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity-Staging ignore npm/playwright-core@1.65.0. You can also ignore all packages with @SocketSecurity-Staging ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: npm @termless/vterm

Location: Package overview

From: package.json → npm/@termless/vterm@0.11.0

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity-Staging ignore npm/@termless/vterm@0.11.0. You can also ignore all packages with @SocketSecurity-Staging ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2979dee. Configure here.

Comment thread .config/repo/vitest.e2e.config.mts Resolved
@jdalton
John-David Dalton (jdalton) force-pushed the test/native-terminal-snapshots branch 2 times, most recently from 8daef6a to 4ce9de1 Compare November 18, 2026 23:57
@jdalton John-David Dalton (jdalton) changed the title test: add native terminal SVG snapshots test: add Termless SVG snapshot workflow Nov 18, 2026
@jdalton
John-David Dalton (jdalton) force-pushed the test/native-terminal-snapshots branch 3 times, most recently from 5bae366 to 063ce28 Compare November 20, 2026 16:43
gerardosabetta

This comment was marked as resolved.

@jdalton
John-David Dalton (jdalton) merged commit c4c0f3e into main Nov 20, 2026
11 of 12 checks passed
@jdalton
John-David Dalton (jdalton) deleted the test/native-terminal-snapshots branch November 20, 2026 17:19
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