Skip to content

fix: rewrite webapp desktop Icon= paths orphaned by quattro upgrade - #6884

Open
aledx18 wants to merge 13 commits into
omacom:quattrofrom
aledx18:fix/upgrade-webapp-icons
Open

aledx18 wants to merge 13 commits into
omacom:quattrofrom
aledx18:fix/upgrade-webapp-icons

Conversation

@aledx18

@aledx18 aledx18 commented Aug 14, 2026

Copy link
Copy Markdown

Problem

After upgrading Omarchy 3 → 4 (Quattro), some web apps (e.g. ChatGPT, GitHub) lose their icon in the launcher/menu. The row renders with no icon even though the app launches fine.

Root cause

bin/omarchy-upgrade-to-quattro moves the legacy webapp icons from ~/.local/share/applications/icons/ into a .bak backup (lines ~2231-2262):

legacy_icons_dir="$HOME/.local/share/applications/icons"
...
mv -f "$legacy_icons_dir/$icon" "$legacy_icons_backup/"

…but never rewrites the .desktop files in ~/.local/share/applications/ that reference that directory with an absolute Icon= path (e.g. Icon=/home/user/.local/share/applications/icons/ChatGPT.png). After the move, those references dangle, so the launcher shows the row without an icon.

Why only some web apps break: the web apps Omarchy still ships as defaults get fresh .desktop files from $root/applications (which use bare icon names like Icon=docker, resolved via the hicolor theme). Web apps dropped from the defaults (ChatGPT → desktop app, GitHub removed) keep their legacy .desktop with the absolute path → broken icon.

Fix

After the icons move to the backup, rewrite any .desktop whose Icon= points into the legacy directory to use the bare icon name instead. The hicolor theme (~/.local/share/icons/hicolor/48x48/apps/, plus any 256x256 copies) still holds the PNGs, so Icon=ChatGPT resolves correctly; a genuinely missing icon falls back to a generic placeholder rather than a dead file path.

This matches the pattern the upgrade already uses for its own .desktop copies (bare icon names, theme-resolved).

Verification

  • bash -n bin/omarchy-upgrade-to-quattro — clean
  • git diff --check — clean
  • Reproduced the broken state on an upgraded Omarchy 4.0.0 install (ChatGPT + GitHub icons missing), applied the equivalent fix manually, icons restored.

Note: dev (3.8.5 line) does not carry the Quattro shell test infrastructure (test/shell.d/), so there is no dedicated upgrade test file to extend on this branch.

pkwagner and others added 10 commits June 19, 2026 18:05
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Add QR code capture

* Keep the decoded QR value on the clipboard only

Freeze the screen before selecting like the other region captures do,
restrict decoding to QR so stray barcodes can't take the clipboard, and
stop echoing the decoded value to stdout and the notification, since an
otpauth:// secret would otherwise land in the journal and notification
history.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Mark the copied QR value as sensitive

Clipboard history records every selection, so the otpauth:// secret this
command is built to capture would survive in it. --sensitive offers the
x-kde-passwordManagerHint type that the clipboard capture skips on.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Offer the Quattro upgrade from the Update menu

Ship omarchy-upgrade-to-quattro as a command on the dev branch and add
an "Omarchy To Quattro" entry under Update, so the upgrade can be
started from the menu instead of curl | bash.

The Quattro case comes before the *Omarchy* case because the existing
glob would otherwise swallow the new label. The script is the copy that
already ships on rc, so the two branches stay identical.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Invite the Quattro upgrade once after updating

Send a one-time notification when this version lands, and add the mako
rule that turns it into a click target for omarchy-upgrade-to-quattro,
the same way the Wi-Fi, update, and Voxtype invitations work.

The migration tolerates a missing session so an update run without a
desktop doesn't fail on the notification.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Set the version to 3.8.5

dev sits on the Omarchy 3 line alongside master and rc, but its version
file had been bumped to 4.0.0.alpha, so anything reading it reported a
release this branch does not carry. rc moves to 3.8.5 alongside this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Kernel 7.1 unpacks the initramfs asynchronously, which races /init: the
early /proc, /sys, /dev, and /run mounts fail while unpacking settles, so
plymouthd exits when it can't read /proc/cmdline and encrypted boots fall
back to an unthemed text LUKS prompt. Pin initramfs_async=0 in the Limine
defaults for fresh installs, and drop it into a Limine config plus a UKI
rebuild for existing ones.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The quattro upgrade moves ~/.local/share/applications/icons/*.png to a
.bak backup but leaves webapp .desktop files pointing at the now-empty
directory, so their launcher rows lose their icon. Point Icon= at the
bundled hicolor icon name when one exists and drop the line otherwise.
Copilot AI balanced review requested due to automatic review settings August 14, 2026 19:02

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.

Copilot wasn't able to review any files in this pull request.


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

The upgrade moves a fixed list of icon filenames to the backup, so every
other icon in the legacy directory stays put and its Icon= path still
resolves — Figma and Fizzy among the webapps 3.x installs by default,
plus any icon a user added. Rewriting those replaced a working icon with
a placeholder. The bare filename also never matched anything: Quattro
installs webapp icons under lowercase dashed names, so HEY.png resolves
as "hey" and "Google Photos.png" as "google-photos".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 15, 2026 10:26

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.

Copilot wasn't able to review any files in this pull request.

omarchybot and others added 2 commits September 28, 2026 03:58
GitHub is a 3.x default webapp whose icon Quattro does not package, so rewriting its launcher to Icon=github still left it without an icon. Copy the PNG the upgrade just moved to the backup into the user hicolor theme under the normalized name, where omarchy-webapp-install puts user icons and the shell's icon index finds them. A packaged icon, or one the user already has there, is left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce it

Redirecting awk into a new file and moving it over the launcher reset 3.x's 0755 to 0644; writing over a copy made with cp -p keeps the mode. A re-run after an interrupted upgrade finds the icon in an earlier backup rather than this run's, so there is nothing to install; rewriting to a name nothing provides would lose the path a later repair needs, so the launcher is left as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Sep 28, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and reproduced; the bug is real, and I pushed two small fixes to your branch.

What was checked. I ran the upgrade's legacy-icon block on a disposable Omarchy 4.0.4 VM against a fake 3.x home with the default web apps, their icons in ~/.local/share/applications/icons and their launchers executable, as 3.x's installer leaves them. Then I checked whether each launcher's Icon= resolves the way the shell's icon index looks it up. On dev, ChatGPT and GitHub are left pointing at files the upgrade just moved into the backup. test/omarchy-cli-test.sh passes on the new head on the same VM.

What I pushed (8dcc449):

  • GitHub still had no icon. Quattro packages no github icon, so rewriting the launcher to Icon=github just swapped a dead path for a placeholder. Where the theme has no icon by the normalized name, the loop now installs the backed-up PNG into ~/.local/share/icons/hicolor/256x256/apps/, the same place omarchy-webapp-install puts user icons.
  • Launchers lost their executable bit. Writing the rewrite to a new file and moving it over the original turned 3.x's 0755 into 0644. It now writes over a cp -p copy.
  • A re-run after an interrupted upgrade finds the PNG in an earlier backup, not this run's, so there is nothing to install. The launcher's path is now left as it was instead of being pointed at a name nothing provides, so a later repair can still find it.

With these changes, ChatGPT, GitHub, HEY and Google Photos all resolve at mode 755. Figma and Fizzy, whose icons the upgrade doesn't move, are left alone.

Second opinion. Codex (medium effort) reviewed the branch twice. The launcher-mode and re-run problems were its findings, and its second round on 8dcc449 found nothing further. It can read this session's working notes, so its agreement isn't guaranteed to be independent.

Related. #6972 targets the same report, #6883, on quattro. It takes a different approach: the upgrade stops moving any PNG a launcher still references, and a migration restores icons on machines that already upgraded. This PR fixes the dev copy of the script, the one 3.x users run, and does nothing for machines already upgraded. #6883's ghost Alacritty launcher isn't covered here either. Codex preferred #6972's approach of keeping the PNGs, backported to dev. This PR instead moves launchers onto Quattro's icon-theme names. Which approach to take is the maintainer's call, so this waits on them.

@omarchybot
omarchybot changed the base branch from dev to quattro September 28, 2026 05:52
@omarchybot omarchybot removed verified Omarchy Triage has verified that this issue is ready for final review bug Something isn't working labels Sep 28, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This pull request now targets quattro, but its branch was built on dev, so it can't be merged or ported as it stands. It waits on the maintainer.

The branch brings unrelated dev changes with it. The fix is four commits and 26 lines in bin/omarchy-upgrade-to-quattro. Against quattro, though, the branch's diff is 11 files and 2,548 lines, because it also carries dev's own history since the two branches split. Merging it into quattro would add two dev migrations (migrations/1786448733.sh, which invites 3.x users to upgrade to Quattro, and migrations/1786479765.sh), set version to 3.8.5, and bring back bin/omarchy-update-perform and default/mako/core.ini, which quattro has deleted. Merging quattro into this branch doesn't fix that, because those commits would still be in its history. I pushed nothing: removing them from your branch isn't my call.

The bug is still present on quattro. quattro's copy of the legacy-icon block in bin/omarchy-upgrade-to-quattro (lines 2187–2217) is identical to the one this fix was written against. It moves the PNGs into the backup and leaves any .desktop whose Icon= pointed at them with a dead path. Copying the stock launchers afterwards repairs the ones quattro ships a launcher for, but not GitHub. The fix's own hunk applies there unchanged, and bin/omarchy-webapp-install on quattro uses the same icon directory and name normalization it relies on. My earlier reproduction and suite run on the worker covered the dev copy. They haven't been repeated on quattro.

Classification is unsettled. I classified this as a bug fix. Codex (medium effort) classified it as an enhancement, looking at the pull request's diff against quattro, which is mostly the dev history above. So I've left it without a class label until the branch shows only the fix. Codex also reviewed the porting question separately and reached the same conclusions: the unrelated history, the bug still present on quattro, and the hunk applying unchanged. I checked each of these against the tree. It can read this session's working notes, so its agreement isn't guaranteed to be independent.

What the maintainer can choose between: carry only the 26-line fix onto a fresh branch off quattro, or take #6972. #6972 targets quattro directly and fixes #6883 differently: it keeps the PNGs and adds a migration for machines that have already upgraded.

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.

7 participants