feat(notifications): coalesce identical notifications with a repeat count
Fold a burst of identical notifications (same level+title+message within a short window) into one entry with a ×N count instead of stacking copies — tames a crash-retry loop or a repeatedly-failing poll. Shown in the toast and centre.
This commit is contained in:
parent
e4dcfb3845
commit
7f358f63e3
3 changed files with 63 additions and 5 deletions
|
|
@ -320,7 +320,14 @@ function ClientActivityRow({
|
|||
<Icon className={`w-4 h-4 shrink-0 mt-0.5 ${color}`} />
|
||||
<div className="min-w-0 flex-1">
|
||||
{n.title && <div className="text-sm font-semibold">{n.title}</div>}
|
||||
<div className="text-sm break-words">{n.message}</div>
|
||||
<div className="text-sm break-words">
|
||||
{n.message}
|
||||
{n.repeat > 1 && (
|
||||
<span className="ml-1.5 align-middle text-[11px] font-semibold text-muted tabular-nums">
|
||||
×{n.repeat}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2 mt-0.5">
|
||||
<span className="text-[11px] text-muted">{relativeFromMs(n.ts)}</span>
|
||||
{needsAction && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue