Add a time-window filter lens (Show Events Near This Time)#645
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new transient “time-window” filter lens that can be pushed from an event row’s context menu (“Show Events Near This Time”), narrowing the grid to an inclusive centered window around the clicked event and presenting a removable breadcrumb chip.
Changes:
- Introduces
FilterLensFactory.ForTimeWindow(...)to build a validated, clamped centered[T-d, T+d]time-window lens with a compact chip label. - Adds
IFilterLensCommands.ShowEventsNearTime(...)and implements it inFilterLensCommandsto push the new lens through the existing lens stack pipeline. - Wires a new context-menu submenu in
LogTablePaneand adds unit tests covering bounds, chip formatting, dispatch behavior, and validation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/EventLogExpert.Runtime.Tests/FilterLenses/FilterLensCommandsTests.cs | Adds command-level tests for dispatch, chip label formatting, bounds, and validation behavior. |
| tests/Unit/EventLogExpert.Runtime.Tests/FilterLenses/EffectiveFilterBuilderTests.cs | Adds an end-to-end composition test proving inclusive bounds and source-event survival within the time window. |
| src/EventLogExpert.UI/LogTable/LogTablePane.razor.cs | Adds the “Show Events Near This Time” submenu with five fixed durations. |
| src/EventLogExpert.Runtime/FilterLenses/IFilterLensCommands.cs | Extends the lens command interface with ShowEventsNearTime. |
| src/EventLogExpert.Runtime/FilterLenses/FilterLensFactory.cs | Implements the time-window lens factory and radius formatting. |
| src/EventLogExpert.Runtime/FilterLenses/FilterLensCommands.cs | Implements the new command by pushing a factory-built time-window lens. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
NikTilton
approved these changes
Jul 14, 2026
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.
Summary
Adds a transient, reversible time-window filter lens surfaced as a "Show Events Near This Time" context-menu submenu on an event row. Selecting a duration pushes a lens that narrows the event table to a centered window
[TimeCreated - d, TimeCreated + d]and drops a removable breadcrumb chip (for exampleNear 2:03:22 PM +/-5m). Like the other lenses it never mutates the saved/persistent filter and pops off cleanly.This completes the Wave-2 lens set alongside the merged Filter Stack (#643) and Related Activity ID lenses (#644). It is a genuinely new "zoom into the time neighborhood of an event, look around, then pop back" gesture, distinct from the existing persistent "Exclude Events Before/After" items.
Tracks ADO 62704670.
Durations
Five fixed centered windows:
+/-30s,+/-1m,+/-5m,+/-15m,+/-1h(capped at 1 hour; day-scale browsing remains the persistent date range's job).Design
Informed by a 5-reviewer UX design panel:
Implementation
FilterLensFactory.ForTimeWindow- builds the windowedFilterLens; bounds clamped to theDateTimerange (boundary arithmetic throws on overflow), radius validated to(0, 1 hour]and whole seconds, chip suffix rendered losslessly.IFilterLensCommands.ShowEventsNearTime/FilterLensCommands- dispatches the lens via the existing push path.LogTablePane- the "Show Events Near This Time" submenu (5 durations), no gating (every event has a timestamp).Tests
MinValueanchor clamp (no throw), radius-contract rejection (zero / negative / >1h / sub-second).Validation
Runtime.Tests 1702/1702, UI.Tests 1038/1038, full-solution Release build 0 warnings / 0 errors.