Skip to content

Move notifications into a status-bar notification center (#751) - #753

Merged
Nick Tilton (NikTilton) merged 1 commit into
mainfrom
jschick/status-bar-notifications
Oct 28, 2026
Merged

Nick Tilton (NikTilton) merged 1 commit into
mainfrom
jschick/status-bar-notifications

Conversation

@jschick04

@jschick04 Joseph Schick (jschick04) commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #751. Notification banners used to render across the top of the window and covered the filter toolbar, so new users did not realize the filter menu was behind them. Ordinary notifications now live in a notification center on the status bar, and only critical errors keep the full-width banner.

Notification center on the status bar

  • A trigger button (severity icon and active count) sits on the status bar. It is hidden when there are no notifications and appears when one arrives.
  • The button opens a popover panel that lists every active notification (errors, warnings, info, database attention, and running upgrade/export progress) as cards with their existing actions. The panel closes on outside click, Escape, or clicking the button again.
  • A short toast appears above the button when a new notification arrives and disappears on its own or when the panel is opened.
  • Modals get their own notification button in the dialog header, so notifications stay reachable while a modal is open. The header collapses when a dialog has no title, no close button and no visible notification trigger. Critical errors still render as the full-width banner in the main window and inside modals.

Clear all

  • The panel footer shows Clear all when two or more notifications can be dismissed.
  • It always asks for confirmation, with Cancel as the default button. Running tasks are never cleared and keep running.
  • Dismissal is a single batch operation in the banner service (INotificationBulkDismissService), so cards that arrive while the confirmation is open are not removed.
  • After clearing, focus moves to the notification button, or, when nothing is left, to the main content (or to the dialog when cleared from inside a modal).

Status bar layout

  • The status bar now stays on a single line. When space runs out, lower-priority items switch to compact forms or are hidden in a fixed order instead of wrapping onto a second line. Compact counts omit the shown count unless the active filtered view is current, avoiding stale or unfinished counts. The counts button's tooltip and screen-reader description list whatever is hidden.
  • Loading failures are announced in a dedicated live region so later status updates cannot overwrite the announcement. Failure totals are tracked per loading episode in the status-bar state, so concurrent loads, loads that finish quickly, and closing all logs mid-load all report the correct total once.

Accessibility

  • New notifications are announced once: errors assertively, everything else politely, always with the active count. While a confirmation or critical error is showing, announcements wait and the latest outstanding one is read when it closes.
  • Only the active host (main window or the topmost modal) speaks, so nothing is announced twice.
  • Each card's dismiss and cancel buttons are described by the card's title, so screen-reader users know which notification they act on.
  • The ShowAlert overload that takes an AlertPresentation gained an optional defaultToCancel argument (default false), so existing callers are unchanged.
  • Closing a modal now restores focus only when focus would otherwise be lost, so callers that move focus themselves (for example, deleting a filter-library entry) keep their target.

Testing

  • Unit tests: UI 2,654 passed, Runtime 2,917 passed, JS (node --test tests/JsUnit) 164 passed.
  • New coverage includes the notification center, announcement state, batch dismissal, status-bar fit pass, loading-episode failure totals (including a real Fluxor store under notification throttling), modal focus restoration, dialog header collapse, and alert default-to-cancel.
  • Rendered component markup was exercised in headless Edge with the real CSS and JS (light, dark, and forced-colors): card layout, Clear all visibility, focus return, and the single-line status bar at narrow widths.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 01:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Screen-reader announcements can lose errors during sequential updates and omit failures from earlier-completed concurrent loads.

2 open issues
What changed in this PR

Moves ordinary notifications into a status-bar notification center so they no longer obscure the filter toolbar, addressing #751. Critical errors retain full-width banners.

Changes:

  • Adds notification cards, arrival toasts, modal access, and confirmed batch dismissal that preserves running tasks and newer notifications.
  • Adds shared announcement state, accessible action descriptions, and focus restoration.
  • Makes the status bar single-line with compact variants and hidden-item descriptions, with supporting localization and tests.
File Description
tests/​Unit/​EventLogExpert.UI.Tests/​TestUtils/​BannerHostDependenciesExtensions.cs Registers notification test dependencies.
tests/​Unit/​EventLogExpert.UI.Tests/​StatusBar/​StatusBarTests.cs Covers layout, notification slots, and announcements.
tests/​Unit/​EventLogExpert.UI.Tests/​StatusBar/​StatusBarLocalizerWiringTests.cs Adds required banner dependencies.
tests/​Unit/​EventLogExpert.UI.Tests/​StatusBar/​FailedCountAnnouncementStateTests.cs Tests failure-announcement transitions.
tests/​Unit/​EventLogExpert.UI.Tests/​Modal/​ModalChromeValidateAsyncTests.cs Tests inline-alert focus failures and prompt reset.
tests/​Unit/​EventLogExpert.UI.Tests/​Modal/​ModalChromeTests.cs Covers notification headers and default focus.
tests/​Unit/​EventLogExpert.UI.Tests/​Localization/​LocalizationInfraTests.cs Validates new resource formats.
tests/​Unit/​EventLogExpert.UI.Tests/​FilterLibrary/​LibraryEntryRowTests.cs Tests focus selection before deletion.
tests/​Unit/​EventLogExpert.UI.Tests/​DependencyInjection/​UIServiceCollectionExtensionsTests.cs Verifies scoped announcement state.
tests/​Unit/​EventLogExpert.UI.Tests/​Banner/​BannerHostTests.cs Tests critical-only and all-card rendering.
tests/​Unit/​EventLogExpert.UI.Tests/​Banner/​BannerContentLocalizerTests.cs Covers action hints and database attention.
tests/​Unit/​EventLogExpert.UI.Tests/​Alerts/​PromptModalTests.cs Verifies prompts omit notification triggers.
tests/​Unit/​EventLogExpert.UI.Tests/​Alerts/​AlertModalTests.cs Tests default focus and trigger omission.
tests/​Unit/​EventLogExpert.UI.Tests/​Alerts/​AlertDialogServiceTests.cs Tests default-to-cancel propagation.
tests/​Unit/​EventLogExpert.Runtime.Tests/​DependencyInjection/​RuntimeServiceCollectionExtensionsTests.cs Verifies shared bulk-dismiss registration.
tests/​Unit/​EventLogExpert.Runtime.Tests/​Banner/​BannerServiceTests.cs Tests snapshot dismissal and timestamps.
tests/​JsUnit/​modalChrome.test.js Tests modal and notification focus restoration.
tests/​JsUnit/​focusGuard.test.js Tests hidden status-item focus fallbacks.
src/​EventLogExpert/​Main.razor Limits workspace banners to critical errors.
src/​EventLogExpert.UI/​wwwroot/​Common/​focusGuard.js Redirects focus from hidden status items.
src/​EventLogExpert.UI/​StatusBar/​StatusBar.razor.js Implements priority-based status-bar fitting.
src/​EventLogExpert.UI/​StatusBar/​StatusBar.razor.css Defines single-line, compact layout styles.
src/​EventLogExpert.UI/​StatusBar/​StatusBar.razor.cs Manages layout interop and failure state.
src/​EventLogExpert.UI/​StatusBar/​StatusBar.razor Adds notification center and compact variants.
src/​EventLogExpert.UI/​StatusBar/​FailedCountAnnouncementState.cs Tracks loading-failure announcements.
src/​EventLogExpert.UI/​Modal/​ModalChrome.razor.js Adds guarded modal focus restoration.
src/​EventLogExpert.UI/​Modal/​ModalChrome.razor.css Styles collapsible headers and actions.
src/​EventLogExpert.UI/​Modal/​ModalChrome.razor.cs Manages notification visibility and alert focus.
src/​EventLogExpert.UI/​Modal/​ModalChrome.razor Adds header notifications and cancel autofocus.
src/​EventLogExpert.UI/​Layout/​MainLayout.razor Marks the workspace focus fallback.
src/​EventLogExpert.UI/​DependencyInjection/​UIServiceCollectionExtensions.cs Registers shared announcement state.
src/​EventLogExpert.UI/​Database/​DatabaseRecoveryHost.cs Identifies recovery reminders for dismissal warnings.
src/​EventLogExpert.UI/​Common/​StatusBarTextComposer.cs Formats compact status labels.
src/​EventLogExpert.UI/​Banner/​UpgradeProgressBanner.razor.cs Adds static-card presentation parameters.
src/​EventLogExpert.UI/​Banner/​UpgradeProgressBanner.razor Renders accessible upgrade-progress cards.
src/​EventLogExpert.UI/​Banner/​Preformatted.cs Adds recovery-reminder metadata.
src/​EventLogExpert.UI/​Banner/​NotificationToast.cs Defines toast content.
src/​EventLogExpert.UI/​Banner/​NotificationSeverity.cs Defines notification severity levels.
src/​EventLogExpert.UI/​Banner/​NotificationCenter.razor.js Handles popovers, positioning, and focus.
src/​EventLogExpert.UI/​Banner/​NotificationCenter.razor.css Styles triggers, cards, panels, and toasts.
src/​EventLogExpert.UI/​Banner/​NotificationCenter.razor.cs Coordinates notification access and bulk dismissal.
src/​EventLogExpert.UI/​Banner/​NotificationCenter.razor Renders the notification-center interface.
src/​EventLogExpert.UI/​Banner/​NotificationAnnouncementState.cs Coordinates announcements and toast lifetimes.
src/​EventLogExpert.UI/​Banner/​InfoBanner.razor.cs Adds card severity and title metadata.
src/​EventLogExpert.UI/​Banner/​InfoBanner.razor Renders information and warning cards.
src/​EventLogExpert.UI/​Banner/​ExportProgressBanner.razor.cs Adds static-card presentation parameters.
src/​EventLogExpert.UI/​Banner/​ExportProgressBanner.razor Renders accessible export-progress cards.
src/​EventLogExpert.UI/​Banner/​ErrorBanner.razor.cs Adds action preparation and card parameters.
src/​EventLogExpert.UI/​Banner/​ErrorBanner.razor Renders error cards and deferred-action hints.
src/​EventLogExpert.UI/​Banner/​BannerHost.razor.cs Adds notification rendering options.
src/​EventLogExpert.UI/​Banner/​BannerHost.razor Supports critical-only banners and all-card lists.
src/​EventLogExpert.UI/​Banner/​BannerContentLocalizer.cs Localizes database-attention summaries.
src/​EventLogExpert.UI/​Banner/​AttentionBanner.razor.cs Adds card parameters and action preparation.
src/​EventLogExpert.UI/​Banner/​AttentionBanner.razor Renders accessible database-attention cards.
src/​EventLogExpert.UI/​Alerts/​PromptModal.razor Disables notifications within prompts.
src/​EventLogExpert.UI/​Alerts/​InlineAlertRequest.cs Adds the default-to-cancel option.
src/​EventLogExpert.UI/​Alerts/​AlertModal.razor.cs Exposes default-to-cancel configuration.
src/​EventLogExpert.UI/​Alerts/​AlertModal.razor Passes focus defaults and disables notifications.
src/​EventLogExpert.UI/​Alerts/​AlertDialogService.cs Propagates confirmation focus defaults.
src/​EventLogExpert.Runtime/​DependencyInjection/​RuntimeServiceCollectionExtensions.cs Registers the bulk-dismiss service interface.
src/​EventLogExpert.Runtime/​Banner/​NotificationDismissSnapshot.cs Defines captured dismissible notifications.
src/​EventLogExpert.Runtime/​Banner/​INotificationBulkDismissService.cs Defines snapshot-based batch dismissal.
src/​EventLogExpert.Runtime/​Banner/​IAttentionBannerService.cs Exposes attention arrival time.
src/​EventLogExpert.Runtime/​Banner/​BannerService.cs Implements batch dismissal and attention versioning.
src/​EventLogExpert.Runtime/​Banner/​BannerMessage.DatabaseAttention.cs Defines database-attention message content.
src/​EventLogExpert.Runtime/​Alerts/​IAlertDialogService.cs Adds optional confirmation focus configuration.
src/​EventLogExpert.Localization/​Resources/​SharedResource.resx Adds notification and compact status-bar text.

Review effort: Balanced

@jschick04
Joseph Schick (jschick04) force-pushed the jschick/status-bar-notifications branch from be1383f to 3f9d2aa Compare October 28, 2026 16:18
Copilot AI balanced review requested due to automatic review settings October 28, 2026 16:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Hidden notifications still reserve empty header space, and the compact status label bypasses validity checks, allowing unfinished counts or mismatched tab totals to appear.

2 open issues
2 resolved since last review

Review effort: Balanced

@jschick04
Joseph Schick (jschick04) force-pushed the jschick/status-bar-notifications branch from 3f9d2aa to e7ae5e3 Compare October 28, 2026 16:56
Copilot AI balanced review requested due to automatic review settings October 28, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The notification-center change has no active review issues blocking approval.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@jschick04
Joseph Schick (jschick04) marked this pull request as ready for review October 28, 2026 17:04
@jschick04
Joseph Schick (jschick04) requested a review from a team as a code owner October 28, 2026 17:04
@NikTilton
Nick Tilton (NikTilton) merged commit 77fe31b into main Oct 28, 2026
8 checks passed
@NikTilton
Nick Tilton (NikTilton) deleted the jschick/status-bar-notifications branch October 28, 2026 17:06
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.

notifications block the filtering menu suggestion

3 participants