feat: debug commands for testing - #274
Merged
Merged
Conversation
… 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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Debug: Simulate Clickcommand — posts synthetic mouse press+release at given x,y coordinatesDebug: Run Current File as Plugincommand — loads the active buffer as a fully-permissioned Lua pluginDebug: ScreenshotandDebug: Dump Statecommand palette commandsttt.click(x, y),ttt.screenshot(path),ttt.debug(path),ttt.quit()--plugin <file>,--size WxH,--debugTest plan
make buildandmake testpassttt --plugin scripts/test-confirm.lua --size 120x40loads plugin on startupDebug: Screenshotsaves screen text to fileDebug: Dump Statesaves JSON state with widget tree🤖 Generated with Claude Code
https://claude.ai/code/session_018GG9dYw2AG18ro5c2dkPtm