Conversation
… change detection Adds --await-change and --settle flags to the snapshot command, eliminating the need for manual sleep() calls in TUI automation scripts. Features: - --await-change <HASH>: Block until content_hash differs from baseline - --settle <MS>: Wait for screen to be stable for N ms (handles progressive renders) - --timeout <MS>: Maximum wait time (default: 30s) prevents infinite loops Implementation: - Two-phase polling in handle_snapshot: await change, then settle - Hash tracking across phases (settle starts from await_change exit point) - 50ms poll interval (SNAPSHOT_POLL_INTERVAL_MS constant) - Timeout errors use configured timeout_ms value (not elapsed time) - Timeout errors include helpful suggestions and context for debugging - Client-side hash tracking keeps server stateless Usage: HASH=$(pilotty snapshot | jq '.content_hash') pilotty key Enter pilotty snapshot --await-change $HASH --settle 50 Addresses Pain Point #4: Manual sleep required between actions. Includes: - Protocol changes with serde(default) for backward compatibility - CLI args with comprehensive help text and examples - Test: test_snapshot_await_change_detects_update - Documentation updates to README, SKILL.md, and npm README Reviewed by Oracle: Fixed hash tracking across phases, improved error messages.
a7660ae to
2fdf7a3
Compare
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.
No description provided.