Skip to content

Honor never-expire notification timeouts - #8675

Closed
t4t5 wants to merge 1 commit into
omacom:quattrofrom
t4t5:fix/notification-never-expire
Closed

t4t5 wants to merge 1 commit into
omacom:quattrofrom
t4t5:fix/notification-never-expire

Conversation

@t4t5

@t4t5 t4t5 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Honor expire_timeout=0 as never-expire for low- and normal-urgency notifications instead of treating it like the server default.

The notification service currently collapses -1 (server default) and 0 (never expire) into the same timed path. Preserve that distinction through snapshotting and persistence so callers can request a persistent notification without inflating its urgency.

Legacy persisted popups retain their previous timed behavior. Critical notifications and history replay behavior remain unchanged.

This provides the dedicated “wants an answer” mechanism discussed in #7953. Related earlier discussion: #5059

Honor `expire_timeout=0` as never-expire for low and normal notifications instead of treating it as the server default.

This keeps persistence independent of urgency while preserving existing critical-notification behavior and timed history replays.
Copilot AI balanced review requested due to automatic review settings August 27, 2026 21:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates notification timeout handling so explicit zero values create persistent low- and normal-urgency toasts while preserving existing defaults and history behavior.

Changes:

  • Distinguishes server-default (-1) from never-expire (0) timeouts.
  • Versions persisted popups for legacy compatibility.
  • Adds documentation and focused lifecycle tests.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
shell/plugins/notifications/NotificationLogic.js Normalizes durations and versions persistence.
shell/plugins/notifications/Service.qml Applies the new duration policy.
test/shell.d/notifications-test.sh Tests timeout and legacy behavior.
docs/notifications.md Documents persistent timeout semantics.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ryanrhughes

Copy link
Copy Markdown
Collaborator

Thanks @t4t5! In the new notification engine (#15932), non-critical cards always time out (5s low, 8s normal, up to 30s if you ask for longer), and "stays until dismissed" is what critical means. So expire_timeout=0 on a normal notification won't pin it, by design. Closing for that reason.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants