Skip to content

Conversation

Copy link

Copilot AI commented Nov 14, 2025

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Add new_install_prevent_erase manifest option to completely prevent device erase

Problem

As reported in issue #356, the current new_install_prompt_erase option only prompts the user whether to erase the device, but doesn't prevent them from selecting the erase option. Users can still accidentally erase all saved settings by checking the "Erase device" checkbox.

Solution

Add a new manifest option new_install_prevent_erase that completely disables the ability to erase devices during installation. When this option is set to true:

  1. The installation will always proceed without erasing
  2. The "ASK_ERASE" dialog will not be shown
  3. The "Erase User Data" menu item will be hidden from the dashboard
  4. Users cannot accidentally erase their device settings

Implementation Details

1. Add new manifest interface property

In src/const.ts, add new_install_prevent_erase?: boolean; to the Manifest interface.

2. Update installation logic in src/install-dialog.ts

  • Modify _renderDashboardNoImprov() to check for new_install_prevent_erase and force erase: false
  • Modify _renderDashboard() to check for new_install_prevent_erase and force erase: false
  • Hide the "Erase User Data" menu item when new_install_prevent_erase is true

3. Update documentation

Add documentation about the new new_install_prevent_erase option in index.html.

Behavior Comparison

  • new_install_prompt_erase: true - Shows a dialog asking if user wants to erase (user can still choose to erase)
  • new_install_prevent_erase: true (new) - Completely prevents erasing, no erase option shown to user
  • Default behavior - Automatically erases on new install without prompting

Related Issue

Fixes #356

This pull request was created as a result of the following prompt from Copilot chat.

Add new_install_prevent_erase manifest option to completely prevent device erase

Problem

As reported in issue #356, the current new_install_prompt_erase option only prompts the user whether to erase the device, but doesn't prevent them from selecting the erase option. Users can still accidentally erase all saved settings by checking the "Erase device" checkbox.

Solution

Add a new manifest option new_install_prevent_erase that completely disables the ability to erase devices during installation. When this option is set to true:

  1. The installation will always proceed without erasing
  2. The "ASK_ERASE" dialog will not be shown
  3. The "Erase User Data" menu item will be hidden from the dashboard
  4. Users cannot accidentally erase their device settings

Implementation Details

1. Add new manifest interface property

In src/const.ts, add new_install_prevent_erase?: boolean; to the Manifest interface.

2. Update installation logic in src/install-dialog.ts

  • Modify _renderDashboardNoImprov() to check for new_install_prevent_erase and force erase: false
  • Modify _renderDashboard() to check for new_install_prevent_erase and force erase: false
  • Hide the "Erase User Data" menu item when new_install_prevent_erase is true

3. Update documentation

Add documentation about the new new_install_prevent_erase option in index.html.

Behavior Comparison

  • new_install_prompt_erase: true - Shows a dialog asking if user wants to erase (user can still choose to erase)
  • new_install_prevent_erase: true (new) - Completely prevents erasing, no erase option shown to user
  • Default behavior - Automatically erases on new install without prompting

Related Issue

Fixes #356


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 14, 2025
Copilot stopped work on behalf of zjwhitehead due to an error November 14, 2025 04:23
@zjwhitehead
Copy link

Sorry, please ignore this PR. Im working on another one to fix the issue but copilot decided to prematurely create this.

@balloob balloob closed this Nov 15, 2025
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] Prevent selection "Erase device" completely

3 participants