Skip to content

Add Related Activity ID sibling and parent-activity lenses#644

Merged
jschick04 merged 1 commit into
mainfrom
feat/related-activity-id-lens
Jul 13, 2026
Merged

Add Related Activity ID sibling and parent-activity lenses#644
jschick04 merged 1 commit into
mainfrom
feat/related-activity-id-lens

Conversation

@jschick04

Copy link
Copy Markdown
Collaborator

What

Extends the filter-lens stack with two RelatedActivityId-driven lenses, reachable from the event context menu:

  • Show Events Sharing Related Activity ID - narrows to events that share this event's RelatedActivityId (siblings of the same parent/correlation activity). Encoded as an exclude of RelatedActivityId != X; because NotEqual on the nullable-Guid column is total, absent-RelatedActivityId rows are hidden, not leaked.
  • Show Parent Activity - jumps to the parent activity's events: those whose ActivityId equals this event's RelatedActivityId. Reuses the ActivityId lens with a distinct "Parent Activity = {guid}" chip label.

Both are gated on RelatedActivityId.HasValue, thread OwningLog for owning-log auto-clear, and are transient/reversible like the existing Activity-ID lens.

Refactor

  • Extracted FilterLensFactory.BuildEqualityLens so ForActivityId, ForRelatedActivityId, and the parent jump share the single exclude-of-complement (total-operator) encoding.
  • ForActivityId gains an optional display-only label param (defaults to prior behavior).
  • Extracted FilterLensCommands.PushLens (shared dispatch guard).

Tests

Adds compose tests empirically proving (A) absent-RelatedActivityId is hidden and (B) the parent jump narrows by ActivityId (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.

Copilot AI review requested due to automatic review settings July 13, 2026 20:44

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

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.HasValue and tagged with OwningLog for auto-clear.
  • Refactor lens construction via FilterLensFactory.BuildEqualityLens and centralize push/dispatch null-guarding in FilterLensCommands.PushLens.
  • Expand unit coverage to validate parent-jump field mapping and that absent RelatedActivityId rows are hidden (not leaked) under the total NotEqual semantics.

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.

@jschick04 jschick04 marked this pull request as ready for review July 13, 2026 20:51
@jschick04 jschick04 requested a review from a team as a code owner July 13, 2026 20:51
@jschick04 jschick04 merged commit c06d463 into main Jul 13, 2026
8 checks passed
@jschick04 jschick04 deleted the feat/related-activity-id-lens branch July 13, 2026 20:57
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