Skip to content

Show alert/notification badges on groups in the sidebar #52

@AThraen

Description

@AThraen

This was generated by AI during triage.

Summary

When sessions are organised into groups, surface alert and waiting-state indicators at the group level in the sidebar so the user can spot which group needs attention without expanding every group or cycling through them manually.

Motivation

Today, AlertDetector raises per-session alerts (pink badge for NeedsAttention, green/orange dot for IsWaitingForInput / IsWaitingForApproval). If the alerting session belongs to a group that is collapsed or not the active group, there is no visible signal — the user has to remember to check or rely on the tray balloon. With many groups this becomes a real workflow bottleneck.

Proposed behaviour

Group-level badge in the sidebar

  • A group header row aggregates the alert state of all its member sessions.
  • If any member has NeedsAttention, the group header shows the same pink badge (count of alerting sessions if > 1).
  • If any member has IsWaitingForInput or IsWaitingForApproval, the group header shows the corresponding green/orange status dot.
  • Priority: NeedsAttention > IsWaitingForApproval > IsWaitingForInput (show the most urgent one if multiple states coexist in the group).
  • When the group is expanded, badges appear on the individual session rows as today; the group-level badge remains until all members clear their alert state.

Collapsed groups

  • A collapsed group header must still display the aggregated badge — this is the primary use-case.
  • The badge should be legible at a glance: same visual language as the session-level indicators (colour, icon) so there is no new vocabulary to learn.

Global alert count

  • MainViewModel.AlertCount (used for the tray icon badge) already counts across all sessions; no change needed there.

Clearing

  • Group-level badge clears automatically when the last alerting member in the group clears its own alert (existing AlertDetector.NotifyUserInteracted propagation).

Implementation hints

  • Group headers are built in MainWindow.xaml.cs (code-behind, same pattern as BuildSidebarItem). The aggregated badge can be a Border/TextBlock added to the group header row, updated via Dispatcher.Invoke from the same SessionViewModel.PropertyChanged handler that already drives per-session sidebar updates.
  • MainViewModel.Sessions already exposes NeedsAttention, IsWaitingForInput, IsWaitingForApproval per session — iterate the group's member sessions to derive the aggregate.
  • Watch out for groups that are currently hidden (not the active group) — their sidebar items still exist in the visual tree, so updating them is straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions