Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Prefer Electron shell before Linux opener fallback for external URLs#30

Merged
rexlManu merged 1 commit intomainfrom
t3code/fix-default-browser-launch
Mar 9, 2026
Merged

Prefer Electron shell before Linux opener fallback for external URLs#30
rexlManu merged 1 commit intomainfrom
t3code/fix-default-browser-launch

Conversation

@rexlManu
Copy link
Copy Markdown
Owner

@rexlManu rexlManu commented Mar 9, 2026

Summary

  • Update openExternalUrl to try Electron shell.openExternal first on all platforms.
  • On Linux, fall back to the Linux external opener only if Electron shell throws.
  • Add Linux-focused tests for success path, fallback behavior, and full failure behavior.
  • Keep non-Linux behavior unchanged (return false when Electron shell fails).

Testing

  • Added unit tests in apps/desktop/src/openExternal.test.ts covering:
    • Linux prefers Electron shell when it succeeds.
    • Linux falls back to Linux opener when Electron shell fails.
    • Linux returns false when both openers fail.
  • Existing test coverage still includes non-Linux fallback behavior.
  • bun lint: Not run
  • bun typecheck: Not run

- try `shell.openExternal` first on Linux
- fall back to Linux opener only if Electron shell throws
- add tests for Linux success, fallback, and dual-failure paths
@rexlManu rexlManu merged commit ccb8c49 into main Mar 9, 2026
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant