Skip to content

[P1/bug] No confirmation on deleteCategory — silently orphans all favorites back to Uncategorized #337

Closed

Description

@EVWorth

Context

QueryFavorites.tsx:189-195 (context menu has onClick: () => deleteCategory(cat)); favoritesStore.ts:117-123 (silently reassigns to Uncategorized).

Problem

The "Delete Category" context menu entry fires deleteCategory(cat) immediately. The store action silently reassigns all favorites in that category to Uncategorized — the favorites aren't lost, but the user's mental model is "I deleted the folder, the queries inside are gone". For a user with 50 favorites in Reports, clicking Delete (perhaps to rename it) destroys a minute of organizational work. The store has the right data shape to undo (we know fav.category was the deleted string), but there is no undo.

Files

  • src/components/favorites/QueryFavorites.tsx:189-195
  • src/stores/favoritesStore.ts:117-123

Expected

Right-click a category → Delete Category → confirmation dialog shows count → confirm → category disappears; the favorites are visibly in Uncategorized.

Proposed fix

Scope S — wrap the "Delete Category" click in a ConfirmDialog that reads "Delete category 'Reports'? 50 favorites will be moved to Uncategorized." with Confirm/Cancel. Optionally add an undo toast that re-creates the category with the same favorites within 5 seconds.

Acceptance

Right-click a category → Delete Category → confirmation dialog shows count → confirm → category disappears; the favorites are visibly in Uncategorized.

Needs human verify

no

Activity

  1. added
    audit
    severity/p1
    kind/bug
    area/favorites
    on Jul 31, 2026
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

    area/favoritesauditkind/bugseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions