Add a Details Pane reader view with decoded fields and severity#647
Conversation
There was a problem hiding this comment.
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.
df03836 to
5d8ae29
Compare
|
Pushed ARIA tab/panel relationships (3 comments): both tab buttons now carry stable Log prefix (1 comment): the Also folded in (last-second comment on the now-merged #646): Validation: Eventing 639, Runtime 1782, UI 1078 green; touched projects 0W/0E. |
5d8ae29 to
982f7a1
Compare
Summary
Adds a structured reader view to the Details Pane and redesigns its layout (ADO 62704693).
Reader | XMLtab 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.LevelSeverity.FromLevelNameparse that the log table'sGetLevelClassnow consumes too (single source, no drift).IFilterLensCommands(the same commands the row context menu drives).Validation
Manual acceptance still needed (WebView2)
Visual outcomes automated tests can't verify - please check in the running app: