Skip to content

Fall back to the desktop-entry icon when app_icon is a file path - #16206

Open
yamz8 wants to merge 4 commits into
omacom:quattrofrom
yamz8:fix/notification-icon-path-fallback
Open

yamz8 wants to merge 4 commits into
omacom:quattrofrom
yamz8:fix/notification-icon-path-fallback

Conversation

@yamz8

@yamz8 yamz8 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

The notification card's icon is the first non-empty of app_icon, an image://icon/ name, and the desktop-entry hint (#15932). normalise() then blanks it when it isn't an icon name. So when a sender's app_icon is a file path (allowed by the spec, and some Electron and GTK apps do it), it is picked first, then blanked. The desktop-entry fallback is never tried, and the card shows a letter tile even though the hint names an app with a themed icon.

This picks the first candidate that is a valid icon name, so a path in app_icon passes to the next candidate instead of hiding it. normalise() reuses the same pattern.

Testing

  • test/shell.d/notifications-test.sh passes, with new cases for a plain path and a file:// path in app_icon with desktop-entry=chromium. They fail without the fix.
  • In the running shell, a Notify call with app_icon=/usr/share/icons/hicolor/48x48/apps/chromium.png and desktop-entry=chromium showed a letter tile on quattro (row appIcon: ""). With this branch it showed the Chromium icon (row appIcon: "chromium"). The bug needs an app name that is not itself an icon name, because Icons.candidates also tries the app name; the review run on a worker VM used pr16206-sender.

🤖 Generated with Claude Code

Fixes #18912

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Notification icons now fall back to a valid icon name when an earlier choice is a file path.

  • Notification cards skip icon paths and use the next valid icon name.

The update since the previous review only changes documentation and matches the implementation. No new issues found.

Reviews (4) · Last reviewed commit: "Document notification icon fallback orde..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 61b8b40, and nothing found to change.

Reproduced on a worker VM built from the Omarchy ISO, with the shell running from this branch. A real Notify call with app name pr16206-sender, app_icon=/usr/share/icons/hicolor/48x48/apps/chromium.png and the hint desktop-entry=chromium drew a letter tile with Store.js reverted to quattro, and the Chromium icon on this branch. With the app name Chromium, as in the description, both draw the icon, because Icons.candidates also tries the app name. So the bug shows when a sender's app name is not itself an icon name, and the fix covers exactly that case.

Tests on the worker: the new cases in test/shell.d/notifications/logic.cjs fail with Store.js reverted ('' !== 'chromium' at line 202) and pass on this branch. ./test/cli and all five notification shell tests pass. CI is green.

Second opinion: Codex Medium and muse-spark-1.3-contributor (via pi, thinking high) each reviewed the diff and found no defects. Their agreement with my reading is not a guaranteed independent check. Between them they confirmed that candidate order is unchanged, so no notification gets a worse icon than before; that non-string candidates still come out empty; that replaced and restored notifications go through the same validation; and that inline reply really is gone from the plugin, so the manifest wording is right. The manifest edit is outside the icon fix, but it is one correct line and not worth splitting.

No open issue reports this, and no other open pull request touches it. This waits on the maintainer.

@chessing234 chessing234 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.

all good

@chessing234 chessing234 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.

all good

…con-path-fallback

# Conflicts:
#	shell/plugins/notifications/manifest.json
@omarchybot omarchybot removed verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 23, 2026
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed again at c1ab0d4, after the two merges of quattro. Still nothing to change. The fix in Store.js is the same as at 61b8b40, and quattro still has the bug.

Reproduced on a worker VM built from the Omarchy ISO, with the shell running from this branch. A real Notify call with app name pr16206-sender, app_icon=/usr/share/icons/hicolor/48x48/apps/chromium.png and the hint desktop-entry=chromium drew a letter tile with Store.js reverted to the merge base, and the Chromium icon on this branch:

Before: Store.js reverted, the card shows a letter tile P
After: this branch, the card shows the Chromium icon

Tests on the worker: the new cases in test/shell.d/notifications/logic.cjs fail with Store.js reverted ('' !== 'chromium' at line 205) and pass on this branch. quattro has moved on since your last merge, including changes to Store.js, so I also merged this branch into the current quattro (c2818bb). It merges cleanly, and ./test/cli (129 ok) and the notification shell tests all pass there. CI is green.

Second opinion: Codex Medium and muse-wonder (via pi, thinking high) each reviewed the head against the current notification code and found no defects. They agree with my reading, but that is not a guaranteed independent check. They followed every reader of appIcon: Icons.js, the re-snapshot when a notification is replaced, and history restore through normalise(). None of them ends up with a worse icon than quattro gives.

One small thing for @yamz8: the description still says this removes "and replies" from the plugin description. quattro has already changed that line, so the merge dropped that hunk, and the last sentence of the description no longer matches the diff.

No open issue reports this, and no other open pull request changes icon selection. This waits on the maintainer.

Clarify that file paths give way to the next valid icon name. Fold the documentation idea from omacom#19031, with the wording adjusted for this fix's intermediate image://icon/ candidate.

Co-Authored-By: falkoro <39274208+falkoro@users.noreply.github.com>
Co-Authored-By: GPT-6 High <noreply@openai.com>
Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge and removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Nov 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Folded the documentation clarification from #19031 into 93f20896, crediting @falkoro. It describes the full icon-name order, including the intermediate image://icon/ name, and makes clear that a file path does not hide the next candidate.

Reproduced on a disposable worker built from the Omarchy ISO. A real Notify from pr16206-sender, with app_icon=file:///tmp/pr-16206-logo.png and desktop-entry=chromium, shows a letter tile on current quattro (c6be7abb) and the Chromium icon with this PR. The same result holds with this PR merged into that base. This reproduces the mechanism in #18912; Brave itself was not run on the worker.

Before: current quattro drops the desktop-entry hint and draws a letter tile P

After: the PR integrated with the same quattro base draws the Chromium icon

My own check fails on base, passes here, and fails again with the icon selection line reverted. It also checks that a valid app icon keeps priority, the intermediate icon name beats the desktop-entry hint, and path-valued hints are rejected. The CLI suite and focused notification tests pass on both the PR head and its integration with current quattro (125 and 136 CLI checks respectively).

Codex High checked the source and documentation. Opus 5.5 High and muse-wonder via pi, thinking high found nothing left to change in the final review. That agreement is not a guaranteed independent check. The documentation contribution from #19031 is now included; both pull requests remain open for the maintainer's decision. This waits on the maintainer.

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

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notifications: desktop-entry hint is ignored when app_icon is a file path, so the app shows a letter instead of its icon (4.5.0 regression)

3 participants