Skip to content

fix: resolve dashboard error trend indicators and add regression test…#157

Merged
georgidhristov merged 2 commits into
DebugProbe:mainfrom
DevSars24:feature/dashboard-trend-indicators
Jul 19, 2026
Merged

fix: resolve dashboard error trend indicators and add regression test…#157
georgidhristov merged 2 commits into
DebugProbe:mainfrom
DevSars24:feature/dashboard-trend-indicators

Conversation

@DevSars24

Copy link
Copy Markdown
Contributor

This PR fixes the bug in our dashboard's error trend indicators where they were constantly stuck or overcorrecting to a neutral (→) state, especially when older metrics data was evicted from the store.

Now, the trend arrows dynamically and accurately reflect whether things are getting worse (↑ red) or improving (↓ green), even when partial or full data eviction happens. I've verified the UI manually, and it works flawlessly now!

-> File-by-File Changes
HtmlRenderer.cs

Updated the core window-boundary evaluation and trend calculation logic. Fixed the bug where the renderer failed to compute the correct direction once the historical comparison base shifted or got evicting from memory.

debugprobe.css & index.html

Adjusted the asset styling and HTML rendering bindings to support proper visual updates for the dynamic arrow indicators (↑, ↓, →).

DebugProbeOptions.cs & DebugProbeOptionsValidator.cs

Updated options structures and validation parameters to seamlessly support the trend window configuration changes without breaking any existing middleware configuration.

HtmlRendererTrendTests.cs (New Test File)

Added a complete set of regression unit tests covering the exact scenario that broke earlier (full-eviction causing a fallback to neutral). This ensures the trend arrows won't silently regress in future builds.

-> Verification & Testing Done
Manual Verification: Tested both the error spike scenario (50% ERRORS, ↑) and the recovery baseline (20% ERRORS, ↓). Both render correctly now.

Automated Tests: Ran dotnet test, and all the test suites (including the new regression unit tests) are passing perfectly with zero errors.
Screenshot 2026-07-16 185428

@georgidhristov
georgidhristov merged commit 331e539 into DebugProbe:main Jul 19, 2026
1 check passed
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.

2 participants