Skip to content

Conversation

@ethanndickson
Copy link
Member

Summary

Fix ./mux.AppImage --no-sandbox and other Electron flags not working - they were incorrectly falling through to CLI help instead of launching the desktop app.

Problem

After the previous CLI argv fix (#1161), Electron flags like --no-sandbox in packaged AppImage were treated as unknown CLI arguments:

./mux.AppImage --no-sandbox  # showed CLI help instead of launching desktop

Root Cause

isElectronLaunchArg() immediately returned false for all packaged Electron flags, not distinguishing between:

  • CLI flags (--help, --version) → should show CLI help
  • Electron flags (--no-sandbox, --disable-gpu) → should launch desktop

Solution

  • Add CLI_GLOBAL_FLAGS constant listing flags that should show CLI help
  • Update isElectronLaunchArg() to return true for non-CLI flags in packaged mode
  • Add runtime sanity check (dev mode only) to warn if flags get out of sync
  • Add tests for the new behavior

Manual Test Results

Command Result
./mux.AppImage --no-sandbox ✅ Launches desktop
./mux.AppImage --disable-gpu ✅ Launches desktop
./mux.AppImage --help ✅ Shows CLI help
./mux.AppImage --version ✅ Shows version
./mux.AppImage server --help ✅ Shows server options
bunx electron . --no-sandbox ✅ Launches desktop (dev mode)

Generated with mux • Model: anthropic:claude-sonnet-4-20250514 • Thinking: low

- Distinguish CLI flags (--help, --version) from Electron flags (--no-sandbox)
- CLI flags show help/version; Electron flags launch desktop
- Export CLI_GLOBAL_FLAGS constant with sync documentation
- Add runtime sanity check in dev mode for flag consistency
- Add tests for packaged Electron flag handling (31 total)
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ethanndickson ethanndickson added this pull request to the merge queue Dec 16, 2025
Merged via the queue into main with commit e793c89 Dec 16, 2025
20 checks passed
@ethanndickson ethanndickson deleted the appimage-7hpn branch December 16, 2025 03:33
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.

1 participant