Skip to content

Add event timeline histogram with zoom, scope lens, and group-by#650

Merged
NikTilton merged 5 commits into
mainfrom
feat/histogram-timeline
Jul 17, 2026
Merged

Add event timeline histogram with zoom, scope lens, and group-by#650
NikTilton merged 5 commits into
mainfrom
feat/histogram-timeline

Conversation

@jschick04

@jschick04 jschick04 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an event-timeline histogram to the log-table view (ADO 62704677): a compact, toggleable strip above the table that plots event volume over time with WPA-style continuous zoom and horizontal pan, a scope lens that drills the table into a time range, and group-by dimensions (severity / source / event id / task category / opcode / log). Toggle it from View > Timeline; its visibility persists across launches (default on).

What's included

  • WPA-style navigation: cursor-anchored wheel zoom, shift-wheel / scrollbar pan, + / - / Fit toolbar buttons, and keyboard arrows / + / - / Home. The default view fits the whole survivor span; zooming narrows the window and reveals a thin horizontal scrollbar that matches the app.
  • Scope lens (drill-down): Enter (when focused) or the Scope button narrows the log table to the visible time window through the existing filter-lens stack (ShowTimeRange); double-click resets. Zoom is visual navigation, Scope is the explicit filter action (kept distinct and visually cued).
  • Undo zoom: a window-history stack with a toolbar Undo button and right-click; keyboard Enter always scopes.
  • Group-by dimensions: severity (stacked Error / Warning / Normal bands) plus source / event id / task category / opcode / log, rendered as N stacked bands with an Okabe-Ito palette, forced-colors hatching, and clickable legend toggles.
  • Find-hit markers: while in-view Find (Ctrl+F) is active, its matches are drawn as triangles on the histogram's top track (binary-searched per render bin).
  • Accessibility: the timeline is a focusable role=region (roledescription=Timeline) whose aria-label summarizes the entire loaded view (total events, overall time range, group breakdown); pan/zoom updates a debounced visually-hidden aria-live=polite status with the current window's count / range / breakdown, and keyboard bin-cursor navigation announces the focused bin via a visually-hidden aria-live=assertive region. aria-keyshortcuts advertises the commands, and the decorative plot SVG is role=presentation.

Implementation notes

  • Eventing scans survivor-scoped time ticks into per-severity / per-field / per-event-id bucket counts (sealed chunks plus the pending tail, cancellable per chunk) behind the IEventColumnReader seam.
  • Runtime exposes polymorphic IEventColumnView bucketing (single-log views delegate; the combined view aggregates children) and a pure client-side HistogramAggregator that folds base bins into viewport-width render bins with sqrt-scaled stacked-band geometry (1px floor, largest-remainder distribution).
  • The base scan runs on a background, epoch-gated, single-flight path marshalled back to the renderer with InvokeAsync, and a per-session token prevents a disposed pane's in-flight interop from clobbering a re-initialized one.
  • The window is tracked in absolute ticks and is always bin-aligned: follow-latest by default, pinned while zoomed, and re-anchored on live-tail.
  • The Log dimension labels each band by owning-log short name, escalating to a disambiguated short (parent) or full path only when short names collide.

Validation

  • Test suites green across Eventing / Runtime / UI; touched projects build 0 warnings / 0 errors.
  • Governance: pre-implementation and post-code multi-model panels were unanimous during development; a final full-slate panel over the committed diff ran multiple rounds to unanimous convergence, finding and fixing defects including scroll-drift at high bucket resolution, no-op zooms poisoning the undo stack, edge drags bypassing the min-drag threshold, a disjoint reload retaining stale undo history, a tab-switch stale render plus a one-member group, an undo-vs-queued-navigation race resolved with a generation token, culture-invariant event-id keys, a time-zone announcement refresh, and an extreme-zoom track cap.

Manual acceptance (WebView2)

Visual and interaction outcomes automated tests can't verify:

  • Toggle from View > Timeline; visibility persists across relaunch.
  • Wheel zoom (cursor-anchored), shift-wheel / scrollbar pan, + / - / Fit, keyboard navigation; Undo (button and right-click); double-click reset.
  • Scope narrows the table to the window and the scoped state is visually cued.
  • Group-by across severity / source / event id / task category / opcode / log; legend toggles; light / dark / forced-colors.
  • Find-hit markers stay aligned with matches while Find is active.

Copilot AI review requested due to automatic review settings July 16, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a timeline histogram feature to the log table view, including rendering/interaction (zoom/pan/scope), persisted visibility, group-by dimensions, and “Find hit” markers driven by the Find subsystem.

Changes:

  • Introduces a new HistogramPane UI component (Razor/CSS/JS interop) with navigation, scoping into ShowTimeRange, group-by legend, and marker overlays.
  • Adds runtime/eventing support for building and aggregating histograms (bucketing by severity/field/event-id, downsampling, anomaly flagging) plus persisted “Timeline visible” state.
  • Expands test coverage across UI, runtime, and eventing layers for histogram primitives, scaling, summary strings, and Find marker publishing/clearing.

Reviewed changes

Copilot reviewed 58 out of 58 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Unit/EventLogExpert.UI.Tests/TestUtils/LogTablePaneDependenciesExtensions.cs Registers IFindMarkerSource in UI test DI.
tests/Unit/EventLogExpert.UI.Tests/Menu/MenuBarGroupingTests.cs Adds histogram visibility state selection to menu tests.
tests/Unit/EventLogExpert.UI.Tests/LogTable/LogTablePaneFindTests.cs Verifies Find publishes/clears marker ticks via IFindMarkerSource.
tests/Unit/EventLogExpert.UI.Tests/LogTable/FindMarkerSourceTests.cs Unit tests for FindMarkerSource publish/clear behavior.
tests/Unit/EventLogExpert.UI.Tests/Layout/MainContentTests.cs Verifies histogram pane renders conditionally on visibility state.
tests/Unit/EventLogExpert.Runtime.Tests/LogTable/TestSupport/LegacyEventColumnView.cs Extends legacy test view with histogram/time-tick APIs.
tests/Unit/EventLogExpert.Runtime.Tests/Histogram/HistogramSummaryTests.cs Tests accessible summary/announcement string generation.
tests/Unit/EventLogExpert.Runtime.Tests/Histogram/HistogramScaleTests.cs Tests sqrt scaling + stacked pixel allocation behavior.
tests/Unit/EventLogExpert.Runtime.Tests/Histogram/HistogramGroupsTests.cs Tests group key stability/uniqueness semantics.
tests/Unit/EventLogExpert.Runtime.Tests/Histogram/HistogramBuilderTests.cs Tests histogram scan/build across dimensions and combined views.
tests/Unit/EventLogExpert.Runtime.Tests/Histogram/HistogramAggregatorTests.cs Tests downsampling, window snapping, anomalies, and totals.
tests/Unit/EventLogExpert.Runtime.Tests/FilterLenses/FilterLensCommandsTests.cs Adds tests for ShowTimeRange and label conversion edge case.
tests/Unit/EventLogExpert.Eventing.Tests/Common/Events/TimeTicksHistogramTests.cs Validates eventing bucketing/counting/tick-range primitives.
tests/Shared/EventLogExpert.Eventing.TestUtils/Common/Events/LegacyEventColumnReader.cs Implements histogram-related reader APIs for shared tests.
src/EventLogExpert/DependencyInjection/MauiProgramExtensions.cs Registers histogram preferences provider for Maui app.
src/EventLogExpert/Adapters/Settings/HistogramPreferencesAdapter.cs Implements persisted “histogram visible” preference using Preferences.
src/EventLogExpert/Adapters/Menu/MauiMenuActionService.cs Wires menu action to histogram visibility command.
src/EventLogExpert.UI/Menu/MenuBar.razor.cs Adds View > Timeline toggle bound to HistogramState.IsVisible.
src/EventLogExpert.UI/LogTable/LogTablePane.Find.cs Publishes Find match timestamps to IFindMarkerSource.
src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.js New JS interop for pan/zoom/drag/tooltip/backpressure/session gating.
src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.css New styles for histogram pane, legend, markers, forced-colors hatching.
src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.cs New pane logic: scan/build, aggregate/render, navigation history, scoping, markers.
src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor New Razor markup for histogram UI + legend + live announcements.
src/EventLogExpert.UI/LogTable/Find/IFindMarkerSource.cs Defines Find marker source contract (owner + ascending ticks).
src/EventLogExpert.UI/LogTable/Find/FindMarkerSource.cs Singleton implementation raising MarksChanged.
src/EventLogExpert.UI/Layout/MainContent.razor.cs Adds histogram visibility state selection.
src/EventLogExpert.UI/Layout/MainContent.razor Conditionally renders HistogramPane above LogTablePane.
src/EventLogExpert.UI/DependencyInjection/UiServiceCollectionExtensions.cs Registers IFindMarkerSource in UI services.
src/EventLogExpert.UI/_Imports.razor Imports histogram namespace for Razor usage.
src/EventLogExpert.Runtime/Menu/IMenuActionService.cs Adds SetHistogramVisible to menu action interface.
src/EventLogExpert.Runtime/LogTable/IEventColumnView.cs Extends view interface with bucketing/counting/time-tick APIs for histograms.
src/EventLogExpert.Runtime/LogTable/EventColumnView.cs Implements new histogram/time-tick APIs for single-log views.
src/EventLogExpert.Runtime/LogTable/CombinedColumnView.cs Aggregates histogram/time-tick operations across child views.
src/EventLogExpert.Runtime/Histogram/SetHistogramVisibleAction.cs New Fluxor action for histogram visibility.
src/EventLogExpert.Runtime/Histogram/Reducers.cs New reducer to update HistogramState.IsVisible.
src/EventLogExpert.Runtime/Histogram/IHistogramPreferencesProvider.cs Preference provider interface for visibility persistence.
src/EventLogExpert.Runtime/Histogram/IHistogramCommands.cs Command interface for setting histogram visibility.
src/EventLogExpert.Runtime/Histogram/HistogramSummary.cs Generates region label + debounced window announcements.
src/EventLogExpert.Runtime/Histogram/HistogramState.cs New Fluxor feature state for histogram visibility.
src/EventLogExpert.Runtime/Histogram/HistogramScale.cs Sqrt scaling and stacked-segment pixel allocation utilities.
src/EventLogExpert.Runtime/Histogram/HistogramRender.cs Render model types for aggregated bins/totals/anomalies.
src/EventLogExpert.Runtime/Histogram/HistogramGroups.cs Defines severity groups and category grouping generator.
src/EventLogExpert.Runtime/Histogram/HistogramDimension.cs Defines histogram group-by dimensions.
src/EventLogExpert.Runtime/Histogram/HistogramData.cs Defines scanned base histogram data representation.
src/EventLogExpert.Runtime/Histogram/HistogramConstants.cs Defines histogram bucket/category caps.
src/EventLogExpert.Runtime/Histogram/HistogramCommands.cs Dispatches visibility action.
src/EventLogExpert.Runtime/Histogram/HistogramBuilder.cs Builds histogram base data by scanning the active view.
src/EventLogExpert.Runtime/Histogram/HistogramAggregator.cs Downsamples base bins into render bins; flags anomalies.
src/EventLogExpert.Runtime/Histogram/Effects.cs Persists visibility preference and hydrates on store init.
src/EventLogExpert.Runtime/FilterLenses/IFilterLensCommands.cs Adds ShowTimeRange command to lens API.
src/EventLogExpert.Runtime/FilterLenses/FilterLensFactory.cs Adds factory for inclusive UTC time-range lens.
src/EventLogExpert.Runtime/FilterLenses/FilterLensCommands.cs Implements ShowTimeRange by pushing a time-range lens.
src/EventLogExpert.Runtime/DependencyInjection/RuntimeServiceCollectionExtensions.cs Registers IHistogramCommands in runtime DI.
src/EventLogExpert.Eventing/Common/Events/LevelSeverity.cs Adds dense severity slot helpers for histogram bucketing.
src/EventLogExpert.Eventing/Common/Events/IEventColumnReader.cs Extends reader interface with histogram bucketing/counting/time-tick APIs.
src/EventLogExpert.Eventing/Common/Events/EventColumnStoreReader.cs Implements new reader APIs over EventColumnStore.
src/EventLogExpert.Eventing/Common/Events/EventColumnStore.cs Implements survivor-scoped bucketing/counting and time-tick span.
src/EventLogExpert.Eventing/Common/Events/EventColumnPool.cs Adds TryGetIndex to resolve pooled strings for fast bucketing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor Outdated
Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor Outdated
Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor Outdated
Copilot AI review requested due to automatic review settings July 16, 2026 21:18
@jschick04
jschick04 force-pushed the feat/histogram-timeline branch from 3c201fa to ac9e609 Compare July 16, 2026 21:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 58 out of 58 changed files in this pull request and generated 4 comments.

Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.js
Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.cs
Comment thread src/EventLogExpert.UI/LogTable/Find/FindMarkerSource.cs
Comment thread src/EventLogExpert.Runtime/Histogram/HistogramScale.cs
Copilot AI review requested due to automatic review settings July 16, 2026 22:07
@jschick04
jschick04 force-pushed the feat/histogram-timeline branch from ac9e609 to 594dfa1 Compare July 16, 2026 22:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 58 out of 58 changed files in this pull request and generated 1 comment.

Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.css Outdated
Copilot AI review requested due to automatic review settings July 16, 2026 22:58
@jschick04
jschick04 force-pushed the feat/histogram-timeline branch from 594dfa1 to 46a246e Compare July 16, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jschick04
jschick04 marked this pull request as ready for review July 16, 2026 23:08
@jschick04
jschick04 requested a review from a team as a code owner July 16, 2026 23:08
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Some pipeline(s) encountered errors during trigger evaluation.

Copilot AI review requested due to automatic review settings July 17, 2026 01:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.cs
Comment thread src/EventLogExpert.Runtime/Histogram/HistogramBuilder.cs Outdated
Copilot AI review requested due to automatic review settings July 17, 2026 01:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 61 out of 61 changed files in this pull request and generated 3 comments.

Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.js
Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor.js
Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor Outdated
Copilot AI review requested due to automatic review settings July 17, 2026 02:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread src/EventLogExpert.Runtime/FilterLenses/FilterLensFactory.cs Outdated
Comment thread src/EventLogExpert.UI/LogTable/Histogram/HistogramPane.razor
Copilot AI review requested due to automatic review settings July 17, 2026 03:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 64 out of 64 changed files in this pull request and generated no new comments.

@NikTilton
NikTilton merged commit 277448f into main Jul 17, 2026
8 checks passed
@NikTilton
NikTilton deleted the feat/histogram-timeline branch July 17, 2026 15:53
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.

3 participants