Add elevation awareness, Tools menu database entry, and split Effects.cs into 4 focused classes#537
Merged
jschick04 merged 2 commits intoMay 21, 2026
Conversation
…nu database entry
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds elevation-awareness (admin detection + warning) and refactors the runtime EventLog Fluxor effects by splitting the former monolithic Effects.cs into focused effect/coordination classes with shared singletons for cross-effect synchronization.
Changes:
- Cache admin/elevation state (
CurrentVersionProvider.IsAdmin) and emit a non-elevated warning inEventDbTool. - Add a Tools menu entry intended to expose database management.
- Split
EventLog/Effects.csintoFilteringEffects,OpenLogEffects,LogReloadEffects, andDatabaseCoordinationEffects, plus shared coordination helpers.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/EventLogExpert.Runtime.Tests/EventLog/EffectsTests.cs | Updates tests to use a harness over the split effects classes. |
| src/EventLogExpert.UI/Menu/MenuBar.razor.cs | Adds “Manage Databases” item and minor formatting tweaks. |
| src/EventLogExpert.Runtime/EventLog/PendingSelectionRestore.cs | Extracts pending selection restore record into its own file. |
| src/EventLogExpert.Runtime/EventLog/OpenLogEffects.cs | New effects class for open/close/close-all and log loading pipeline. |
| src/EventLogExpert.Runtime/EventLog/LogReloadEffects.cs | New effects class for load events / partial load / new events buffer. |
| src/EventLogExpert.Runtime/EventLog/LogCloseCoordinator.cs | New shared coordinator for close-completion + pending selection restore. |
| src/EventLogExpert.Runtime/EventLog/FilteringEffects.cs | New effects class for add-event, apply-filter, and continuously-update toggle. |
| src/EventLogExpert.Runtime/EventLog/EventLogEffectsUtility.cs | Shared helper utilities extracted from the old monolith. |
| src/EventLogExpert.Runtime/EventLog/EventLogConcurrencyState.cs | Shared tokens/state for filter/reload invalidation + XML-loaded tracking. |
| src/EventLogExpert.Runtime/EventLog/Effects.cs | Removes the previous monolithic effects implementation. |
| src/EventLogExpert.Runtime/EventLog/DatabaseCoordinationEffects.cs | New coordinator implementing ILogReloadCoordinator for db removal flows. |
| src/EventLogExpert.Runtime/DependencyInjection/RuntimeServiceCollectionExtensions.cs | Registers shared singletons and wires ILogReloadCoordinator to the new coordinator. |
| src/EventLogExpert.Runtime/Common/Versioning/CurrentVersionProvider.cs | Caches admin check via Lazy<bool> to avoid repeated P/Invoke. |
| src/EventLogExpert.EventDbTool/Program.cs | Adds elevation warning on startup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8c6d463 to
27b34e5
Compare
27b34e5 to
48090c9
Compare
48090c9 to
1752c0b
Compare
1752c0b to
dd74004
Compare
dd74004 to
60a2f10
Compare
…cts, and DatabaseCoordinationEffects
60a2f10 to
8db51a2
Compare
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.
Stacked on #536. Adds elevation awareness and splits the monolithic Effects.cs into single-responsibility classes.
Changes
PR 10 — Elevation awareness + Tools menu
PR 11 — Split Effects.cs (1097 lines → 4 classes + 2 shared singletons)
Shared coordination extracted into:
DI wiring: Fluxor auto-discovers FilteringEffects/OpenLogEffects/LogReloadEffects; DatabaseCoordinationEffects registered explicitly as singleton with ILogReloadCoordinator alias.
Test results
2,193 tests passing (unchanged from base branch), 0 failures