test(pty): observe highlight input responsiveness - #899
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR revises the large-diff PTY responsiveness test to observe PageDown-driven viewport movement rather than Tuistory’s idle timer.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking timing-dependence in the new pre-highlight assertion that could produce CI flakes on faster runners. The viewport-based navigation check is stronger than the removed idle-timer measurement, but requiring highlighting to remain unfinished after a fixed 25 ms delay makes the test sensitive to worker completion speed. Files Needing Attention: test/pty/highlighting.test.ts Important Files Changed
Prompt To Fix All With AI### Issue 1
test/pty/highlighting.test.ts:56-59
**Fixed delay races highlighting**
The assertion requires highlighting to remain incomplete after a fixed 25 ms delay, so a faster worker causes an otherwise healthy implementation to fail this integration test. Synchronizing on observable application state instead would avoid reintroducing a timing-dependent CI failure.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "test(pty): observe highlight input respo..." | Re-trigger Greptile |
1 task
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.
Problem
The large-diff responsiveness PTY test times
await session.press("down")and requires it to finish in under 500 ms. Tuistory implementspress()by writing the key and then waiting up to 500 ms for terminal idleness, so normal timer overhead can produce results such as 500.4 ms. The elapsed time also does not prove Hunk processed the key: Tuistory resolves when its fallback timer expires.This caused the unrelated CI failure observed on #896.
Approach
sendKey("pagedown");The test now observes Hunk processing and painting navigation instead of measuring a dependency's idle timer. A synchronous multi-second highlighting regression still fails the bounded viewport assertion, while a legitimately faster worker does not fail a precondition.
No runtime code changes.
Validation
bun run test:integration— 135 passed, 1 platform skipbun run typecheckbun run lintbun run format:checkbun run check:docsbun run check:changelogbun run deps:checkbun run test— 1,717 passed, 8 skipped, with one existing local environment failure inregisterHostRuntimeModules > does not claim bare specifiers outside registered extension directoriesThis PR description was generated by Pi using GPT-5.6 Sol