-
Notifications
You must be signed in to change notification settings - Fork 17
Description
1. User Story
As a player,
I want to access a history of notifications via a button in the title bar,
so that I can review messages I might have missed and find actionable items.
As a player,
I want to perform actions (Accept/Deny) directly from the notification feed,
so that I can quickly respond to requests without navigating away from my current context.
2. Description
Currently, the GenHub notification system (INotificationService) provides transient "toast" notifications that disappear after a set time. This creates a problem where users may miss important information or actionable requests if they step away or are focused elsewhere.
This feature introduces a persistent Notification Feed accessible via a new bell icon in the Main Window title bar (adjacent to the existing Update indicator).
Architectural Context:
- Pillars Affected:
Core.Services(NotificationService),UI.Shell(MainViewModel/View). - Pipeline Tier:
Tier 1: Core/Shell. - Target Logic:
- Extend
NotificationServiceto maintain an in-memory history ofNotificationMessageobjects. - Implement a toggleable
PopuporFlyoutin MainView bound to the feed. - Enhance
NotificationMessageto support bi-directional actions (Accept/Deny callbacks).
- Extend
3. Acceptance Criteria
- Criterion 1: A "Bell" icon button is added to the MainView title bar (right side, near window controls/updates).
- Criterion 2: Clicking the Bell toggles a dropdown/flyout panel displaying the list of past notifications.
- Criterion 3: The list supports "Actionable" notifications that display "Accept" and "Deny" buttons.
- Criterion 4: Clicking an action button triggers the associated callback and (optionally) dismisses/archives the notification.
- Criterion 5: A "Clear All" button is available to empty the history.
- Validation:
- Unit tests for
NotificationManagerViewModelhandling history addition/removal. - Manual verification that actions trigger the expected log/logic.
- Unit tests for
4. Technical Notes
- Models/Interfaces:
- Refactor
INotificationServiceto expose aReadOnlyObservableCollection<NotificationMessage> History. - Update
NotificationMessagerecord (or create a wrapperNotificationFeedItemViewModel) to handleICommandbinding for actions.
- Refactor
- C# / MVVM Requirements:
- Create
NotificationFeedViewModelto back the flyout view. - Use
CommunityToolkit.Mvvmfor relay commands. - Ensure the feed does not auto-dismiss items, unlike the toasts.
- Create
- UI:
- Use Avalonia
Popupor custom overlay for the feed. - Style consistent with
NotificationToastView(Dark/Glassmorphism).
- Use Avalonia