Skip to content

Replaced unhandled exception footer with a critical banner that works along side the alert dialog system#509

Merged
jschick04 merged 12 commits into
mainfrom
jschick/banner-foundation
May 1, 2026
Merged

Replaced unhandled exception footer with a critical banner that works along side the alert dialog system#509
jschick04 merged 12 commits into
mainfrom
jschick/banner-foundation

Conversation

@jschick04
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 1, 2026 13:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + BannerHost component and wired UnhandledExceptionHandler to 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 .slnx solution 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.

Comment thread src/EventLogExpert/Services/MauiMenuActionService.cs
Comment thread src/EventLogExpert/Services/MauiMenuActionService.cs
Comment thread src/EventLogExpert.Components/BannerHost.razor
@jschick04 jschick04 force-pushed the jschick/banner-foundation branch from 5a277cf to 8a4a74f Compare May 1, 2026 13:33
Copilot AI review requested due to automatic review settings May 1, 2026 13:42
@jschick04 jschick04 force-pushed the jschick/banner-foundation branch from 8a4a74f to acee562 Compare May 1, 2026 13:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jschick04 jschick04 marked this pull request as ready for review May 1, 2026 13:53
@jschick04 jschick04 requested a review from a team as a code owner May 1, 2026 13:53
@jschick04 jschick04 merged commit 04cff6a into main May 1, 2026
10 checks passed
@jschick04 jschick04 deleted the jschick/banner-foundation branch May 1, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants