Sponsored Content
Skip to content

feat: debug commands for testing - #274

Merged
eugenioenko merged 9 commits into
release/v1.0.0from
feat/debug-commands
Jun 27, 2026
Merged

feat: debug commands for testing#274
eugenioenko merged 9 commits into
release/v1.0.0from
feat/debug-commands

Conversation

@eugenioenko

@eugenioenko eugenioenko commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds Debug: Simulate Click command — posts synthetic mouse press+release at given x,y coordinates
  • Adds Debug: Run Current File as Plugin command — loads the active buffer as a fully-permissioned Lua plugin
  • Adds Debug: Screenshot and Debug: Dump State command palette commands
  • Adds Lua APIs: ttt.click(x, y), ttt.screenshot(path), ttt.debug(path), ttt.quit()
  • Adds CLI flags: --plugin <file>, --size WxH, --debug
  • Full widget tree walker with type, rect, focus, visibility, and type-specific props
  • Debug state dump includes: screen, cursor, buffer, focus, panels, tabs, selection, output log, widget tree

Test plan

  • make build and make test pass
  • Manual: Simulate Click opens dialog, accepts coordinates, fires click
  • Manual: Run plugin loads Lua from editor buffer, registers commands/panels
  • Manual: ttt --plugin scripts/test-confirm.lua --size 120x40 loads plugin on startup
  • Manual: Debug: Screenshot saves screen text to file
  • Manual: Debug: Dump State saves JSON state with widget tree

🤖 Generated with Claude Code

https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm

eugenioenko and others added 9 commits June 27, 2026 13:22
… commands

Simulate Click posts synthetic mouse events at given coordinates.
Run Current File as Plugin loads the active buffer as a Lua plugin
with all permissions, enabling rapid plugin development and testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm
Exposes click simulation directly to plugins, enabling programmatic
UI testing without the command palette.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm
Adds ttt.screenshot(path), ttt.debug(path), ttt.quit() Lua APIs and
Debug: Screenshot / Debug: Dump State command palette commands. The
debug dump includes full widget tree with type, rect, focus, and
type-specific props. CLI flags --plugin, --size, --debug enable
headless plugin testing without TUI overhead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm
Supports semicolon-separated commands: click, key, type, exec,
screenshot, debug, wait, quit. Enables automated testing and
debugging without writing Lua plugins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm
Highlights --exec, --size, --plugin, --debug flags and Lua APIs
as the primary tool for debugging and testing UI issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm
Documents --exec, --plugin, --size, --debug flags with supported
commands table and usage example.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm
Adds drag X1 Y1 X2 Y2 command and ttt.drag(x1, y1, x2, y2) for
simulating mouse drags with interpolated move events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm
When --exec is provided, the editor runs on an in-memory simulation
screen instead of opening /dev/tty. Eliminates the need for a script
wrapper or real terminal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm
@eugenioenko
eugenioenko merged commit 1fec075 into release/v1.0.0 Jun 27, 2026
@eugenioenko
eugenioenko deleted the feat/debug-commands branch July 23, 2026 03:52
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.

1 participant