textual-ui-developer
Tools for developing and testing Textual-based terminal user interfaces.
Install
mkdir -p .claude/skills/textual-ui-developer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5512" && unzip -o skill.zip -d .claude/skills/textual-ui-developer && rm skill.zipInstalls to .claude/skills/textual-ui-developer
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Develop and debug the MassGen Textual TUI with deterministic replay, snapshot regression tests, and targeted runtime checks.Key capabilities
- →Reproduce UI behavior deterministically from event logs
- →Verify TUI layout and styling in a real shell environment
- →Update snapshot regression tests and golden transcripts
- →Render snapshot SVG files using a browser engine
- →Execute targeted runtime checks without API calls
How it works
The skill replays recorded event logs through the Textual app pipeline to recreate UI states. It then compares these states against stored golden transcripts or visual snapshots to identify regressions.
Inputs & outputs
When to use textual-ui-developer
- →Debug TUI layout issues
- →Update snapshot regression tests
- →Replay UI events for troubleshooting
About this skill
Textual UI Developer
Use this skill to improve the MassGen Textual UI while minimizing flaky reproduction and API cost.
Use This Skill When
- You need to debug timeline rendering or ordering issues.
- You need to verify layout/styling changes in the real Textual shell.
- You need to update or add TUI regression tests (snapshot/golden/transcript).
- You need to reproduce UI behavior from
events.jsonldeterministically.
Default Strategy
Prefer deterministic workflows before live model runs:
- Reproduce from recorded/synthetic events (
events.jsonl) with no API calls. - Confirm behavior in the real shell using
--tui-real. - Encode findings into tests (unit, transcript golden, snapshot).
- Use live
massgen --display textualor--textual-serveonly when needed.
Quick Commands
# Full frontend/TUI test suite
uv run pytest massgen/tests/frontend -q
# Timeline transcript goldens
uv run pytest massgen/tests/frontend/test_timeline_transcript_golden.py -q
UPDATE_GOLDENS=1 uv run pytest massgen/tests/frontend/test_timeline_transcript_golden.py -q
# Snapshot scaffold tests
uv run pytest massgen/tests/frontend/test_timeline_snapshot_scaffold.py -q
uv run pytest massgen/tests/frontend/test_timeline_snapshot_scaffold.py --snapshot-update -q
uv run pytest massgen/tests/frontend/test_timeline_snapshot_scaffold.py -q --snapshot-report snapshot_report.html
uv run python scripts/render_snapshot_svgs.py --real-tui-only
# Event replay (no API cost)
uv run python scripts/dump_timeline_from_events.py /path/to/events.jsonl [agent_id]
uv run python scripts/dump_timeline_from_events.py --tui /path/to/events.jsonl [agent_id]
uv run python scripts/dump_timeline_from_events.py --tui-real /path/to/events.jsonl [agent_id]
# Example synthetic fixture
uv run python scripts/dump_timeline_from_events.py --tui-real massgen/tests/frontend/fixtures/synthetic_tui_events.jsonl agent_a
Workflow
1) Reproduce with Event Replay (No API Cost)
Start with transcript replay to verify timeline semantics quickly:
uv run python scripts/dump_timeline_from_events.py /path/to/events.jsonl agent_a
Then inspect visually:
# Lightweight timeline-focused view
uv run python scripts/dump_timeline_from_events.py --tui /path/to/events.jsonl agent_a
# Full runtime TextualApp shell
uv run python scripts/dump_timeline_from_events.py --tui-real /path/to/events.jsonl agent_a
Optional speed control for real replay:
MASSGEN_TUI_REPLAY_SPEED=8 uv run python scripts/dump_timeline_from_events.py --tui-real /path/to/events.jsonl agent_a
Exit replay with q.
2) Convert Findings into Tests
Pick the narrowest layer that captures the bug:
- Unit logic:
test_tool_batch_tracker.py,test_content_processor.py, helpers. - Transcript/golden behavior:
test_timeline_transcript_golden.py+massgen/tests/frontend/golden/. - Widget/shell snapshots:
test_timeline_snapshot_scaffold.py+massgen/tests/frontend/__snapshots__/. - Replay script behavior:
test_dump_timeline_from_events_script.py.
Final Presentation Focus Loop
When iterating specifically on final-answer visualization:
- Validate header semantics in unit tests (winner line, tie-break markers, vote line formatting) in
test_timeline_section_widget.py. - Regenerate only final-presentation snapshots if intended UI changed:
uv run pytest massgen/tests/frontend/test_timeline_snapshot_scaffold.py --snapshot-update -q
- Verify runtime shell appearance with no API cost:
uv run python scripts/dump_timeline_from_events.py --tui-real massgen/tests/frontend/fixtures/synthetic_tui_events.jsonl agent_a
- Run full frontend suite before finalizing:
uv run pytest massgen/tests/frontend -q
3) Snapshot Workflow
If snapshot tests mismatch:
- Open
snapshot_report.html. - Check
Show differencetoggle interpretation:- ON = blend-diff overlay (can look purple/black).
- OFF = raw current vs historical snapshots.
- If change is intentional, regenerate with
--snapshot-update. - Re-run the frontend suite to confirm stability.
3.1) Mandatory Screenshot Review
For visual/UI tasks, do not rely on test pass/fail alone. You must read screenshots directly before finalizing:
- Review the snapshot images in
snapshot_report.html(current vs historical). - Keep
Show differenceOFF first to verify raw rendering; then optionally use ON for pixel-level drift. - If screenshots are provided in chat/task context, inspect those images directly and compare against expected runtime appearance.
- If your viewer cannot open
.svg, render via browser engine:npx playwright screenshot "file:///ABS/PATH/to/snapshot.svg" /tmp/snapshot.png- Batch all (or real-TUI-only):
uv run python scripts/render_snapshot_svgs.py [--real-tui-only] - Prefer this over ImageMagick conversion for Textual snapshots to avoid false artifacts.
- Call out any mismatch between rendered snapshots and expected real TUI look, even if tests pass.
- Only conclude "visual change verified" after explicit screenshot review.
4) Optional Live Visual Validation
Use live runs only after deterministic checks pass:
# Native terminal TUI
uv run massgen --display textual
# Browser-hosted Textual
uv run massgen --textual-serve
Key Files
scripts/dump_timeline_from_events.py: text replay,--tui, and--tui-realmodes.massgen/frontend/displays/textual_terminal_display.py:TextualApp, shell layout, runtime event routing.massgen/frontend/displays/tui_event_pipeline.py: timeline event adapter and filtering logic.massgen/frontend/displays/timeline_event_recorder.py: deterministic text transcript recorder.massgen/tests/frontend/test_timeline_snapshot_scaffold.py: snapshot scaffold (widget + real shell states).massgen/tests/frontend/test_timeline_transcript_golden.py: transcript golden regressions.docs/modules/testing.md: canonical testing commands and parity notes.
Done Criteria
A TUI change is complete when:
- Relevant deterministic tests were added or updated first.
uv run pytest massgen/tests/frontend -qpasses.- Snapshot/golden updates are intentional and reviewed.
--tui-realreplay confirms expected real-shell behavior for the target scenario.
When not to use it
- →When live model interaction is not required for validation
- →When unit tests are sufficient for logic verification
Prerequisites
Limitations
- →Requires manual screenshot review for visual verification
- →Cannot rely on test pass/fail status alone for UI accuracy
How it compares
Unlike manual testing, this workflow uses deterministic event replay to eliminate flakiness and avoid unnecessary API costs.
Compared to similar skills
textual-ui-developer side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| textual-ui-developer (this skill) | 2 | 6mo | Review | Intermediate |
| browser-daemon | 5 | 9mo | Review | Intermediate |
| debugging-skill | 0 | 2mo | No flags | Beginner |
| expect | 0 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by massgen
View all by massgen →You might also like
browser-daemon
noiv
Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.
debugging-skill
bitovi
Always start a fresh browser session after any file change, walk through the full user flow, and monitor for errors before proceeding with further work.
expect
zakad00e2
Use when editing .tsx/.jsx/.css/.html, React components, pages, routes, forms, styles, or layouts. Also when asked to test, verify, validate, QA, find bugs, check for issues, or fix expect-cli failures.
webapp-testing
anthropics
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
ui-ux-expert-skill
fercracix33
Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.