Repository navigation
Conversation
[Low impact] The PR appears safe to merge. SummaryFixes notification icons when
Reviews (1) · Last reviewed commit: "no-mistakes(document): Document desktop-..." · Reviewed by Greptile |
|
Compared this head ( The clarification in Codex High reviewed the source. Opus 5.5 High and muse-wonder via pi, thinking high also compared both diffs and favored #16206; independence is not guaranteed. No runtime tests ran for this head: #16206 already carries |
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>
|
@dhh @omarchybot the desktop-entry icon fallback for a path Please consider closing this as superseded only after #21030 is accepted. Leaving the close to you. |
|
I checked the notification code, regression test, and docs in #21030. That bundle was closed without merging, and GPT-6 High in Codex checked the source, and Opus 5.5 High agreed on the choice of fix. Review independence is unverified. Tests were skipped for this competing fix. |
What changes
A notification whose sender passes a file path as
app_iconshowed a letter tile instead of the app's icon, even when the sender named itself in thedesktop-entryhint. Chromium-based browsers do this: Brave sends its logo as a temp file anddesktop-entrybrave-browser, and its notifications showed "B".Store.snapshot()took the first non-empty ofapp_icon, the-iicon name and thedesktop-entryhint. A path inapp_iconwon, andnormalise()then cleared it because it is not an icon name, so the hint was never read.Now
app_icon(or the-iname) is used only when it is an icon name; otherwise thedesktop-entryhint is used. An icon name inapp_iconstill wins over the hint, and a path in the hint is still dropped.docs/notifications.mddescribes the new order.Verification
bash test/shell.d/notifications-test.shpasses. It has one new assertion: afile://app_iconwithdesktop-entrybrave-browsergivesbrave-browser. Against the baseStore.jsthat assertion fails with''.gdbusnotifications and five more to a QuickshellNotificationServerrunning offscreen on a private D-Bus session, with abrave-browser.desktop(Icon=brave-desktop) in isolated XDG data, once with the base code and once with this change. Each went throughStore.snapshot,Icons.candidatesand the sameDesktopEntries.heuristicLookupthe card uses.app_iconas afile://URL or an absolute path, hintbrave-browser: base stores no icon and falls back to a letter; with this change it storesbrave-browserand the lookup findsbrave-desktop.app_iconwith a different hint: the name is kept, in both.app_iconwith no hint, a path in the hint, or../../etc/passwdin the hint: no icon stored and a letter tile, in both.Screenshots
No screenshot: the card is a layer-shell surface that needs a running compositor, and this was verified offscreen only. The visible change is that such a notification shows the app's icon where it showed a letter tile.
Fixes #18912