Skip to content

Honour expireTimeout on critical notification toasts - #13673

Closed
AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:cursor/fix-critical-expire-timeout-ef3e
Closed

AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:cursor/fix-critical-expire-timeout-ef3e

Conversation

@AnPod

@AnPod AnPod commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Critical toasts always used duration 0, so senders like omarchy-battery-low (-u critical -t 30000) never expired and were restored on every shell restart.

Keep untimed critical immortal; honour a positive expireTimeout with the same 8s–30s window as normal toasts.

Fixes #13100

Test plan

  • test/shell.d/notifications-test.sh
  • notify-send -u critical -t 3000 test expires; untimed critical stays

Critical toasts always used duration 0, so senders like omarchy-battery-low
(-t 30000) never expired and were restored forever. Keep untimed critical
immortal; honour a positive expireTimeout (omacom#13100).

Co-authored-by: AnPod <AnPod@users.noreply.github.com>
@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for this. Two things:

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for the fix, @AnPod. This makes the same change as #13100, which was opened four days earlier against quattro, so I'm closing this one as its duplicate.

I compared the two diffs. Both change durationFor in shell/plugins/notifications/Service.qml so a critical toast with a positive expireTimeout gets Math.min(maxPopupDuration, Math.max(normalPopupDuration, requested)) and an untimed one stays at 0, both update the toast lifecycle paragraph in docs/notifications.md and the popupExpired comment in NotificationLogic.js to match, and both guard it with a source-regex assertion in test/shell.d/notifications-test.sh. Nothing here is missing from #13100. Codex Medium was asked separately whether the two are the same change and agreed; its independence from this review is not guaranteed.

That cluster also has #12964, the oldest open fix for this bug, which takes a slightly different approach (no 8s floor on a timed critical toast) and is already verified. Which of them lands is the maintainer's call. If I've misread this and it does something #13100 doesn't, say so and it can be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants