Skip to content

Todo Panel — Category management (create, rename, delete, empty toggle, JIRA) #51

@harrryyd

Description

@harrryyd

Parent

#44

What to build

Full category CRUD: create, rename, delete with guard, empty-category visibility toggle, and JIRA link on categories.

State machine: todoStore gains:

  • createCategory() — creates with a default name ("New Category") and random color, appended at the end
  • renameCategory(categoryId, name) — updates the name
  • setCategoryColor(categoryId, color) — updates the color
  • setCategoryJiraLink(categoryId, jiraLink) — sets/clears the JIRA link
  • deleteCategory(categoryId) — only succeeds if the category has zero items with status todo or in-progress. Returns error otherwise.

UI:

  • "+" button at the top of the category list to create a new category
  • Double-click a category header to rename (inline text input, Enter saves, Escape cancels)
  • Right-click context menu on category header with "Delete" option (greyed out if category has active items). Delete shows a confirm dialog.
  • Category JIRA link: if set, displays as a clickable ticker/number extracted from the URL. Edit via context menu or detail.
  • Color picker (simple palette or hex input) in context menu.
  • Empty categories toggle: a small toggle button somewhere at the top hides categories with zero active items (todo or in-progress). Categories with only done items still count as empty for this toggle.

Acceptance criteria

  • "+" button at top of list creates a new category with default name and random color
  • Double-click category header opens inline rename input; Enter saves, Escape cancels
  • Right-click category header shows context menu with Rename, Color, JIRA Link, Delete options
  • Delete is greyed out / blocked if category has active (todo or in-progress) items
  • Confirm dialog before deleting a category
  • JIRA link displays as clickable ticker/number (not raw URL) when set
  • JIRA link can be set/cleared via context menu
  • Color can be changed via context menu (simple color palette or hex input)
  • Empty categories toggle hides categories with zero active items; toggle state is local (not persisted)
  • Category with only done items counts as "empty" for the toggle
  • Unit tests: createCategory, deleteCategory guard, renameCategory
  • bun fmt, bun lint, bun typecheck all pass

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions