Skip to content

Disable or hide menu and palette items that cannot run #821

Closed

Description

@EVWorth

Severity: P2

What happens

On ?mock with nothing connected:

  1. Database → Admin Tools: the menu closes and nothing happens.
  2. File → Import Data…: nothing happens.
  3. Connection → Disconnect, and Database → Refresh Schema Cache: nothing happens.
  4. File → Backup Database… opens a dialog whose Connection and Database selects are empty.

All of these look enabled in the menus and in the command palette.

Cause

  • src/components/layout/AppLayout.tsx:144-191: the handlers guard silently with if (selectedConnectionId).
  • src/lib/actions.ts (the Action type) and src/components/layout/MenuBar.tsx:53-62: there is no enabled or disabled state.

Fix

Add enabled?: () => boolean to Action, evaluated against the connection store. Render disabled items greyed with aria-disabled in MenuBar, and sort them last in CommandPalette or drop them with a hint ("Connect first").

Part of #783.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 24, 2026
    219cc0d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions