📸 terminal-capture: CLI Terminal Screenshot Automation#1840
Conversation
- Add terminal-capture engine using node-pty + xterm.js + Playwright - Add scenario runner with TypeScript configuration - Add pre-built scenarios (/about, /context, /export, /auth) - Add Cursor skills for terminal-capture and pr-review workflow - Add motivation documentation Co-authored-by: Qwen-Coder <[email protected]>
📋 Review SummaryThis PR introduces 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
tanzhenxin
left a comment
There was a problem hiding this comment.
Great feature! Can't wait to try it out!
Summary
This PR introduces
terminal-capture— an automated terminal UI screenshot testing tool for CLI visual verification during PR reviews.What is Terminal-Capture?
Terminal-Capture drives terminal interactions and captures screenshots via TypeScript configuration, using:
Architecture
Key Features
captureFull()captures entire scrollback bufferFiles Added
Core Implementation
integration-tests/terminal-capture/terminal-capture.ts— Low-level engineintegration-tests/terminal-capture/scenario-runner.ts— Scenario executorintegration-tests/terminal-capture/run.ts— CLI entry pointintegration-tests/terminal-capture/package.json— DependenciesDocumentation
integration-tests/terminal-capture/motivation.md— Motivation and positioningScenario Configurations
integration-tests/terminal-capture/scenarios/about.ts— Minimal smoke testintegration-tests/terminal-capture/scenarios/all.ts— Batch scenariosCursor Skills
.qwen/skills/terminal-capture/SKILL.md— Usage guide.qwen/skills/pr-review/SKILL.md— PR review workflow integrationQuick Start
Usage in PR Reviews
Terminal-capture is designed for visual verification during PR reviews:
See
.qwen/skills/pr-review/SKILL.mdfor the complete workflow.Future Enhancements
toHaveScreenshot()for CI