Skip to content

feat(integrations): launch flags, joychromium:// links and quick tasks - #97

Merged
lippdev merged 3 commits into
mainfrom
feat/integrations
Oct 21, 2026
Merged

lippdev merged 3 commits into
mainfrom
feat/integrations

Conversation

@lippdev

@lippdev lippdev commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Makes JoyChromium easy for launchers (ConsoleMode, Playnite, Steam, shortcuts) to open, documented in docs/INTEGRATIONS.md.

  • Command line (src/shared/launchArgs.ts, unit-tested): --tv (aliases --kiosk and --fullscreen) and --window apply for this run only, so the saved preference stays. --new-tab and a URL are also accepted. Before this, the first launch ignored its argv (only JOYCHROMIUM_START worked).
  • Second launch: it hands its flags to the running instance, which focuses, applies the mode and opens the URL in a new tab. Before, the URL replaced the tab that was playing.
  • joychromium:// registered with the OS via build.protocols (NSIS, Info.plist and .desktop). Only public internal pages and joychromium://open?url=<https> are accepted; chrome, design, file: and javascript: are dropped. macOS uses open-url.
  • Windows jump list: New tab, TV mode, Window mode.
  • Quick menu → "Fechar o JoyChromium", so a controller user can go back to the launcher.
  • Shell.windowMode = command-line mode ?? saved mode. The menu toggle and Esc now read it, so a --window run toggles correctly.

Checked on Windows with the packaged build: Electron starts 5 JoyChromium.exe processes and only the main one has a MainWindowHandle. The doc tells ConsoleMode to pick the process that has a window, and records the NSIS uninstall key for detection.

Test plan

  • npm run typecheck
  • npm test (103 passed)
  • npm run test:e2e (48 passed, 3 skipped). The new launch.spec.ts starts with --window and a URL, then spawns a second launch with --tv and joychromium://open?url=…
  • Protocol registration through the real NSIS installer (not run here, to avoid replacing the installed 0.1.3)

CI: on Linux the chrome-sandbox setup now runs before the e2e, not only before the Wayland smoke. Without it, the second Electron that launch.spec.ts spawns aborts. The spec now prints that process's output and the app log when it fails.

🤖 Generated with Claude Code

lippdev and others added 3 commits October 21, 2026 14:49
So launchers such as ConsoleMode, Playnite or Steam can open the browser
the way they need it:

- Command line: --tv (alias --kiosk, --fullscreen) and --window for this
  run only, --new-tab, and a URL. The first launch used to ignore its
  argv; a second launch now opens its URL in a new tab instead of
  replacing the one playing, and applies the mode.
- The installer registers joychromium:// with the OS; public internal
  pages and joychromium://open?url=<https URL> are accepted, anything
  else is dropped. macOS links arrive through open-url.
- Windows jump list: New tab, TV mode, Window mode.
- Quick menu: "Fechar o JoyChromium", so a controller user returns to the
  launcher without a mouse.
- docs/INTEGRATIONS.md: flags, scheme, how to detect the install, which
  process to watch, and the ConsoleMode setup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
launch.spec.ts spawns a second Electron by hand, and without a root-owned
setuid chrome-sandbox it aborts on Linux before it can hand its URL to the
running app. The setup used to run only in the later Wayland step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lippdev
lippdev merged commit 82447f7 into main Oct 21, 2026
5 checks passed
@lippdev
lippdev deleted the feat/integrations branch October 21, 2026 18:15
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