Skip to content

Support file:// URLs in app_icon field#132

Merged
leviport merged 1 commit into
pop-os:masterfrom
eventualbuddha:fix-notification-icon
Feb 6, 2026
Merged

Support file:// URLs in app_icon field#132
leviport merged 1 commit into
pop-os:masterfrom
eventualbuddha:fix-notification-icon

Conversation

@eventualbuddha
Copy link
Copy Markdown
Contributor

Handle file:// URLs in the app_icon field for notifications from Chromium-based browsers (e.g., Helium, Chrome, Chromium).

These browsers send temporary icon file paths like:
file:///tmp/org.chromium.Chromium.scoped_dir.XXX/logo.png

Previously, COSMIC tried to load these as icon names via from_name(), which failed. Now we:

  • Detect file:// URL prefix in app_icon
  • Parse and convert to file path
  • Load icon using from_path() instead

This allows app icons to display correctly in notifications from web applications running in Chromium-based browsers.


This was originally posted as part of #130, which was closed in favor of #115. However, only part of #130 was related to the HTML stripping feature.

Handle file:// URLs in the app_icon field for notifications from
Chromium-based browsers (e.g., Helium, Chrome, Chromium).

These browsers send temporary icon file paths like:
  file:///tmp/org.chromium.Chromium.scoped_dir.XXX/logo.png

Previously, COSMIC tried to load these as icon names via from_name(),
which failed. Now we:
- Detect file:// URL prefix in app_icon
- Parse and convert to file path
- Load icon using from_path() instead

This allows app icons to display correctly in notifications from
web applications running in Chromium-based browsers.
@jackpot51 jackpot51 requested a review from a team February 6, 2026 14:59
@leviport leviport self-assigned this Feb 6, 2026
@leviport leviport merged commit 998f173 into pop-os:master Feb 6, 2026
10 checks passed
@eventualbuddha eventualbuddha deleted the fix-notification-icon branch February 6, 2026 22:39
olafkfreund added a commit to olafkfreund/cosmic-ext-notifications-ng that referenced this pull request Feb 11, 2026
Sync upstream change from pop-os#132.
When app_icon contains a file:// URL, parse it and use
icon::from_path() instead of treating it as an icon name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
olafkfreund added a commit to olafkfreund/cosmic-ext-notifications-ng that referenced this pull request Feb 11, 2026
Sync upstream change from pop-os#132.
When app_icon contains a file:// URL, parse it and use
icon::from_path() instead of treating it as an icon name.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants