Repository navigation
fix(launcher): show real macOS application icons - #2218
Conversation
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.
There was a problem hiding this comment.
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: 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.
|
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. |
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
local-app-icon.ts: on macOS,.appbundles usenativeImage.createThumbnailFromPath(96px) first, falling back to the small native file icon. Windows/Linux unchanged;largeis still never requested.Verification
tsc --noEmit(apps/desktop), style-token lint, launcher tests (80/80) pass.