{"id":51234673,"url":"https://github.com/catesandrew/playwright-tui","last_synced_at":"2026-06-28T19:03:04.229Z","repository":{"id":356999319,"uuid":"1234897515","full_name":"catesandrew/playwright-tui","owner":"catesandrew","description":"Terminal UI wrapper for Playwright test runner with live stats, failure cards, and interactive controls","archived":false,"fork":false,"pushed_at":"2026-05-10T20:19:32.000Z","size":174,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-10T22:21:14.566Z","etag":null,"topics":["developer-tools","ink","playwright","react","terminal","test-runner","testing","tui","typescript"],"latest_commit_sha":null,"homepage":"https://catesandrew.github.io/playwright-tui/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catesandrew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-10T19:30:37.000Z","updated_at":"2026-05-10T20:18:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/catesandrew/playwright-tui","commit_stats":null,"previous_names":["catesandrew/playwright-tui"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/catesandrew/playwright-tui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catesandrew%2Fplaywright-tui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catesandrew%2Fplaywright-tui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catesandrew%2Fplaywright-tui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catesandrew%2Fplaywright-tui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catesandrew","download_url":"https://codeload.github.com/catesandrew/playwright-tui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catesandrew%2Fplaywright-tui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34900368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","ink","playwright","react","terminal","test-runner","testing","tui","typescript"],"created_at":"2026-06-28T19:03:03.542Z","updated_at":"2026-06-28T19:03:04.221Z","avatar_url":"https://github.com/catesandrew.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# playwright-tui\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)\n\nA terminal UI wrapper for the [Playwright](https://playwright.dev/) test runner. Get real-time visibility into your test suite with live progress bars, worker status, failure details, and ETA estimation -- all from the terminal.\n\n**[Documentation](https://catesandrew.github.io/playwright-tui/)**\n\n## Screenshots\n\n\u003c!-- TODO: Add terminal screenshots/recordings --\u003e\n\n## Features\n\n- **Header bar** with Playwright version, browser targets, worker count, and running indicator\n- **Stats bar** with total/pass/fail/skip/retry counters and elapsed timer\n- **Block progress bar** showing overall completion percentage\n- **Spec files panel** with per-file mini progress bars and pass/fail/running indicators\n- **Recent activity stream** showing completed tests with timestamps\n- **Worker panel** with per-worker spinner, active test name, file, and live duration\n- **Failure cards** with expandable details including error message, expected/actual values, and stack trace snippets\n- **Summary panel** (`s`) showing final stats, failed tests, and slowest tests\n- **ETA estimation** using persisted timing history with exponential moving averages\n- **Filter mode** to search across spec files, activity, and failures\n- **Watch mode** toggle for iterative development\n- **Headless mode** with progress output for CI/non-TTY environments\n- **Rerun controls** to rerun all tests or just failed tests without leaving the TUI\n\n## Installation\n\n### Pre-built binaries\n\nDownload a standalone executable for your platform from the [GitHub Releases](https://github.com/catesandrew/playwright-tui/releases) page. Available for macOS (arm64 \u0026 x64), Linux (x64), and Windows (x64).\n\n### Prerequisites\n\n- [Bun](https://bun.sh/) (recommended) or [Node.js](https://nodejs.org/) 18+\n- A project with [Playwright](https://playwright.dev/) tests configured\n\n### Build from source\n\n```bash\ngit clone https://github.com/catesandrew/playwright-tui.git\ncd playwright-tui\nbun install\n```\n\n### Compile to standalone binary\n\n```bash\nbun run build:exe\n# Binary is at ./dist/playwright-tui\n```\n\n### Use the wrapper script directly\n\n```bash\n./bin/playwright-tui\n```\n\n## Usage\n\nRun from a directory containing a `playwright.config.*` file:\n\n```bash\n# Run all tests with the TUI dashboard\nbun run dev\n\n# Pass arguments to Playwright after --\nbun run dev -- -- --grep @smoke --workers=4\n\n# Run against a different project directory\nbun run dev -- -C ../my-playwright-project -- --project=chromium\n\n# Use the bin wrapper directly\n./bin/playwright-tui -- --grep login\n\n# Use the compiled binary\n./dist/playwright-tui -- --workers=8\n```\n\n### Wrapper Options\n\n| Option | Description | Default |\n|---|---|---|\n| `-C, --cwd \u003cpath\u003e` | Directory containing `playwright.config.*` | Current directory |\n| `--history` / `--no-history` | Enable/disable persisted ETA history | Enabled |\n| `--history-file \u003cpath\u003e` | Custom history file path | `~/.config/playwright-tui/history.json` |\n| `--runner \u003cauto\\|bunx\\|npx\u003e` | Command used to invoke Playwright | `auto` |\n| `-h, --help` | Show help | |\n| `-v, --version` | Show version | |\n\n\u003e **Note:** Do not pass `--reporter` to Playwright args. `playwright-tui` injects its own reporter bridge automatically.\n\n## Keyboard Shortcuts\n\n| Key | Action |\n|---|---|\n| `r` | Rerun failed tests (`--last-failed`) |\n| `a` | Rerun all tests |\n| `f` | Enter filter mode (type + `Enter` to apply, `Esc` to cancel) |\n| `w` | Toggle watch mode for next run |\n| `s` | Show/hide summary panel |\n| `Tab` | Switch focus between spec-files and failures panels |\n| `Up/Down` or `j/k` | Navigate rows in focused panel |\n| `Enter` | Expand/collapse selected failure card |\n| `q` | Stop running test process and quit |\n\n## Architecture\n\n```\nplaywright-tui\n├── bin/\n│   └── playwright-tui          # Shell wrapper entry point\n├── reporter/\n│   └── playwrightTuiReporter.cjs  # Playwright custom reporter (CJS)\n└── src/\n    ├── cli.tsx                 # CLI entry point, arg parsing, headless mode\n    ├── types.ts                # Shared TypeScript types and interfaces\n    ├── controller/\n    │   └── runController.ts    # Process management, event handling, state machine\n    ├── history/\n    │   └── timingHistoryStore.ts  # Persisted timing data for ETA estimation\n    ├── tui/\n    │   └── Dashboard.tsx       # Ink/React terminal UI components\n    └── utils/\n        └── format.ts           # Duration, percentage, and string formatting\n```\n\n### How it works\n\n1. **Reporter bridge**: `playwright-tui` injects a custom Playwright reporter (`playwrightTuiReporter.cjs`) that writes NDJSON events to a temporary file.\n2. **Event polling**: The `RunController` polls the event file every 120ms, parsing reporter events (run-begin, test-begin, test-end, run-end, fatal).\n3. **State management**: Events are processed into a `RunState` object tracking workers, file progress, failures, activity, and ETA.\n4. **Terminal rendering**: The `Dashboard` component (built with Ink/React) subscribes to state changes and renders the multi-panel TUI layout.\n5. **Timing history**: Test durations are persisted to `~/.config/playwright-tui/history.json` using exponential moving averages for accurate ETA prediction across runs.\n\n## Tech Stack\n\n- **[Ink](https://github.com/vadimdemedes/ink)** - React for interactive command-line apps\n- **[React 18](https://react.dev/)** - Component-based UI rendering\n- **[TypeScript](https://www.typescriptlang.org/)** - Type-safe development\n- **[Bun](https://bun.sh/)** - JavaScript runtime and bundler\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/my-feature`)\n3. Make your changes\n4. Run type checking: `bun run typecheck`\n5. Commit your changes (`git commit -m 'Add my feature'`)\n6. Push to the branch (`git push origin feature/my-feature`)\n7. Open a Pull Request\n\n## License\n\n[MIT](LICENSE) - Andrew Cates\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatesandrew%2Fplaywright-tui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatesandrew%2Fplaywright-tui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatesandrew%2Fplaywright-tui/lists"}