Skip to content

Respect View Tree automatic scrolling preference - #291

Merged
jgaalen merged 3 commits into
mainfrom
codex/fix-view-tree-auto-scroll
Nov 10, 2026
Merged

jgaalen merged 3 commits into
mainfrom
codex/fix-view-tree-auto-scroll

Conversation

@jgaalen

@jgaalen jgaalen commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

When “Scroll automatically” is unchecked, incoming results preserve the selected sampler and anchor the active tree or table viewport to its first visible result. Evicting older results therefore keeps the visible content in place. If the anchor disappears, the previous offset is clamped to the new content size, including after filtering.

Live validation following respects the checkbox. Automatic tree expansion is cleaned up during validation updates even when the table tab is active, while manually expanded branches are preserved.

Motivation and Context

Live validation previously selected and scrolled to the newest sampler even with automatic scrolling disabled, preventing users from inspecting an earlier result while a run continued.

This intentionally changes validation's default behavior: the checkbox defaults to off, including in existing plans without an enabled setting. Those plans no longer automatically select or expand new validation results. Enable “Scroll automatically” to follow the latest validation sampler. This makes the saved preference apply consistently to validation runs.

How Has This Been Tested?

  • ./gradlew :src:components:test --tests org.apache.jmeter.visualizers.ViewResultsFullVisualizerTest :src:components:checkstyleMain :src:components:checkstyleTest autostyleCheck — passed; 64 tests, no failures or skips.
  • Regression coverage verifies selection and viewport preservation during normal and validation runs, after switching automatic scrolling off, when the selected sampler completes, and when no sampler is selected.
  • Tree and table coverage fills the result buffer to its limit (2500 by default), appends a live result to evict the oldest, and verifies that the selected visible content retains its position.
  • Filter coverage verifies viewport clamping with both a retained and a removed anchor.
  • Validation coverage verifies that table-mode updates clear automatic tree expansion while preserving manual expansion.
  • Existing follow-latest tests explicitly enable automatic scrolling.
  • git diff --check — passed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the existing style of this project.
  • I have updated the documentation accordingly. (No documentation changes needed.)
  • I have run the relevant tests, or explained why they were not run.
  • I have read and accept the Contributor License Agreement for this contribution.

@jgaalen
jgaalen merged commit 34b7e39 into main Nov 10, 2026
11 checks passed
@jgaalen
jgaalen deleted the codex/fix-view-tree-auto-scroll branch November 10, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant