Replaced unhandled exception footer with a critical banner that works along side the alert dialog system#509
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an app-level banner system (error/critical/info) and integrates it with existing alert/exception handling so unhandled UI exceptions and certain multi-log scenarios surface as persistent, centralized banners rather than scattered popups/footers.
Changes:
- Added a thread-safe
IBannerService+BannerHostcomponent and wiredUnhandledExceptionHandlerto report unhandled UI exceptions to the banner system (with recovery support). - Updated alert routing (
IAlertDialogService/ModalAlertDialogService) to support explicit presentation modes, including banner-only alerts and critical alerts. - Batched “empty log” notifications when opening multiple logs (picker/folder/drag-drop/CLI) and added tests + a new
.slnxsolution workflow path.
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/EventLogExpert/_Imports.razor | Adds usings for new component library and shared components. |
| src/EventLogExpert/Shared/UnhandledExceptionHandler.razor.cs | Reports unhandled UI exceptions to IBannerService and registers recovery callback. |
| src/EventLogExpert/Shared/UnhandledExceptionHandler.razor | Removes legacy wrapper/footer markup; renders ChildContent directly when no exception. |
| src/EventLogExpert/Shared/Components/Filters/FilterGroup.razor.cs | Uses IClipboardService.CopyTextAsync for copying filter group text. |
| src/EventLogExpert/Services/MauiMenuActionService.cs | Adds batched open API and routes empty logs to banner presentation. |
| src/EventLogExpert/Services/ClipboardService.cs | Moves interface to UI layer and adds CopyTextAsync with best-effort semantics. |
| src/EventLogExpert/MauiProgram.cs | Registers IBannerService and injects it into ModalAlertDialogService. |
| src/EventLogExpert/MainPage.xaml.cs | Drag-drop + CLI now open logs via batch method to consolidate empty-log feedback. |
| src/EventLogExpert/Main.razor | Adds <BannerHost /> outside the error boundary and simplifies root composition. |
| src/EventLogExpert/EventLogExpert.csproj | References new EventLogExpert.Components project. |
| src/EventLogExpert/Components/EventTable.razor.cs | Removes unused EventLogExpert.Services using. |
| src/EventLogExpert.slnx | Adds new XML solution format including new projects. |
| src/EventLogExpert.sln | Removes legacy .sln file. |
| src/EventLogExpert.UI/Services/UpdateService.cs | Prevents repeated automatic update checks within a session; adds logging. |
| src/EventLogExpert.UI/Services/ModalAlertDialogService.cs | Adds presentation routing (auto/inline/popup/banner) and critical banner routing. |
| src/EventLogExpert.UI/Services/EmptyLogAlertFormatter.cs | New helper to format singular/plural empty-log banner messages. |
| src/EventLogExpert.UI/Services/BannerViewSelector.cs | Selects which banner view to show based on current banner state. |
| src/EventLogExpert.UI/Services/BannerService.cs | Implements thread-safe banner state, queues, and recovery callback registry. |
| src/EventLogExpert.UI/Services/ApplicationRestartService.cs | Adds TryRestartAsync using CoreApplication.RequestRestartAsync with logging. |
| src/EventLogExpert.UI/Services/AlertPresentation.cs | New enum controlling how alerts are presented. |
| src/EventLogExpert.UI/Services/AlertDialogService.cs | Expands IAlertDialogService contract to include presentation + critical alerts. |
| src/EventLogExpert.UI/Models/CriticalAlertEntry.cs | New model for queued critical alerts. |
| src/EventLogExpert.UI/Models/BannerSeverity.cs | New enum for info banner severity. |
| src/EventLogExpert.UI/Models/BannerInfoEntry.cs | New model for queued info banners. |
| src/EventLogExpert.UI/Interfaces/IClipboardService.cs | New UI-layer clipboard abstraction including CopyTextAsync. |
| src/EventLogExpert.UI/Interfaces/IBannerService.cs | New banner service contract (error/critical/info + recovery). |
| src/EventLogExpert.UI/Interfaces/IApplicationRestartService.cs | Adds TryRestartAsync to restart service contract. |
| src/EventLogExpert.UI/Enums.cs | Adds OpenLogStatus for distinguishing empty logs from loaded logs. |
| src/EventLogExpert.UI.Tests/Services/UpdateServiceTests.cs | Adds tests for “auto-check only once per session” behavior. |
| src/EventLogExpert.UI.Tests/Services/ModalAlertDialogServiceTests.cs | Adds tests for banner presentation, inline/popup constraints, and critical alerts. |
| src/EventLogExpert.UI.Tests/Services/EmptyLogAlertFormatterTests.cs | Adds unit tests for empty-log message formatting. |
| src/EventLogExpert.UI.Tests/Services/BannerViewSelectorTests.cs | Adds unit tests for banner view selection priority. |
| src/EventLogExpert.UI.Tests/Services/BannerServiceTests.cs | Adds unit tests for banner state transitions, queues, and recovery semantics. |
| src/EventLogExpert.Tests/GlobalUsings.cs | Adds xUnit global using for new bUnit test project. |
| src/EventLogExpert.Tests/EventLogExpert.Tests.csproj | New bUnit-based component test project. |
| src/EventLogExpert.Tests/Components/BannerHostTests.cs | Adds component tests for BannerHost interactions and rendering. |
| src/EventLogExpert.Components/_Imports.razor | Component library imports for banner components. |
| src/EventLogExpert.Components/EventLogExpert.Components.csproj | New Razor component library project for shared UI components. |
| src/EventLogExpert.Components/BannerHost.razor.css | Scoped CSS for the banner UI. |
| src/EventLogExpert.Components/BannerHost.razor.cs | Banner host behavior: state subscription, focus, copy feedback, reload/relaunch actions. |
| src/EventLogExpert.Components/BannerHost.razor | Banner rendering for error/critical/info states. |
| src/Directory.Packages.props | Adds bunit package version. |
| .github/workflows/PullRequest.yml | Switches CI restore/build/test to use EventLogExpert.slnx. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5a277cf to
8a4a74f
Compare
8a4a74f to
acee562
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 43 out of 43 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bill-long
approved these changes
May 1, 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.
No description provided.