Skip to content

fix: improve plugin shortcut conflict error messages#3881

Open
ikchifo wants to merge 6 commits intoderailed:masterfrom
ikchifo:fix/improve-plugin-conflict-errors
Open

fix: improve plugin shortcut conflict error messages#3881
ikchifo wants to merge 6 commits intoderailed:masterfrom
ikchifo:fix/improve-plugin-conflict-errors

Conversation

@ikchifo
Copy link

@ikchifo ikchifo commented Mar 11, 2026

Resolves #3880

Plugin shortcut conflicts now show what they conflict with and how to fix it, in the flash bar instead of a generic logo warning.

Before:

Log:  duplicate plugin key found for "Ctrl-K" in "kubehop"
UI:   "Plugins load failed!" (logo bar, no detail)

After:

Log:  plugin "kubehop" shortcut "Ctrl-K" conflicts with "Kill" (use override: true to replace)
UI:   Same message in the flash bar

Changes

  • internal/view/actions.go: Include conflicting action name and override: true hint in error
  • internal/view/browser.go: Show first error in flash bar instead of generic logo warning

image

ikchifo and others added 3 commits March 11, 2026 12:47
Show the conflicting action's name in error messages and surface the
first error in the flash bar instead of a generic logo warning.

Before:
  Log: duplicate plugin key found for "Ctrl-K" in "kubehop"
  UI:  "Plugins load failed!" (logo bar, no detail)

After:
  Log: plugin "kubehop" shortcut "Ctrl-K" conflicts with "Kill"
       (use override: true to replace)
  UI:  Same message in the flash bar (bottom of screen)

Resolves derailed#3880
Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

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

@ikchifo Thank you for this update!

I think we might need a better solution for this as it will only report one issue at a time and in the flash which is less than ideal in case of hoarked cut/paste.
Perhaps an error view might be a better semantic for this?

Also it looks like the linter is not happy ;(


// firstError extracts the first error from a joined error chain.
func firstError(err error) error {
if err == nil {
Copy link
Owner

Choose a reason for hiding this comment

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

I think this check is superfluous as the type check below would fail otherwise

Copy link
Author

Choose a reason for hiding this comment

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

Agreed. Will remove.

@derailed derailed added enhancement New feature or request in-progress Mark issue as being worked on needs-tlc Pr needs additional updates labels Mar 15, 2026
@ikchifo
Copy link
Author

ikchifo commented Mar 15, 2026

@derailed Thanks for taking a look.
I agree with your points. I'll use a dialog.ShowError to display all conflicts at once in a dialog so it only fires once per view lifecycle instead of on every refresh tick.

ikchifo added 3 commits March 15, 2026 16:39
Replace ephemeral flash message (showing only the first error) with
a dismissable error dialog that displays all conflicts at once.
Uses an atomic guard following the firstView pattern to prevent
the dialog from re-appearing on every refresh cycle.
@ikchifo ikchifo requested a review from derailed March 15, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request in-progress Mark issue as being worked on needs-tlc Pr needs additional updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error messages for plugin shortcut conflicts

2 participants