Repository navigation
fix(tui): clear stale jump prompt after collapsing - #66812
Open
Qwara-chan wants to merge 1 commit into
Open
Qwara-chan wants to merge 1 commit into
Qwara-chan wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
The change looks good. I reproduced the stale Jump to latest ↓ pill on the base with the script from #66799 (simulated model; expand the activity group and outputs, scroll down then up, collapse). With this PR the pill is gone once the transcript fits. The anchor tests pass, and the new test fails on the base without the runtime change.
The swap keeps the anchor saving: updateAwayFromBottom still ends in saveScrollAnchor(), just one tick later. The stickyScroll/hiddenRows reset it does at the bottom matches what scrolling to the bottom already does.
The public API is unchanged.
No concerns.
This branch has not been deployed
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.


Issue for this PR
Closes #66799
Type of change
What does this PR do?
Recomputes the away-from-bottom state after an activity group is expanded or collapsed and laid out. When collapsing makes the whole transcript fit, the stale
Jump to latestpill now disappears. The existing scroll-anchor save still runs throughupdateAwayFromBottom.Adds a regression test that expands the only activity group, scrolls away from the bottom, then collapses it and checks that the prompt is gone.
How did you verify your code works?
cd packages/tui && bun test --timeout 30000 test/session-activity-anchor.test.tsx --rerun-each 10: 50 passed.cd packages/tui && bun test --timeout 30000: 1774 passed, 2 skipped.bun run check: passed.The new regression test fails without the one-line runtime change.
Screenshots / recordings
No manual recording; the before/after behavior is covered by the renderer regression test.
Checklist