Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Keybindings set in settings persist when command is removed #2407

Open
christian-byrne opened this issue Feb 3, 2025 · 0 comments
Open
Labels
Potential Bug Untriaged bug

Comments

@christian-byrne
Copy link
Collaborator

christian-byrne commented Feb 3, 2025

Frontend Version

1.9.0

Expected Behavior

Situations in which a keybind-mappable command is removed:

  • Using an extension (custom node), then uninstall it or disable it
  • Using the desktop app, then switch back to web version temporarily (shared settings)

When the command no longer exists, it should be possible to assign a new command to the key sequence.

Actual Behavior

When the command is removed, the keybinding is not moved to unset. Since overwriting keybindings is not possible and there is no entry in the settings dialog to remove the keybinding, the key sequence can now no longer be mapped.

Steps to Reproduce

  1. Register an extension by pasting this into browser console:

    app.registerExtension({
      name: 'TestExtension',
      commands: [
        {
          id: 'TestCommand',
          label: 'Test Command'
          function: () => {
            alert('TestCommand')
          }
        }
      ],
    })
  2. Open settings dialog

  3. Go to Keybindings panel in settings

  4. Assign a keybinding to the 'Test Command' at the bottom of the panel

  5. Reload the page (simulating loading with the extension removed)

  6. Press the key sequence, observe console error

  7. Try to re-bind the key sequence, observe that it can't be overwritten

  8. Try to unbind the key sequence, observe that it's not in settings

Browser Logs

commandStore.ts:97 Uncaught (in promise) Error: Command TestCommand not found
    at Proxy.execute (commandStore.ts:97:13)
    at Proxy.wrappedAction (pinia.mjs:1405:26)
    at store.<computed> (pinia.mjs:932:50)
    at keybindHandler (keybindingService.ts:37:26)

Setting JSON

comfy.settings.json

What browsers do you use to access the UI ?

Google Chrome

Other

If the keybinding is set inside of the registerExtension call, this error does not occur.

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne added the Potential Bug Untriaged bug label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug Untriaged bug
Projects
None yet
Development

No branches or pull requests

1 participant