Skip to content

fix(desktop): use a supported macOS bundle icon size - #3353

Draft
sunrioa wants to merge 1 commit into
apache:mainfrom
sunrioa:fix/packaged-macos-permission-icon-crash
Draft

fix(desktop): use a supported macOS bundle icon size#3353
sunrioa wants to merge 1 commit into
apache:mainfrom
sunrioa:fix/packaged-macos-permission-icon-crash

Conversation

@sunrioa

@sunrioa sunrioa commented Aug 20, 2026

Copy link
Copy Markdown

Summary

Use Electron's macOS-supported normal file-icon size for the packaged permission overlay. Both native bundle-icon reads now share the same option, while unpackaged development continues to skip native icon loading.

Add a regression test covering the unpackaged bypass and the packaged normal option.

Fixes #3352
Refs #1919
Refs #1920

Verification

Passed locally:

  • corepack npm --workspace @maka/desktop test — 979 passed
  • corepack npm --workspace @maka/desktop run e2e — 34 passed, 1 skipped
  • corepack npm run lint — passed
  • corepack npm run format:check — passed
  • corepack npm run build — passed
  • corepack npm run typecheck — passed
  • corepack npm exec -- knip --workspace apps/desktop — passed
  • corepack npm exec -- knip --workspace packages/ui — passed
  • corepack npm run astryx:theme -- --check — passed
  • node scripts/audit-alignment.mjs — passed
  • node --test --test-concurrency=1 scripts/ci-test-plan.test.mjs — 21 passed
  • corepack npm run windows:inventory — passed
  • git diff --check — passed

corepack npm test was also attempted, but was not green on this machine for failures outside this Desktop change:

  • Eval's Harbor Python test requires Python 3.10+; this host has Python 3.9.6.
  • One Storage child-process test treats Node's SQLite experimental warning on stderr as a failure; that test file passes 5/5 with NODE_NO_WARNINGS=1.
  • Runtime and MCP passed when rerun separately (Runtime: 2968 passed, 13 skipped; MCP: 115 passed).

Not run:

  • Manual smoke test of the fix in a signed/notarized macOS package; release signing/notarization credentials are unavailable.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope:

OpenAI Codex assisted with crash-log analysis, implementation, the regression test, local verification, and drafting this description. I reviewed the final diff and test results.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Automated Codex review on exact head 654ef0c506b521c5641656bd2e4145e2b1585dce found no actionable code issue.

The bug still exists on current main: both packaged macOS icon reads request Electron's unsupported large size, matching the native IconLoader::ReadIcon() crash evidence in #3352. Centralizing the supported { size: 'normal' } option in loadNativeBundleIcon fixes both call sites without changing the unpackaged bypass, and the focused test would fail if the old option returned.

Required conclusions:

  1. Optimal for the actual problem: yes.
  2. Production code to delete: none identified.
  3. Tests to delete/replace: none identified.
  4. Deeper refactor: no; the shared icon-loading helper is the correct owner.
  5. Ready to merge: no; the PR is Draft, has no hosted required test, and has no independent human review.
  6. Residual risk/gaps: the package-only native crash has not been smoked in a signed/notarized macOS bundle; a maintainer should decide whether the Electron contract plus focused test is sufficient or require that package evidence before leaving Draft.

This changes user-visible packaged-app behavior and therefore requires independent human review under CONTRIBUTING.md. No security, licensing, governance, or public-contract effect was identified.

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.

bug(desktop): packaged macOS permission guide crashes while loading the app icon

2 participants