Skip to content

[P1/bug] +New category commit is invisible to the user — only fires on Save, not on Add #338

Closed

Description

@EVWorth

Context

SaveFavoriteDialog.tsx:39-49 (handleSave: finalCategory = category unless showNewCategory && newCategory.trim()); specifically if (showNewCategory && newCategory.trim()) { finalCategory = newCategory.trim(); addCategory(finalCategory); }.

Problem

The flow is: user opens the dropdown → "+ New" → types "Daily Reports" → clicks Add. The addCategory is called from handleSave (line 44), not when the user clicks Add. This means the dialog calls addCategory("Daily Reports") AND addFavorite({ category: "Daily Reports", ... }) in the same atomic operation. The implementation actually IS correct, but the UX is confusing: the user types "Daily Reports", sees the input field clear when they click Save (line 47-53), and the new favorite appears in the sidebar under "Daily Reports" — they never see the "+ New" form commit visually. The intermediate state is invisible.

Files

  • src/components/favorites/SaveFavoriteDialog.tsx:39-49

Expected

Typing "Daily Reports" in the new-category input and clicking Add shows the category in the dropdown selected, the input collapses, and the favorite saves under "Daily Reports" — no surprise clicks.

Proposed fix

Scope S — when the user clicks "Add" inline in the new-category input, call addCategory(name); setCategory(name); setShowNewCategory(false). The Save button then just persists the favorite with the now-selected category.

Acceptance

Typing "Daily Reports" in the new-category input and clicking Add shows the category in the dropdown selected, the input collapses, and the favorite saves under "Daily Reports" — no surprise clicks.

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