Conversation
Contributor
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Summary
Follow-up to merged #1143. Paced wheel roundtrips now restore the clicked line, but wheel-up events arriving in one stdin burst can return the viewport without completing the cursor unwind. Reproduced by clicking R2, scrolling down five times with redraws between events, returning with five wheel-up events in one write, and pressing
c: the original implementation opened a draft at R4.This stays in the existing terminal cursor/viewport planning path; it adds no review semantics, protocol, dependencies, or public API.
Verification
On Linux, after rebasing onto current main:
bun run typecheck— passed.bun run test— 4,792 passed, 13 skipped, zero failures across both shards.bun test packages/hunk/src/ui/lib/lineCursors.test.ts test/pty/comment-target.test.ts— 48 passed, including all seven comment-target PTY cases.bun run test:tty-smoke— 10 passed.bun run test:integration— 223 passed, one skipped, six existing pager failures. Reproduced the same six failures withbun test test/pty/pager.test.tson main atb237c18c(six passed, six failed); the failures concern pager chrome/navigation, not cursor restoration.git diff --check— passed.macOS and Windows were not tested locally.
Real-UI demo
Verified in the actual Hunk TUI in a Herdr pane (121 columns × 66 terminal rows, split mode,
github-dark-default, visible line numbers, no sidebar). Compared a 160-line TypeScript file pair using the modified source:Clicked right-side line 2, sent 25 paced wheel-down events, returned with one 25-event wheel-up burst, and pressed
c. The draft remained anchored at R2. Also verified that opening a draft before scrolling targeted R2. The live demo was shown to the user; no screenshot/video attachment was recorded.This PR description was generated by Pi using GPT-6.1-sol