Fix stale highlight-tie masks and ARIA briefly rendered during async disarm#667
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Addresses a transient UI/accessibility glitch in the histogram highlight-tie feature where stale group-highlight masks (and related ARIA/live-region text) could briefly render during an async disarm/reconfigure window.
Changes:
- Synchronously invalidates
HistogramData.GroupHighlightMaskson highlight-tie rescan-triggering transitions to prevent stale/mis-mapped highlight styling during the async gap. - Centralizes and consistently refreshes the cached assertive live-region bin announcement on all highlight changes.
- Fixes a scan-epoch supersede edge case by bumping
_scanEpocheven whenStartScanearly-returns for a zero-size viewport, and tightens publish cancellation checks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.cs | Clears highlight masks synchronously during rescan transitions, refreshes cached bin announcement consistently, and hardens scan supersede/publish cancellation behavior. |
| tests/Unit/EventLogExpert.UI.Tests/LogTable/Histogram/HistogramPaneTests.cs | Adds bUnit coverage for synchronous mask invalidation, cached-ARIA refresh behavior, and the zero-viewport scan-epoch bump. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…disarm (#659) The scenario histogram's highlight-tie refresh reassigned _tieHighlightFilters synchronously but replaced _baseData (and its GroupHighlightMasks) only when a background scan completed. On a disarm transition the mask-free scan did not clear _baseData synchronously, so a render in the gap mapped the old armed mask ordinals through the new (unarmed) filter list, briefly flashing stale or mis-mapped group-highlight styling and ARIA. Fixes: - Invalidate the stale GroupHighlightMasks synchronously on the rescan branch of RefreshTieFilters (covering disarm and an armed reconfigure whose eligible-list reorder remaps the old ordinals), so the render is mask-free until the correct masks republish. - Refresh the cached assertive-region bin announcement (which embeds the highlight description) on every highlight change via a shared helper, so a disarm, plan change, or color-only edit does not leave the live region announcing a stale highlight after the cursor is dismissed. - Bump the scan epoch before StartScan's zero-viewport early return and recheck the cancellation token when publishing, so a queued armed-scan publication cannot restore the just-cleared masks (a color-only disarm keeps the same predicate plan key, so the epoch bump is what supersedes it). Adds bUnit coverage for the synchronous mask clear (viewport pinned so no scan publishes), the cached-announcement refresh on both the rescan and non-rescan paths, and the zero-viewport epoch bump.
jschick04
force-pushed
the
jschick/histogram-highlight-tie-disarm
branch
from
July 24, 2026 03:16
96630c2 to
0b07793
Compare
jschick04
marked this pull request as ready for review
July 24, 2026 03:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #659.
Problem
The scenario histogram's highlight-tie refresh (
HistogramPane.RefreshTieFilters) reassigns_tieHighlightFilterssynchronously, but the histogram data (_baseData, includingGroupHighlightMasks) is only replaced when a background scan completes. On a disarm transition (the last highlight color is cleared, or the eligible filter count crosses 31), the mask-free scan does not clear_baseDatasynchronously, so a re-render in the gap maps the old armed mask ordinals through the new (unarmed) filter list -- briefly flashing stale or mis-mapped group-highlight styling and the corresponding ARIA. Transient, self-healing, visual/accessibility only.Fixes
RefreshTieFiltersrescan branch, clear_baseData.GroupHighlightMasksimmediately (viawith { ... = null }) so the render is mask-free until the correct masks republish. Covers disarm and an armed reconfigure whose eligible-list reorder remaps the old ordinals.RefreshBinAnnouncement()helper now re-derives it on every highlight change (both the rescan and non-rescan paths ofRefreshTieFilters), so a disarm, plan change, or color-only edit does not leave the live region announcing a stale highlight after the cursor is dismissed.StartScanbumped the scan epoch only after its zero-viewport early return, so a queued armed-scan publication could restore the just-cleared masks (a color-only disarm keeps the same predicate plan key, so the epoch bump is what supersedes it). The epoch is now bumped before the early return, and the publish path rechecks the cancellation token.Testing
bUnit coverage in
HistogramPaneTests:GroupHighlightMaskssynchronously (viewport pinned to 0 so no background scan can publish and mask the result).StartScanstill bumps the scan epoch.Full-solution build: 0 warnings / 0 errors. UI unit tests: 1190/1190.