fix: add per-message debounce to suppress spammy repeated notifications #111
No reviewers
Labels
No labels
bug
ci
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
performance
priority
P0
priority
P1
priority
P2
question
refactor
size
L
size
M
size
S
size
XL
size
XS
tests
trivial
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/paso!111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix-106/notification-spamming"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When holding a navigation key at a boundary (e.g., right arrow at the last column), the same notification would fire on every keypress. This adds a 500ms debounce window keyed by level+message to NotificationState.Add(), so duplicate notifications are suppressed while different notification types still display normally.
https://claude.ai/code/session_01VvYN4LK94mdgoGsLezd7i8
Checklist
CONTRIBUTING.mdgo test ./... -race) locallygofmt -w .andgolangci-lint run ./...respectivelyREADME.mdif applicableSummary
Closes: #106
@ -77,2 +109,4 @@return}for i, n := range s.notifications {if n.ID == id {The
lastSeenmap is never pruned. Every uniquelevel:messagekey ever seen accumulates indefinitely for the lifetime of the process. In a long-running TUI session with many distinct navigation boundary messages, this is an unbounded memory leak.Since
Addalready checksnow.Sub(lastTime) < s.debounceDuration, expired entries could be deleted at that point:@ -77,2 +109,4 @@return}for i, n := range s.notifications {if n.ID == id {that is never going to happen pal