Stop auto-scrolling task logs while the user is selecting text - #70594
Stop auto-scrolling task logs while the user is selecting text#70594Andrushika wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Thanks for the PR, good idea.
Instead of stopping the auto scroll when a pointer is up / down / selecting.
We should instead stop / resume the auto scroll feature depending on if the users is at the bottom (very end of the scroll) or not.
If someone scrolled up a little bit to see something, the auto scroll should also stop.
Even after text selection, if someone scroll back down to the very end of logs, auto scroll should resume.
When a task is running, the log view follows new lines by auto-scrolling to the bottom. It kept following even when the user had scrolled up a little to read something, because "at the bottom" allowed a 100px gap. Lower the gap so scrolling up stops the follow, and returning to the end resumes it.
|
Hi @pierrejeambrun, thanks for reviewing! Your idea sounds great. There’s just one edge case I’d like to confirm: what if the user is already at the bottom of the log but is selecting some log text? IIUC, the expected behavior would be to keep auto-scrolling even while the user is selecting text. But would it be better to pause auto-scrolling in this case? |
While a task streams logs, the view follows new lines by scrolling to the bottom. If the user is selecting text at the bottom, the scroll moves the text out from under the cursor and clears the selection. Skip the follow while a non-empty selection sits inside the log; clearing it resumes.
6c9a22e to
744056e
Compare
I assume this is correct and have updated it into this pattern. Happy to fix if it does not meet the expectation! After: 2026-07-28.10.28.28.mov |
|
The only failed CI is unrelated to this PR. |
UI: Stop auto-scrolling task logs while the user is selecting text
When a task is still running, the task log view scrolls to the bottom every time new lines arrive. If the user is reading or selecting text near the bottom, the jump interrupts them.
This PR skips the auto-scroll while a pointer drag is in progress, and restores it once the drag ends.
Before:
2026-07-28.7.38.24.mov
After:
2026-07-28.7.42.15.mov
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code Opus 4.8 following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.