Add channel readiness with dynamic per-channel access detection - #660
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a new channel readiness model (presence/enablement/access) backed by native Win32 access evaluation, and wires it through scenario launch + UI surfaces (scenario detail, empty dashboard, and live-logs menu) so the app can distinguish access denied vs not present/disabled and guide users toward folder-based fallback when needed.
Changes:
- Add runtime/readiness abstractions (
IChannelReadinessService,ChannelReadiness, outcomes) and integrate them into scenario presence/launch behavior. - Add native channel access evaluation + channel config readers in the eventing layer (including unit + integration coverage).
- Update UI components (MenuBar, ScenarioDetail, EmptyStateDashboard) and tests to surface readiness state and new launch outcomes.
Reviewed changes
Copilot reviewed 51 out of 51 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/EventLogExpert.UI.Tests/Menu/MenuRendererTests.cs | Adds coverage for menu item status text rendering/activation. |
| tests/Unit/EventLogExpert.UI.Tests/Menu/MenuBarGroupingTests.cs | Tests live menu status tags and clickability based on readiness. |
| tests/Unit/EventLogExpert.UI.Tests/Dashboard/ScenarioDetailTests.cs | Updates ScenarioDetail expectations for blocked/offline/readiness UI. |
| tests/Unit/EventLogExpert.UI.Tests/Dashboard/EmptyStateDashboardTests.cs | Adds readiness-driven launch gating + fallback alert coverage. |
| tests/Unit/EventLogExpert.Runtime.Tests/Scenarios/ScenarioQueryServiceTests.cs | Switches presence logic tests to readiness service. |
| tests/Unit/EventLogExpert.Runtime.Tests/Scenarios/ScenarioLaunchServiceTests.cs | Validates degraded-channel rollback and outcome projection. |
| tests/Unit/EventLogExpert.Runtime.Tests/Scenarios/ChannelPresenceProbeTests.cs | Adds readiness/config enrichment tests for ChannelPresenceProbe. |
| tests/Unit/EventLogExpert.Eventing.Tests/Readers/ChannelAccessEvaluatorTests.cs | Unit tests for native access evaluation + config reader behavior. |
| tests/Integration/EventLogExpert.Eventing.IntegrationTests/Readers/ChannelConfigReaderIntegrationTests.cs | Basic integration coverage for config reader. |
| tests/Integration/EventLogExpert.Eventing.IntegrationTests/Readers/ChannelAccessEvaluatorIntegrationTests.cs | Integration coverage for access evaluator with real tokens/SDDL. |
| src/EventLogExpert/Adapters/Menu/MauiMenuActionService.cs | Plumbs outcomes + inline-alert suppression; switches “other logs” to readiness. |
| src/EventLogExpert.UI/Menu/MenuRenderer.razor.css | Styles new visible menu status tag. |
| src/EventLogExpert.UI/Menu/MenuRenderer.razor | Renders optional per-item status text; normalizes ellipsis text. |
| src/EventLogExpert.UI/Menu/MenuBar.razor.cs | Uses readiness to tag live channels and build other-logs tree. |
| src/EventLogExpert.UI/Dashboard/ScenarioDetail.razor.css | Adds styling for readiness “chip” statuses. |
| src/EventLogExpert.UI/Dashboard/ScenarioDetail.razor.cs | Adds ChannelReadiness parameter and label helpers. |
| src/EventLogExpert.UI/Dashboard/ScenarioDetail.razor | Surfaces per-channel readiness and blocked note. |
| src/EventLogExpert.UI/Dashboard/ScenarioBrowserPanel.razor.cs | Adds callback to provide readiness to ScenarioDetail. |
| src/EventLogExpert.UI/Dashboard/ScenarioBrowserPanel.razor | Passes readiness into ScenarioDetail. |
| src/EventLogExpert.UI/Dashboard/EmptyStateDashboard.razor.cs | Uses readiness for gating, messaging, and folder fallback alert behavior. |
| src/EventLogExpert.UI/Dashboard/EmptyStateDashboard.razor | Uses readiness to disable/describe Security quick-launch; passes readiness callback. |
| src/EventLogExpert.Runtime/Scenarios/ScenarioQueryService.cs | Builds LivePresence from readiness snapshot rather than presence probe. |
| src/EventLogExpert.Runtime/Scenarios/ScenarioLaunchService.cs | Adds degraded-required-channel rollback; captures per-channel outcomes. |
| src/EventLogExpert.Runtime/Scenarios/ScenarioLaunchResult.cs | Adds ChannelOutcomes to launch result model. |
| src/EventLogExpert.Runtime/Scenarios/IChannelReadinessService.cs | New readiness service interface. |
| src/EventLogExpert.Runtime/Scenarios/IChannelPresenceProbe.cs | Removes doc comments; keeps legacy presence probe contract. |
| src/EventLogExpert.Runtime/Scenarios/ChannelReadiness.cs | New readiness record. |
| src/EventLogExpert.Runtime/Scenarios/ChannelPresenceProbe.cs | Implements readiness service + config enrichment/caching. |
| src/EventLogExpert.Runtime/Scenarios/ChannelPresence.cs | New presence enum. |
| src/EventLogExpert.Runtime/Scenarios/ChannelOutcome.cs | New per-channel launch outcome record. |
| src/EventLogExpert.Runtime/Scenarios/ChannelLaunchOutcome.cs | New launch outcome enum. |
| src/EventLogExpert.Runtime/Scenarios/ChannelEnablement.cs | New enablement enum. |
| src/EventLogExpert.Runtime/Menu/OpenLogsBatchResult.cs | Adds ChannelOutcomes to batch open results. |
| src/EventLogExpert.Runtime/Menu/MenuItem.cs | Adds StatusText to menu items. |
| src/EventLogExpert.Runtime/Menu/IMenuActionService.cs | Adds showInlineAlerts optional param to open methods. |
| src/EventLogExpert.Runtime/DependencyInjection/RuntimeServiceCollectionExtensions.cs | Registers config reader + readiness service wiring. |
| src/EventLogExpert.Eventing/Readers/Win32ChannelAccessNative.cs | Win32 access-check native wrapper. |
| src/EventLogExpert.Eventing/Readers/NativeChannelAccessEvaluator.cs | Evaluates access via AccessCheck + Security privilege. |
| src/EventLogExpert.Eventing/Readers/IChannelConfigReader.cs | New config reader interface. |
| src/EventLogExpert.Eventing/Readers/IChannelConfigPropertyReader.cs | New internal property reader interface. |
| src/EventLogExpert.Eventing/Readers/IChannelAccessNative.cs | New internal native access abstraction. |
| src/EventLogExpert.Eventing/Readers/IChannelAccessEvaluator.cs | New internal access evaluator interface. |
| src/EventLogExpert.Eventing/Readers/EventLogChannelConfigReader.cs | Reads enablement/type/access (skips access for Analytic/Debug). |
| src/EventLogExpert.Eventing/Readers/EventLogChannelConfigPropertyReader.cs | Reads config properties via Evt APIs and converts variants. |
| src/EventLogExpert.Eventing/Readers/ChannelConfigPropertySnapshot.cs | Snapshot record for property reads. |
| src/EventLogExpert.Eventing/Readers/ChannelConfig.cs | Config record for enablement/access/type. |
| src/EventLogExpert.Eventing/Readers/ChannelAccess.cs | New access enum. |
| src/EventLogExpert.Eventing/ProviderMetadata/RegistryProvider.cs | Adjusts registry-skip channel set usage; simplifies exception type. |
| src/EventLogExpert.Eventing/Interop/NativeMethods.Access.cs | Adds P/Invoke declarations for AccessCheck-related APIs. |
| src/EventLogExpert.Eventing/Interop/EvtEnums.cs | Adds channel access/config enums and public EvtChannelType. |
| src/EventLogExpert.Eventing/Common/Channels/LogChannelNames.cs | Adds RegistrySkipChannels; retains legacy admin-only set. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 51 out of 51 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
src/EventLogExpert.UI/Menu/MenuBar.razor.cs:351
- "Other Logs" is built from the full readiness snapshot, but the code no longer filters out LogChannelMethods.HardCodedLiveChannels (Application/System/Security). This can duplicate those entries under "Other Logs" even though they’re already listed directly under Live (and LogChannelMethods explicitly documents filtering to avoid duplicates).
src/EventLogExpert/Adapters/Menu/MauiMenuActionService.cs:275 - GetOtherLogNamesAsync() now returns all channel names from the readiness snapshot, including LogChannelMethods.HardCodedLiveChannels (Application/System/Security). That contradicts LogChannelMethods’ contract (“filter these … to avoid duplicates”) and can reintroduce duplicates in any UI that consumes this list as “other logs”.
jschick04
force-pushed
the
feat/channel-readiness
branch
from
July 21, 2026 00:02
903d242 to
0495664
Compare
jschick04
force-pushed
the
feat/channel-readiness
branch
from
July 21, 2026 00:18
0495664 to
a9bd301
Compare
jschick04
force-pushed
the
feat/channel-readiness
branch
from
July 21, 2026 03:06
09f1723 to
0cf7a50
Compare
jschick04
marked this pull request as ready for review
July 21, 2026 03:12
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 channel readiness with dynamic per-channel access detection. For each channel referenced by a scenario, the app now determines presence, enablement, and accessibility - including access-denied detection via native Win32 channel access evaluation - and surfaces that state in the scenario UI and the live-logs menu.
Highlights:
Win32ChannelAccessNative/NativeChannelAccessEvaluator,IChannelAccessEvaluator) probes whether the current user can actually read each channel, distinguishing access-denied from not-present / disabled.EventLogChannelConfigReader/EventLogChannelConfigPropertyReader) expose channel enablement + property snapshots.ChannelReadiness,ChannelPresence,ChannelEnablement,ChannelOutcome,ChannelLaunchOutcome) drives per-channel launch outcomes; a scenario with any degraded required channel (access-denied / not-present / failed) is treated as non-launchable, the same as a missing log.ScenarioDetail/EmptyStateDashboardand the live-logs menu (MenuBar): each channel shows a readiness status tag; live-log menu items stay clickable and, when access is denied, surface an inline "Log requires elevation" alert guiding the user to relaunch as Administrator. The "Other Logs" submenu is the full channel directory and intentionally lists the Application/System/Security live channels that also appear in the top-level Live quick-access.Testing
ChannelAccessEvaluatorIntegrationTests,ChannelConfigReaderIntegrationTests) are deferred to a follow-up test audit after the eventing library update - flagged here so reviewers expect them.Stack
Final PR of the 3-part scenario-launch stack (after #657 folder-launch and #658 histogram enhancements, both merged to
main). Based onmain.