Component decomposition + FilterLibrary write-gate serialization (#540)#575
Merged
Conversation
…eInterop unexpected-pre-dispose test
…e sync Mutex try-finally + IpcMessageWriter idempotency + race-fix tests
…e toggle, idempotency tests
… concurrent non-tag edit
…patch; idempotent filter append
Contributor
There was a problem hiding this comment.
Pull request overview
This PR performs a broad refactor to improve testability and reliability across the UI and runtime layers by (1) centralizing JS module lifecycle handling, (2) decomposing LogTablePane-adjacent behaviors with new characterization tests, and (3) converting FilterLibrary persistence and DatabaseTools IPC/logging to async + serialized write patterns.
Changes:
- Centralizes Blazor JS module teardown via
JsModuleInterop.DisposeModuleSafelyAsync, and migrates multiple UI components to use it. - Introduces async-first DatabaseTools plumbing (IPC “message” vocabulary, async provider/source enumeration,
LogRecordpromotion) with updated unit/integration tests and new test projects. - Converts FilterLibrary store interface + SQLite implementation to async and introduces narrower “partial-field” commands/actions used by UI flows.
Reviewed changes
Copilot reviewed 102 out of 102 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/EventLogExpert.Windows.Tests/EvtxFolderEnumeratorTests.cs | Updates imports for WindowsPlatform Activation namespace split. |
| tests/Unit/EventLogExpert.Windows.Tests/ActivationTokenClassifierTests.cs | Updates imports for WindowsPlatform Activation namespace split. |
| tests/Unit/EventLogExpert.Windows.Tests/ActivationDispatcherTests.cs | Reorders/edits tests and updates Activation namespace + comment punctuation. |
| tests/Unit/EventLogExpert.UI.Tests/TestUtils/LogTablePaneDependenciesExtensions.cs | Adds DI helper to register LogTablePane test dependencies. |
| tests/Unit/EventLogExpert.UI.Tests/LogTable/LogTablePaneSelectionTests.cs | Adds bUnit characterization tests for LogTablePane selection/rendering. |
| tests/Unit/EventLogExpert.UI.Tests/JsModuleInteropTests.cs | Adds unit tests for safe JS module disposal helper. |
| tests/Unit/EventLogExpert.UI.Tests/FilterLibrary/LibraryEntryRowTests.cs | Updates tests to assert new partial-field tag command API. |
| tests/Unit/EventLogExpert.UI.Tests/FilterLibrary/LibraryEntryFilterEditorTests.cs | Updates tests to assert new partial-field filter-set update API. |
| tests/Unit/EventLogExpert.Runtime.Tests/DatabaseTools/Elevation/ElevatedDatabaseToolsRunnerTests.cs | Updates runner tests for IPC “message” vocabulary + LogRecord. |
| tests/Unit/EventLogExpert.Runtime.Tests/DatabaseTools/DatabaseToolsServiceTests.cs | Updates service tests to consume LogRecord instead of old log entry type. |
| tests/Unit/EventLogExpert.Logging.Tests/Sinks/StreamingTraceLoggerTests.cs | Moves/updates logger tests for new logging assembly + LogRecord. |
| tests/Unit/EventLogExpert.Logging.Tests/GlobalUsings.cs | Adds test project global usings. |
| tests/Unit/EventLogExpert.Logging.Tests/EventLogExpert.Logging.Tests.csproj | Adds new Logging test project referencing Logging library. |
| tests/Unit/EventLogExpert.Filtering.Tests/FilterCompilerTests.cs | Updates imports for relocated Filtering compilation namespace. |
| tests/Unit/EventLogExpert.Filtering.Tests/Drafts/FilterDraftTests.cs | Updates imports for relocated Filtering compilation namespace. |
| tests/Unit/EventLogExpert.EventDbTool.Tests/FilterRegexFactoryTests.cs | Removes tests tied to old CLI-local FilterRegexFactory location. |
| tests/Unit/EventLogExpert.DatabaseTools.Tests/GlobalUsings.cs | Adds DatabaseTools test project global usings. |
| tests/Unit/EventLogExpert.DatabaseTools.Tests/EventLogExpert.DatabaseTools.Tests.csproj | Adds new DatabaseTools unit test project. |
| tests/Unit/EventLogExpert.DatabaseTools.Tests/Common/Ipc/IpcMessageRoundTripTests.cs | Updates IPC round-trip tests for “message” base type + renamed records. |
| tests/Unit/EventLogExpert.DatabaseTools.Tests/Common/FilterRegexFactoryTests.cs | Adds tests for shared DatabaseTools FilterRegexFactory. |
| tests/Integration/EventLogExpert.Runtime.IntegrationTests/FilterLibrary/FilterLibraryMigrationIntegrationTests.cs | Updates integration tests for async FilterLibrary store API. |
| tests/Integration/EventLogExpert.Runtime.IntegrationTests/DebugLog/DebugLogServiceTests.cs | Adds disposal/idempotency tests for sync + async DebugLogService disposal. |
| tests/Integration/EventLogExpert.ElevationHelper.IntegrationTests/OperationsEndToEndTests.cs | Updates integration tests for LogRecord sink type. |
| tests/Integration/EventLogExpert.ElevationHelper.IntegrationTests/Ipc/IpcMessageWriterTests.cs | Adds integration tests for new IPC message writer disposal/write behavior. |
| tests/Integration/EventLogExpert.ElevationHelper.IntegrationTests/DestructiveRecoveryTests.cs | Updates integration tests for LogRecord sink type. |
| tests/Integration/EventLogExpert.DatabaseTools.IntegrationTests/Sources/ProviderSourceTests.cs | Converts schema validation tests to async API. |
| src/EventLogExpert/Platforms/Windows/Activation/ActivationArgsExtractor.cs | Updates imports after Activation types move. |
| src/EventLogExpert/DependencyInjection/MauiProgramExtensions.cs | Updates imports after Activation types move. |
| src/EventLogExpert/Adapters/Menu/MauiMenuActionService.cs | Updates imports and normalizes comment punctuation. |
| src/EventLogExpert.WindowsPlatform/Activation/EvtxFolderEnumerator.cs | Moves type into EventLogExpert.WindowsPlatform.Activation namespace. |
| src/EventLogExpert.WindowsPlatform/Activation/EvtxEnumerationResult.cs | Moves type into EventLogExpert.WindowsPlatform.Activation namespace. |
| src/EventLogExpert.WindowsPlatform/Activation/ActivationTokenClassifier.cs | Moves type into EventLogExpert.WindowsPlatform.Activation namespace. |
| src/EventLogExpert.WindowsPlatform/Activation/ActivationDispatcher.cs | Moves type into EventLogExpert.WindowsPlatform.Activation namespace. |
| src/EventLogExpert.UI/Modal/SidebarTabs.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/Modal/ModalChrome.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/Menu/MenuRenderer.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/Menu/MenuHost.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/Menu/MenuBar.razor.cs | Migrates JS module teardown and updates menu text ellipsis style. |
| src/EventLogExpert.UI/LogTable/LogTablePane.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/LogTable/LogTabBar.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/Keyboard/KeyboardShortcutService.cs | Replaces local dispose helper with centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/Inputs/ValueSelect.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/FilterPane/FilterPane.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/FilterLibrary/LibraryEntryRow.razor.cs | Switches to partial-field FilterLibrary commands + centralized JS disposal. |
| src/EventLogExpert.UI/FilterLibrary/LibraryEntryFilterEditor.razor.cs | Switches to partial-field FilterLibrary commands for filter-set updates. |
| src/EventLogExpert.UI/DetailsPane/DetailsPane.razor.cs | Migrates JS module teardown to centralized JsModuleInterop helper. |
| src/EventLogExpert.UI/DependencyInjection/UiServiceCollectionExtensions.cs | Comment punctuation normalization. |
| src/EventLogExpert.UI/DatabaseTools/Tabs/UpgradeDatabaseTab.razor.cs | Updates log sink type to LogRecord. |
| src/EventLogExpert.UI/DatabaseTools/Tabs/ShowProvidersTab.razor.cs | Uses shared FilterRegexFactory + updates log sink type to LogRecord. |
| src/EventLogExpert.UI/DatabaseTools/Tabs/MergeDatabaseTab.razor.cs | Updates log sink type to LogRecord. |
| src/EventLogExpert.UI/DatabaseTools/Tabs/DiffDatabasesTab.razor.cs | Updates log sink type to LogRecord. |
| src/EventLogExpert.UI/DatabaseTools/Tabs/DatabaseToolsTabBase.cs | Updates buffering/logging pipeline to LogRecord and string punctuation. |
| src/EventLogExpert.UI/DatabaseTools/Tabs/CreateDatabaseTab.razor.cs | Uses shared FilterRegexFactory + updates log sink type to LogRecord. |
| src/EventLogExpert.UI/DatabaseTools/DatabaseToolsLogView.razor.cs | Updates UI log view to render LogRecord + centralized JS disposal. |
| src/EventLogExpert.UI/Common/Interop/JsModuleInterop.cs | Adds centralized JS module import/dispose helper. |
| src/EventLogExpert.Runtime/FilterLibrary/SetFilterSetFiltersAction.cs | Adds partial-field action for filter-set filters updates. |
| src/EventLogExpert.Runtime/FilterLibrary/SetEntryTagsAction.cs | Adds partial-field action for tags updates. |
| src/EventLogExpert.Runtime/FilterLibrary/SetEntryNameAction.cs | Adds partial-field action for entry rename updates. |
| src/EventLogExpert.Runtime/FilterLibrary/IFilterLibraryStore.cs | Converts FilterLibrary store interface to async API surface. |
| src/EventLogExpert.Runtime/FilterLibrary/IFilterLibraryCommands.cs | Adds partial-field command APIs and adjusts formatting. |
| src/EventLogExpert.Runtime/FilterLibrary/FilterLibrarySqliteStore.cs | Converts SQLite store implementation to async ADO.NET usage. |
| src/EventLogExpert.Runtime/FilterLibrary/FilterLibraryCommands.cs | Wires new partial-field commands to Fluxor actions. |
| src/EventLogExpert.Runtime/DependencyInjection/RuntimeServiceCollectionExtensions.cs | Comment/formatting adjustments in runtime DI docs. |
| src/EventLogExpert.Runtime/DebugLog/DebugLogService.cs | Adds IAsyncDisposable, idempotent disposal guards, and async dispose path. |
| src/EventLogExpert.Runtime/DatabaseTools/IDatabaseToolsService.cs | Updates log sink type to LogRecord and doc punctuation. |
| src/EventLogExpert.Runtime/DatabaseTools/Elevation/IElevatedHelperProcess.cs | Updates IPC docs to “message” terminology. |
| src/EventLogExpert.Runtime/DatabaseTools/Elevation/IElevatedDatabaseToolsRunner.cs | Updates log sink type to LogRecord and IPC docs. |
| src/EventLogExpert.Runtime/DatabaseTools/Elevation/ElevatedDatabaseToolsRunner.cs | Renames IPC envelope->message, updates serialization + mirroring + cancellation flow. |
| src/EventLogExpert.Runtime/DatabaseTools/DatabaseToolsService.cs | Updates logging pipeline to LogRecord + moved StreamingTraceLogger namespace. |
| src/EventLogExpert.Logging/Sinks/StreamingTraceLogger.cs | Promotes/moves logger sink to Logging library and switches to LogRecord. |
| src/EventLogExpert.Logging/Abstractions/LogRecord.cs | Promotes DatabaseToolsLogEntry to shared LogRecord in Logging abstractions. |
| src/EventLogExpert.Filtering/Persistence/SavedFilter.cs | Updates imports for relocated Filtering compilation namespace. |
| src/EventLogExpert.Filtering/Drafts/FilterDraft.cs | Updates imports for relocated Filtering compilation namespace. |
| src/EventLogExpert.Filtering/Compilation/FilterCompiler.cs | Moves compiler into EventLogExpert.Filtering.Compilation namespace. |
| src/EventLogExpert.EventDbTool/Commands/Support/FilterRegexFactory.cs | Removes CLI-local FilterRegexFactory in favor of shared implementation. |
| src/EventLogExpert.EventDbTool/Commands/ShowCommand.cs | Updates to shared FilterRegexFactory API and error reporting. |
| src/EventLogExpert.EventDbTool/Commands/CreateDatabaseCommand.cs | Updates to shared FilterRegexFactory API and error reporting. |
| src/EventLogExpert.ElevationHelper/ProgramEntry.cs | Refactors helper entrypoint to use IPC message reader/writer types. |
| src/EventLogExpert.ElevationHelper/Operations/OperationDispatcher.cs | Moves dispatcher into Operations namespace and updates log sink to LogRecord. |
| src/EventLogExpert.ElevationHelper/Operations/DestructiveRecovery.cs | Moves destructive recovery wrapper into Operations namespace and updates wording. |
| src/EventLogExpert.ElevationHelper/IpcSinks.cs | Removes legacy envelope-based sinks after splitting into dedicated files. |
| src/EventLogExpert.ElevationHelper/Ipc/IpcProgressSink.cs | Adds progress sink that writes ProgressMessage over IPC. |
| src/EventLogExpert.ElevationHelper/Ipc/IpcMessageWriter.cs | Adds serialized IPC message writer implementation. |
| src/EventLogExpert.ElevationHelper/Ipc/IpcMessageReader.cs | Renames envelope reader to message reader and updates terminology. |
| src/EventLogExpert.ElevationHelper/Ipc/IpcLogSink.cs | Adds log sink that writes LogMessage over IPC from LogRecord. |
| src/EventLogExpert.ElevationHelper/EventLogExpert.ElevationHelper.csproj | Adds InternalsVisibleTo for helper integration tests. |
| src/EventLogExpert.ElevationHelper/Diagnostics/ProbeMode.cs | Moves probe collector into Diagnostics namespace and updates message types. |
| src/EventLogExpert.DatabaseTools/UpgradeDatabase/UpgradeDatabaseOperation.cs | Converts to async and uses async-dispose for DbContext. |
| src/EventLogExpert.DatabaseTools/ShowProviders/ShowProvidersOperation.cs | Converts provider enumeration to async streaming via ProviderSource APIs. |
| src/EventLogExpert.DatabaseTools/MergeDatabase/MergeDatabaseOperation.cs | Converts provider source loading and some EF queries to async. |
| src/EventLogExpert.DatabaseTools/DiffDatabase/DiffDatabaseOperation.cs | Uses async schema validation + async provider enumeration + async cleanup. |
| src/EventLogExpert.DatabaseTools/CreateDatabase/CreateDatabaseOperation.cs | Uses async provider enumeration + async cleanup and skip-name loading. |
| src/EventLogExpert.DatabaseTools/Common/Operations/ProviderSource.cs | Converts provider discovery/loading/schema validation to async APIs. |
| src/EventLogExpert.DatabaseTools/Common/Operations/OperationBase.cs | Adds async cleanup helper and async wrapper for local provider enumeration. |
| src/EventLogExpert.DatabaseTools/Common/Ipc/RegexJsonConverter.cs | Updates docs for IPC “message” vocabulary. |
| src/EventLogExpert.DatabaseTools/Common/Ipc/DatabaseToolsIpcMessage.cs | Renames IPC base/records from Envelope->Message and updates docs. |
| src/EventLogExpert.DatabaseTools/Common/Ipc/DatabaseToolsIpcJsonContext.cs | Updates source-gen JSON context registrations for message types. |
| src/EventLogExpert.DatabaseTools/Common/FilterRegexFactory.cs | Adds shared FilterRegexFactory (UI/CLI can surface errors consistently). |
| EventLogExpert.slnx | Adds new DatabaseTools.Tests and Logging.Tests projects to the solution. |
Comments suppressed due to low confidence (1)
src/EventLogExpert.DatabaseTools/Common/Ipc/DatabaseToolsIpcMessage.cs:102
- XML doc comment for
CancelMessagecontains a standalone "." line, which will show up as odd formatting in generated docs and is likely a leftover from a wrapped sentence.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
NikTilton
approved these changes
Jun 9, 2026
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.
Resolves #540.
Track A — JS module interop centralization
JsModuleInterop.ImportModuleAsync+DisposeModuleSafelyAsynchelper with the canonical 4-clause catch + optional pre-dispose callback.Track B — LogTablePane decomposition prototype
EventSelection(12 tests),EventRowStyle(11 tests),EventColumnLayout(6 tests).FilterLibrary async-store conversion + race resolution
FilterLibrarySqliteStoreconverted to async ADO.NET.Effectsmethods. Closed iteratively:_writeGatesemaphore serializing ALL FilterLibrary writes (replaces_migrationGate).PersistAndDispatchAsynchelper withReferenceEqualsno-op early-exit + re-issue against latest snapshot +LoadLibraryActionresync on re-issue failure.ApplyBulkTagUpdatere-orders re-issue before dispatch; on re-issue failure falls back toLoadLibrary+ announce +TagBulkUpdateFailedAction.AppendFilterToSetIfMissingidempotent — dedup tuple(lower(ComparisonText), Mode, IsExcluded)checked inside the mutate lambda so concurrent-add sees the latest committed state.SetEntryNameAction,SetEntryTagsAction,SetFilterSetFiltersAction) replace full-entry updates for single-field UI flows; 9 UI sites refactored.DebugLogServicenowIAsyncDisposablewith try-finally Mutex disposal symmetric across sync/async paths.IpcMessageWriterextracted with volatile_disposed+DisposeAsyncTOCTOU guard; backed by 3 new integration tests.Structure / cleanup
LogRecordpromoted toEventLogExpert.Logginglibrary; DatabaseTools operations async-dispose.IpcSinks.cssplit intoIpcLogSink.cs+IpcProgressSink.cs.FilterRegexFactoryconsolidated into sharedEventLogExpert.DatabaseTools.Common.FilterCompiler->Compilation,WindowsPlatform->Activation,ElevationHelper->Ipc/Operations/Diagnostics, etc.).EventLogExpert.DatabaseTools.Tests+EventLogExpert.Logging.Testsunit-test projects.Tests
Panel
7 fix-and-re-panel rounds (heavy_6 initial; 4-reviewer floor for late rounds - Claude rubber-duck + 3 code-review across GPT premium/codex + Gemini). Final round: unanimous READY, zero findings.
Design artifact:
component-architecture-design.md(session-only - not committed; promotion to repo docs is a follow-up).