Skip to content

Auto-select firmware when only one option is available#3150

Merged
gantoine merged 2 commits intomasterfrom
copilot/ui-ux-auto-select-firmware
Mar 21, 2026
Merged

Auto-select firmware when only one option is available#3150
gantoine merged 2 commits intomasterfrom
copilot/ui-ux-auto-select-firmware

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

When a platform has exactly one firmware file, the EmulatorJS player required manual selection from a single-item dropdown. It now auto-selects that file on mount.

Changes

  • frontend/src/views/Player/EmulatorJS/Base.vue — added biosFromSingleOption as the last fallback in the firmware resolution chain:
// Auto-select firmware if only one option is available
const biosFromSingleOption =
  firmwareOptions.value.length === 1 ? firmwareOptions.value[0] : undefined;

selectedFirmware.value =
  biosFromStorage ?? biosFromConfig ?? biosFromSingleOption ?? null;

Resolution priority (highest → lowest):

  1. biosFromStorage — user's last localStorage selection
  2. biosFromConfigbios_file set in config.yml
  3. biosFromSingleOption (new) — auto-select when exactly one firmware exists
  4. null
Original prompt

This section details on the original issue you should resolve

<issue_title>[UI/UX] Auto select firmware if only one file is available</issue_title>
<issue_description>Having to manually select a firmware entry from a list that only contains one item feels a bit silly. Would it be possible to autoselect the single entry if only one exists?

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Auto select firmware if only one file is available Auto-select firmware when only one option is available Mar 21, 2026
Copilot AI requested a review from gantoine March 21, 2026 12:35
@gantoine gantoine marked this pull request as ready for review March 21, 2026 13:22
Copilot AI review requested due to automatic review settings March 21, 2026 13:22
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 the EmulatorJS Player view to automatically select a firmware file when the current platform has exactly one available option, reducing unnecessary manual selection in the UI.

Changes:

  • Add a biosFromSingleOption fallback to firmware resolution on mount.
  • Update firmware selection priority to: localStorage → config.yml bios_file → single available option → null.

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

@gantoine gantoine merged commit c52bdf9 into master Mar 21, 2026
11 checks passed
@gantoine gantoine deleted the copilot/ui-ux-auto-select-firmware branch March 21, 2026 13:28
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.

[UI/UX] Auto select firmware if only one file is available

3 participants