Skip to content

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jul 30, 2025

Description

I noticed that scrolling to the bottom of main page content was broken on structured logs and traces. This broke in the most recent FluentUI update.

Also, when scrolling these grids the scroll bar position scrolling jumps around a lot. I think this bug has been around a while.

This PR improves scrolling behavior:

  • Add large overscan to pages to reduce scrolling jumps
  • Changing "scroll to the bottom of the page" flag no longer happens in resize event
  • Reset "scroll to the bottom of the page" flag when there is no scroll bar

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes automatic scrolling behavior on the Aspire Dashboard's main content pages, specifically addressing broken scroll-to-bottom functionality on structured logs and traces that occurred after a FluentUI update. The changes improve scrolling stability by reducing scroll position jumps and properly handling edge cases.

Key changes:

  • Enhanced scroll detection logic to handle container resize events and eliminate false positives
  • Added large overscan buffers to virtualized grids to reduce scrolling jumps during data updates
  • Improved state management for scroll-to-bottom behavior with better edge case handling

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Aspire.Dashboard/wwwroot/js/app.js Core scrolling logic improvements with better state management and null handling
src/Aspire.Dashboard/Components/Pages/Traces.razor Added OverscanCount=100 to reduce scroll jumps in traces grid
src/Aspire.Dashboard/Components/Pages/TraceDetail.razor Added OverscanCount=100 to reduce scroll jumps in trace details grid
src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor Added OverscanCount=100 to reduce scroll jumps in logs grid
src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor.cs Added trace logging for debugging data updates
src/Aspire.Dashboard/Components/Pages/Resources.razor Added OverscanCount=100 to reduce scroll jumps in resources grid

@adamint
Copy link
Member

adamint commented Jul 31, 2025

Doesn't seem to work for structured logs?

Grabacion.de.pantalla.2025-07-31.a.la.s.12.36.10.p.m.mov

@JamesNK
Copy link
Member Author

JamesNK commented Jul 31, 2025

I don’t understand your video. Structured logs is correctly scrolled to the bottom when the page is navigated to or refreshed in it.

what is it showing that doesn’t work?

@adamint adamint enabled auto-merge (squash) August 6, 2025 18:20
@adamint adamint merged commit 70e18bb into main Aug 6, 2025
821 of 825 checks passed
@adamint adamint deleted the jamesnk/continious-scroll-fix branch August 6, 2025 23:08
@dotnet-policy-service dotnet-policy-service bot added this to the 9.5 milestone Aug 6, 2025
@JamesNK
Copy link
Member Author

JamesNK commented Aug 6, 2025

/backport to release/9.4

Copy link
Contributor

github-actions bot commented Aug 6, 2025

Started backporting to release/9.4: https://github.com/dotnet/aspire/actions/runs/16791008233

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants