Skip to content

fix(desktop): improve AppImage icon resolution#838

Open
Chrono-byte wants to merge 3 commits intopingdotgg:mainfrom
Chrono-byte:split/appimage-icon-resolution
Open

fix(desktop): improve AppImage icon resolution#838
Chrono-byte wants to merge 3 commits intopingdotgg:mainfrom
Chrono-byte:split/appimage-icon-resolution

Conversation

@Chrono-byte
Copy link

@Chrono-byte Chrono-byte commented Mar 10, 2026

What Changed

  • expand Linux icon lookup beyond the default Electron resource paths
  • check AppImage-specific locations such as .DirIcon and bundled hicolor icon paths
  • fall back to the packaged executable/icon naming used in the desktop build
  • cache the resolved icon path to avoid repeated filesystem probing during startup

Why

The Linux desktop build could launch without the correct window/taskbar icon when run as an AppImage, because the app was only checking generic resource paths that do not reliably exist in the packaged AppImage layout. This change makes icon resolution follow the actual AppImage filesystem structure so the packaged app displays the correct icon consistently.

Note

Fix AppImage icon resolution on Linux in desktop app

Adds a resolveAppImageIconPath function in main.ts that searches AppImage-specific locations for a valid icon path when the bundled icon.<ext> resource is not found. It checks candidate roots derived from process.resourcesPath, the executable directory, APPDIR, and APPIMAGE, looking for .DirIcon and PNG files in hicolor icon theme paths. Results are memoized to avoid repeated filesystem checks on subsequent calls.

Macroscope summarized a2c238f.

Copilot AI review requested due to automatic review settings March 10, 2026 19:33
@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 30b93526-48c0-47f0-aee3-2cb1be87aabc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves Linux desktop icon resolution (especially for AppImage packaging) by expanding the icon lookup paths and caching the resolved icon path to avoid repeated filesystem probing.

Changes:

  • Add AppImage-specific icon resolution logic (e.g., .DirIcon, usr/share/icons/hicolor/...).
  • Cache the resolved AppImage icon path to avoid repeated fs.existsSync checks.
  • Refactor imports/types and remove the desktop theme IPC handler.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Chrono-byte and others added 2 commits March 10, 2026 15:39
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Chrono-byte Chrono-byte force-pushed the split/appimage-icon-resolution branch from a0ecd00 to a2c238f Compare March 10, 2026 19:56
@Chrono-byte
Copy link
Author

My bad I pushed to the wrong remote across 2 pull requests, force pushed this one back.

Chrono-byte added a commit to Chrono-byte/t3code that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants