Skip to content

fix(agent): refresh the icon theme after a Linux first install - #1600

Merged
AnthonyRonning merged 1 commit into
masterfrom
fix/linux-install-icon-theme-mtime
Nov 13, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
fix/linux-install-icon-theme-mtime

Conversation

@w3irdrobot

@w3irdrobot w3irdrobot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

User report: Maple Work 0.0.23 on Ubuntu 24.04 (GNOME Shell 46, Wayland). After install.sh, the app menu showed a gear instead of the Maple Work logo until the next login.

This happens when ~/.local/share/icons/hicolor/256x256/apps already exists, for example because another app put an icon there. A running GNOME Shell or GTK 3 process rescans the hicolor theme only when the modification time of the hicolor directory itself changes. Adding a file to an existing size directory does not change that time. The reporter confirmed that running touch ~/.local/share/icons/hicolor made the logo appear.

Change

After linux-install.py writes the integration files, it calls os.utime(~/.local/share/icons/hicolor). This is the same touch that xdg-icon-resource does. The installer has already checked that the directory exists and that the user owns it.

Verification

  • Throwaway harness, not committed because the packaging script test suites were removed in ci(agent): one dispatch builds, signs and publishes a Maple Work release #1420: it runs install() with a synthetic bundle into a temporary home where hicolor/256x256/apps already exists. On master the hicolor mtime does not change; on this branch it does.
  • The pre-commit hook (just ci-lint and just ci-test for Agent) passed.
  • Not run in a real GNOME session. Runtime confirmation comes from the reporter's manual touch.

The related icon-size mismatch (a 512x512 PNG in 256x256/) is tracked separately in #1599.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

A running GNOME Shell (and any GTK 3 process) rescans the hicolor theme
only when the mtime of the theme directory itself changes. When
~/.local/share/icons/hicolor/256x256/apps already exists, writing the
Maple Work icon into it leaves hicolor untouched, so the app menu shows
a fallback gear until the next login.

Bump hicolor's mtime after the integration files are written, the same
as xdg-icon-resource's touch.

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

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

Reviewed 29cd249. No blocking findings. The icon-theme refresh runs after integration writes within the existing rollback handler. CI is green. Focused Dev/Prod installer checks covered fresh and existing icon directories, receipts, reinstall refusal, and rollback on theme refresh failure. Live GNOME behavior was not independently exercised; local checks ran on macOS with the Linux rename primitive substituted.

@AnthonyRonning
AnthonyRonning merged commit 502dceb into master Nov 13, 2026
23 checks passed
@AnthonyRonning
AnthonyRonning deleted the fix/linux-install-icon-theme-mtime branch November 13, 2026 22:32
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.

2 participants