Add Related Activity ID sibling and parent-activity lenses#644
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the filter-lens feature to support navigation and grouping based on RelatedActivityId, adding two new context-menu actions: one to show sibling events sharing the same RelatedActivityId, and one to jump to the parent activity’s events (where ActivityId == RelatedActivityId). It also refactors lens creation/dispatch to reuse a single “exclude-of-complement” encoding for nullable-Guid equality narrowings, and adds tests to lock in the intended semantics.
Changes:
- Add two new lens commands: “Show Events Sharing Related Activity ID” and “Show Parent Activity”, both gated on
RelatedActivityId.HasValueand tagged withOwningLogfor auto-clear. - Refactor lens construction via
FilterLensFactory.BuildEqualityLensand centralize push/dispatch null-guarding inFilterLensCommands.PushLens. - Expand unit coverage to validate parent-jump field mapping and that absent
RelatedActivityIdrows are hidden (not leaked) under the totalNotEqualsemantics.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/EventLogExpert.Runtime.Tests/FilterLenses/FilterLensCommandsTests.cs | Adds command-level tests for the two new lens commands (dispatch behavior, labels, null no-op, origin log tagging). |
| tests/Unit/EventLogExpert.Runtime.Tests/FilterLenses/EffectiveFilterBuilderTests.cs | Adds compose tests proving parent-jump narrows by ActivityId (not RelatedActivityId) and that absent RelatedActivityId is hidden under the exclude-of-complement encoding. |
| tests/Shared/EventLogExpert.Filtering.TestUtils/FilterEventBuilder.cs | Extends test event construction to set ResolvedEvent.RelatedActivityId. |
| src/EventLogExpert.UI/LogTable/LogTablePane.razor.cs | Adds two new context-menu items that invoke the new lens commands, gated on RelatedActivityId.HasValue. |
| src/EventLogExpert.Runtime/FilterLenses/IFilterLensCommands.cs | Extends the commands interface with ShowParentActivity and ShowRelatedByRelatedActivityId. |
| src/EventLogExpert.Runtime/FilterLenses/FilterLensFactory.cs | Refactors lens creation into a shared BuildEqualityLens and introduces ForRelatedActivityId; adds optional label override to ForActivityId. |
| src/EventLogExpert.Runtime/FilterLenses/FilterLensCommands.cs | Implements the new commands and extracts a shared PushLens helper for null-guarded dispatch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
NikTilton
approved these changes
Jul 13, 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.
What
Extends the filter-lens stack with two RelatedActivityId-driven lenses, reachable from the event context menu:
RelatedActivityId(siblings of the same parent/correlation activity). Encoded as an exclude ofRelatedActivityId != X; becauseNotEqualon the nullable-Guid column is total, absent-RelatedActivityIdrows are hidden, not leaked.ActivityIdequals this event'sRelatedActivityId. Reuses theActivityIdlens with a distinct "Parent Activity = {guid}" chip label.Both are gated on
RelatedActivityId.HasValue, threadOwningLogfor owning-log auto-clear, and are transient/reversible like the existing Activity-ID lens.Refactor
FilterLensFactory.BuildEqualityLenssoForActivityId,ForRelatedActivityId, and the parent jump share the single exclude-of-complement (total-operator) encoding.ForActivityIdgains an optional display-onlylabelparam (defaults to prior behavior).FilterLensCommands.PushLens(shared dispatch guard).Tests
Adds compose tests empirically proving (A) absent-
RelatedActivityIdis hidden and (B) the parent jump narrows byActivityId(keeps the parent, not the child), plus command tests for both new commands (label/field discriminators, null no-op, owning-log tagging). Runtime 1687, UI 1038; Release build clean.