Skip to content

[OGUI-1924] Fix incorrectly called disable auto scroll - #3675

Merged
isaachilly merged 26 commits into
devfrom
bug/ILG/OGUI-1924/Fix-incorrectly-called-disableAutoScroll
Oct 15, 2026
Merged

isaachilly merged 26 commits into
devfrom
bug/ILG/OGUI-1924/Fix-incorrectly-called-disableAutoScroll

Conversation

@isaachilly

@isaachilly isaachilly commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

Ticket:

Auto-scroll was getting disabled when the table shrunk in size to the point scrollTop would change and the scroll handler would think the user has scrolled up.

Fix this bug as well as any related auto-scroll disable bugs.

Code:
Split up viewport update and onTableScroll listeners as resize doesn't need to concern itself with then if the user scrolled or not.

Guard disabling auto-scroll with a check to see if the table is not at the bottom still. If it is scrollTop decreasing was programmatic and we should ignore it.

Add a new listener for moving up which is more reliable than the scroll event. onTableWheel is called immediately and only on wheel events so we only need to check that the wheel was up and it wasn't part of a zoom action and that we are not at the top/there is something to scroll.

Reviewer:

@isaachilly isaachilly self-assigned this Oct 9, 2026
@isaachilly
isaachilly added this pull request to stack #3676 October 9, 2026 15:34
@isaachilly isaachilly changed the title Bug/ilg/og UI 1924/fix incorrectly called disable auto scroll [OGUI-1924] Fix incorrectly called disable auto scroll Oct 9, 2026
@isaachilly
isaachilly force-pushed the bug/ILG/OGUI-1924/Fix-incorrectly-called-disableAutoScroll branch from 60b018e to f3e6577 Compare October 13, 2026 09:12
@isaachilly
isaachilly marked this pull request as ready for review October 13, 2026 13:23
@isaachilly
isaachilly requested a review from graduta as a code owner October 13, 2026 13:23
Button style, live icon, browser tab title and auto-scroll were set inside the click handler via module-level state, so any mode change not triggered by a click left the UI stale.

Derive them from log.activeMode in the model/view instead.
Hides the autoscroll checkbox unless live mode is actively running.
Replace the autoscroll checkbox with a clearer UI.

Show a success label when enabled and a warning button when disabled, which when clicked re-enables it.
Delete the table's last scrolled log marker when autoscroll is off so re-enabling immediately jumps to the newest logs.
Update and add status bar tests to cover the new enabled/disabled states and re-enable behaviour.
Plain span is 1.5em. .btn-sm is 1.6em.

Give both states the same div box sized to 1.5em.
Adds new setter for autoScrollLive.
Shows a success/warning button in each state.
Drops unneeded CSS.
Rewrites test names and add one for disabling via the button.
Clearing logs or switching from a full query table to an empty live mode table shrinks the table. The scroll handler treated any decrease in `scrollTop` as the user scrolling up and disabled autoscroll.

A decrease now only counts if the view is no longer at the bottom.
Adds tests covering scrolling up, switching from a full query table to an empty live mode table, clearing the logs and zooming in/out.
Add a wheel listener to the log table so upward scrolling immediately disables live auto-scroll.

This was an issue in a CI/CD test where the scroll handler only checks scrollTop after the browser has actually scrolled. If a new log has made the browser jump back to the bottom before the check runs then the scroll is missed and autoScrollLive is kept enabled.
Last commit changed one too many instances of the old waitForScrollPastBottom calls
Update tests to check both scrolling events and wheel events.

Note the scroll race condition in the table auto-scroll logic where scroll listeners may lag behind the viewport update and thus not register and disable autoscroll.
On a second thought the clear button should not take any other action but to clear the table and any secondary actions that need to be taken because of that.
@isaachilly
isaachilly force-pushed the bug/ILG/OGUI-1924/Fix-incorrectly-called-disableAutoScroll branch from f3e6577 to ec2d339 Compare October 13, 2026 13:24
graduta
graduta previously approved these changes Oct 14, 2026
@isaachilly
isaachilly dismissed graduta’s stale review October 15, 2026 07:34

The merge-base changed after approval.

Base automatically changed from improv/ILG/OGUI-1929/Replace-autoScroll-checkbox to dev October 15, 2026 09:33
@isaachilly
isaachilly merged commit d7b93c4 into dev Oct 15, 2026
9 checks passed
@isaachilly
isaachilly deleted the bug/ILG/OGUI-1924/Fix-incorrectly-called-disableAutoScroll branch October 15, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants