Skip to content

fix(launcher): show real macOS application icons - #2218

Merged
vastsa merged 2 commits into
mainfrom
fix/launcher-mac-app-icons
Nov 9, 2026
Merged

vastsa merged 2 commits into
mainfrom
fix/launcher-mac-app-icons

Conversation

@vastsa

@vastsa vastsa commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Problem

On macOS app.getFileIcon(bundle, { size: "small" }) returns the generic bundle placeholder for every .app, so all installed applications in the plugin launcher show the same blank square.

Fix

  • New local-app-icon.ts: on macOS, .app bundles use nativeImage.createThumbnailFromPath (96px) first, falling back to the small native file icon. Windows/Linux unchanged; large is still never requested.
  • Native app icons fill the 48px tile instead of being nested in a second rounded square; the active tile is filled instead of outlined.

Verification

  • Measured locally on 101 stock/installed macOS apps: all thumbnails non-empty, max ~19 KiB (< 32 KiB budget), ~3s total.
  • tsc --noEmit (apps/desktop), style-token lint, launcher tests (80/80) pass.

app.getFileIcon() returns the same generic bundle placeholder for every
.app on macOS, so every installed application in the launcher rendered
as an identical blank square. Prefer the Quick Look thumbnail of the
bundle (96px, well inside the 32 KiB icon budget) and fall back to the
small native file icon; other platforms keep the existing lookup.

Native application icons now fill the tile instead of sitting inside a
second rounded square, and the active tile is a filled cell rather than
an outlined one.
Copilot AI balanced review requested due to automatic review settings November 9, 2026 12:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@aiuo-codepilot aiuo-codepilot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

AIUO CodePilot · Preliminary review

Diff-only preliminary review. The new `local-app-icon.ts` module and its macOS thumbnail-first fallback are internally consistent, and the added unit tests cover the main selection paths. I did find one concrete issue in the launcher CSS: `--ds-bg-active` is introduced as the filled selection background but nothing in this diff defines or references that token elsewhere, which may leave the selected tile background undefined. Verification limits: this is a diff-only review with no execution, tests, type-check, lint, macOS icon measurement, or repository access, so claims in the PR body and any token definitions outside the shown hunks could not be confirmed.

  • medium apps/desktop/src/styles/plugin\-launcher\.css:182: The active tile rule replaces the previous explicit background with `var(--ds-bg-active)`, but this diff does not add or show a definition for `--ds-bg-active` anywhere in the token layer or launcher styles. If that custom property is not defined on the relevant scope, the computed background becomes guaranteed-invalid and the active tile will not get the intended filled selection state (and may fall back to the parent background). The comment claims a filled cell, so an undefined token would make that behavior absent rather than merely different. Confirm the token exists on `html[data-surface="plugin-launcher"]` or the shared design-token layer, or use a defined variable/colour.
    Evidence: background&#58; var\(\-\-ds\-bg\-active\);

Head: 157092d
Base: f23440c
CI: pending; mergeable: true.

Validation: code/tests NOT EXECUTED. Diff-only preliminary analysis; not approval. Human review and repository gates remain required.

vastsa commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Independent review of 157092d: reproduced the native failure on this Mac with Electron using Calculator, Notes and Calendar. All three small file icons were the same 798-character data URL (identical SHA-256); createThumbnailFromPath returned three distinct, nonempty results of 9,374 / 8,110 / 11,466 characters, within the existing budget. The fallback logic retains small native icons on other platforms and catches thumbnail failures. Local application/launcher tests pass 80/80 and desktop tsc --noEmit passes. This confirms the API-level problem and proposed lookup direction; it does not yet establish the rendered launcher acceptance.

Landing remains pending: origin/main has advanced to e3d89c4 (after #2219), so the current head does not include latest main. The integrated candidate still needs a real launcher interaction check: distinct installed-app tiles, fallback tile, selected/keyboard-focus states, and opening the selected app. The global .active styling change also affects plugin tiles and is independent of native icon lookup; please consider keeping that separate, or include plugin-tile selection/focus in the interaction verification. No approval or merge yet; existing CI is green for the earlier base.

@vastsa
vastsa merged commit ab56bfe into main Nov 9, 2026
5 checks passed
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