Skip to content

Apply DISABLE_EMULATOR_JS to Console mode (disable Play + block direct player route) - #3373

Merged
gantoine merged 3 commits into
masterfrom
copilot/feature-disable-console-button
May 14, 2026
Merged

Apply DISABLE_EMULATOR_JS to Console mode (disable Play + block direct player route)#3373
gantoine merged 3 commits into
masterfrom
copilot/feature-disable-console-button

Conversation

Copilot AI commented May 14, 2026

Copy link
Copy Markdown
Contributor

DISABLE_EMULATOR_JS disabled web-player entry points but Console mode could still launch EmulatorJS via the Console Play flow. This change aligns Console behavior with the existing emulator disable contract so RomM can run as library-only.

  • Console Game view now respects emulator disable state

    • frontend/src/console/views/Game.vue
    • Added a computed flag from heartbeat emulation config.
    • Prevented play() execution when DISABLE_EMULATOR_JS is enabled.
    • Disabled the Console Play button and applied disabled visual state.
  • Direct Console player route is guarded

    • frontend/src/console/views/Play.vue
    • On mount, if DISABLE_EMULATOR_JS is enabled, route redirects to ROUTES.CONSOLE_ROM instead of booting EmulatorJS.
    • Prevents bypass via direct navigation/deep links.
  • Behavioral impact

    • Console mode no longer provides a path to EmulatorJS when DISABLE_EMULATOR_JS=true, matching non-console behavior.
// Game.vue
const isConsoleEmulationDisabled = computed(
  () => heartbeatStore.value.EMULATION.DISABLE_EMULATOR_JS,
);

async function play() {
  if (!rom.value || isConsoleEmulationDisabled.value) return;
  // existing navigation to CONSOLE_PLAY...
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • images.igdb.com
    • Triggering command: /home/REDACTED/work/romm/romm/.venv/bin/pytest pytest -q (dns block)
  • trunk.io
    • Triggering command: /usr/bin/wget wget --verbose --tries=3 --limit-rate=10M REDACTED --output-document /home/REDACTED/.cache/trunk/cli/tmp.wmCWIfrXQG/launcher/install/download-1.25.0.tar.gz (dns block)
    • Triggering command: /usr/bin/wget wget --verbose --tries=3 --limit-rate=10M REDACTED --output-document /home/REDACTED/.cache/trunk/cli/tmp.GhQf2quUso/launcher/install/download-1.25.0.tar.gz k/romm/romm/.git38273cb4b615bcd3cf358abfee6b67ff0c25ce3a51048bf7a4341b0be1ea268d 7ff0c25ce3a51048bf7a4341b0be1ea268d/log.json e1f326594d0e857e-q (dns block)
    • Triggering command: /usr/bin/wget wget --verbose --tries=3 --limit-rate=10M REDACTED --output-document /home/REDACTED/.cache/trunk/cli/tmp.QPvx1ajRBY/launcher/install/download-1.25.0.tar.gz /opt/hostedtoolcache/uv/0.11.14/--systemd-cgroup 7ff0c25ce3a51048bf7a4341b0be1ea268d/log.json by/1dbdbdd52ae40-u ea6b77f1f6729997 b622b72087ed5fb4fe0f.pid conf�� --local s1809536002 ache/node/18.20.8/x64/lib/node_mjson by/38273cb4b615b/usr/bin/runc.original 7ff0c25ce3a51048bf7a4341b0be1ea268d/b901b933e8a91f7d66f9be4b0b170835ab0199d2dd472c25de740d9fab64c350.pid cf358abfee6b67ff/var/run/docker/runtime-runc/moby dad706e268ec0496--log (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue May 14, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add option to disable console button in emulator Apply DISABLE_EMULATOR_JS to Console mode (disable Play + block direct player route) May 14, 2026
Copilot AI requested a review from gantoine May 14, 2026 18:42
@gantoine
gantoine marked this pull request as ready for review May 14, 2026 19:45
Copilot AI review requested due to automatic review settings May 14, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Console mode so DISABLE_EMULATOR_JS also blocks Console EmulatorJS launch paths, aligning Console behavior with the existing library-only/emulator-disabled contract.

Changes:

  • Adds Console Game view disable-state handling for the Play action and button.
  • Adds a direct-route guard in Console Play view to redirect away when EmulatorJS is disabled.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frontend/src/console/views/Game.vue Adds a heartbeat-derived disabled flag, blocks play(), and disables/styles the Play button.
frontend/src/console/views/Play.vue Imports heartbeat state and redirects direct Console player route visits when EmulatorJS is disabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/console/views/Play.vue
@gantoine
gantoine merged commit de44d5b into master May 14, 2026
10 checks passed
@gantoine
gantoine deleted the copilot/feature-disable-console-button branch May 14, 2026 19:50
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.

[Feature] Disabling console

3 participants