Skip to content

Add a Details Pane reader view with decoded fields and severity#647

Merged
NikTilton merged 1 commit into
mainfrom
feat/details-pane-v2
Jul 14, 2026
Merged

Add a Details Pane reader view with decoded fields and severity#647
NikTilton merged 1 commit into
mainfrom
feat/details-pane-v2

Conversation

@jschick04

@jschick04 jschick04 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a structured reader view to the Details Pane and redesigns its layout (ADO 62704693).

  • Reader view - a Reader | XML tab strip. The Reader decodes structured EventData/UserData (named fields, arrays one-per-line, hex preview for binary, muted placeholders for empty/null), with optional inline explanations (a LogonType value decoder + a small curated Security-Auditing glossary) and per-field / per-section / whole-event copy.
  • Two-region layout - the wide-short pane splits into a metadata rail (identity + Level severity + a correlation block + collapsible System) beside a payload region (Message + multi-column Event Data + User Data), collapsing to one column when narrow. Uniform two-size typography; stacked field rows so long field names never truncate; EventData packs into at most three columns.
  • Level severity - a small coloured dot on Error/Warning that mirrors the log table exactly, via a new shared LevelSeverity.FromLevelName parse that the log table's GetLevelClass now consumes too (single source, no drift).
  • Correlation lenses - "Show related events" / "Show parent activity" buttons that reuse the existing IFilterLensCommands (the same commands the row context menu drives).
  • The pane stays closed until an event is clicked (restored the prior committed behaviour).

Validation

  • Test suites all green: Eventing 639, Runtime 1753, UI 1070. Every touched project builds with 0 warnings / 0 errors.
  • Governance: pre-implementation multi-model panel 5/5 DESIGN_READY, post-code panel 5/5 CODE_REVIEW_READY, plus a 5/5 delta review on the closed-until-clicked fix.

Manual acceptance still needed (WebView2)

Visual outcomes automated tests can't verify - please check in the running app:

  • Split boundary around 46rem and the single-column fallback at half-window.
  • Payload column tiers (2 cols >= 46rem, 3 cols >= 70rem payload; caps at 3; field names do not truncate).
  • Pane dragged to min-height (20%); 125% / 150% OS text scaling.
  • A very long provider message (stays elastic, no nested scroller) and a dense EventData + UserData event.

Copilot AI review requested due to automatic review settings July 14, 2026 15:19

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 adds a structured “Reader” view to the Details Pane (with a Reader | XML tab strip) that formats decoded EventData/UserData fields, enables per-field/section/event copy, and introduces correlation “lens” actions. It also centralizes level→severity parsing in LevelSeverity.FromLevelName so the Details Pane’s severity dot and the Log Table’s level styling share a single source of truth.

Changes:

  • Add a new Details Pane Reader view model/formatter + field explainer/decoder (with clipboard text builders).
  • Redesign Details Pane UI layout/CSS (two-region rail/payload, container queries, copy controls, correlation actions, Reader/XML tabs).
  • Refactor log-table level CSS class mapping to use shared LevelSeverity.FromLevelName, plus add/extend unit test coverage and test utilities.

Reviewed changes

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

Show a summary per file
File Description
tests/Unit/EventLogExpert.UI.Tests/LogTable/LogTablePaneLevelClassTests.cs Adds coverage pinning the refactored level→class mapping behavior.
tests/Unit/EventLogExpert.UI.Tests/EventLogExpert.UI.Tests.csproj Adds reference to shared Eventing test utilities.
tests/Unit/EventLogExpert.UI.Tests/DetailsPane/DetailsPaneTests.cs Adds bUnit tests for Reader/XML behavior, copy actions, correlation buttons, and pane expand/collapse behavior.
tests/Unit/EventLogExpert.Runtime.Tests/DetailsPane/EventFieldExplainerTests.cs Adds tests for glossary/decoder behavior and logon-type decoding rules.
tests/Unit/EventLogExpert.Runtime.Tests/DetailsPane/DetailsReaderFormatterTests.cs Adds tests for Reader model projection and copy-text formatting rules.
tests/Unit/EventLogExpert.Eventing.Tests/Common/Events/LevelSeverityTests.cs Adds tests for strict/case-sensitive FromLevelName parsing.
tests/Unit/EventLogExpert.Eventing.Tests/Common/Events/EventFieldValueTests.cs Adds tests for new TryGetBytes / TryGetArray accessors.
tests/Shared/EventLogExpert.Eventing.TestUtils/EventDataTestFactory.cs Extends factory to generate unaligned EventData and support general arrays.
src/EventLogExpert.UI/LogTable/LogTablePane.razor.cs Refactors GetLevelClass to use LevelSeverity.FromLevelName.
src/EventLogExpert.UI/DetailsPane/DetailsPane.razor.css Replaces the old Details Pane styling with the new Reader layout, tabs, copy controls, and responsive behavior.
src/EventLogExpert.UI/DetailsPane/DetailsPane.razor.cs Implements Reader/XML state, clipboard actions, correlation lens actions, time-zone rebuild, and restored “closed until click” behavior.
src/EventLogExpert.UI/DetailsPane/DetailsPane.razor Replaces the old Details Pane markup with Reader/XML tabbed UI, rail/payload layout, and copy/correlation UI.
src/EventLogExpert.UI/DetailsPane/DetailsFieldRow.razor.css Adds styles for stacked field rows, truncation affordance, decoded labels, and per-field copy.
src/EventLogExpert.UI/DetailsPane/DetailsFieldRow.razor Adds a reusable component for rendering a single decoded/truncated/copyable field row.
src/EventLogExpert.UI/_Imports.razor Imports EventLogExpert.Runtime.DetailsPane types for UI components.
src/EventLogExpert.Runtime/DetailsPane/EventFieldExplanation.cs Introduces the explanation model (decoded label + description).
src/EventLogExpert.Runtime/DetailsPane/EventFieldExplainer.cs Adds glossary + value decoder logic (currently LogonType).
src/EventLogExpert.Runtime/DetailsPane/DetailsReaderModel.cs Adds the model rendered by the Details Pane Reader view.
src/EventLogExpert.Runtime/DetailsPane/DetailsReaderFormatter.cs Adds projection + clipboard builders for event/section/field copying.
src/EventLogExpert.Runtime/DetailsPane/DetailsProperty.cs Adds a label/value property row type for header/system sections.
src/EventLogExpert.Runtime/DetailsPane/DetailsField.cs Adds the projected field type with truncation/mute/monospace metadata and layout hints.
src/EventLogExpert.Eventing/Common/Events/LevelSeverity.cs Adds shared strict level-name→severity parsing.
src/EventLogExpert.Eventing/Common/Events/EventFieldValue.cs Adds TryGetBytes and TryGetArray helpers and supports EventFieldValueKind.Array.

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

Comment thread src/EventLogExpert.UI/DetailsPane/DetailsPane.razor Outdated
Comment thread src/EventLogExpert.UI/DetailsPane/DetailsPane.razor Outdated
Comment thread src/EventLogExpert.UI/DetailsPane/DetailsPane.razor Outdated
Comment thread src/EventLogExpert.UI/DetailsPane/DetailsPane.razor.cs
Copilot AI review requested due to automatic review settings July 14, 2026 16:07
@jschick04 jschick04 force-pushed the feat/details-pane-v2 branch from df03836 to 5d8ae29 Compare July 14, 2026 16:07
@jschick04

Copy link
Copy Markdown
Collaborator Author

Pushed 5d8ae29f (force-update; rebased onto main) addressing this review round:

ARIA tab/panel relationships (3 comments): both tab buttons now carry stable ids (details-tab-reader/details-tab-xml) + aria-controls, and each panel carries id + aria-labelledby back at its tab. To keep every aria-controls pointing at a live element I now render both tabpanels always (a hidden attribute toggles visibility, matching the codebase's SidebarTabs pattern) with each panel's heavy content still guarded by @if (_activeTab == ...) so the XML parse only runs when that tab is active. I intentionally did not add roving tabindex: with only two tabs and no arrow-key handler, tabindex=-1 on the inactive tab would make it keyboard-unreachable.

Log prefix (1 comment): the OnFocusChanged catch log now uses the $"{nameof(DetailsPane)}: ..." prefix, consistent with the other four TraceLogger calls.

Also folded in (last-second comment on the now-merged #646): FilterPaneState.IsFilteringEnabled was rewritten from Filters.Any(predicate) (boxes the ImmutableList enumerator via IEnumerable) to a direct foreach, keeping it allocation-free on frequent renders. The rebase onto current main was required to pick up the file #646 introduced; the two change-sets are disjoint (Details Pane vs Status Bar).

Validation: Eventing 639, Runtime 1782, UI 1078 green; touched projects 0W/0E.

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 24 out of 24 changed files in this pull request and generated 2 comments.

Comment thread src/EventLogExpert.Runtime/DetailsPane/DetailsField.cs Outdated
Comment thread src/EventLogExpert.UI/DetailsPane/DetailsFieldRow.razor Outdated
Copilot AI review requested due to automatic review settings July 14, 2026 16:48
@jschick04 jschick04 force-pushed the feat/details-pane-v2 branch from 5d8ae29 to 982f7a1 Compare July 14, 2026 16:48

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 24 out of 24 changed files in this pull request and generated no new comments.

@jschick04 jschick04 marked this pull request as ready for review July 14, 2026 16:52
@jschick04 jschick04 requested a review from a team as a code owner July 14, 2026 16:52
@NikTilton NikTilton merged commit 47fe8f7 into main Jul 14, 2026
8 checks passed
@NikTilton NikTilton deleted the feat/details-pane-v2 branch July 14, 2026 17:03
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