Skip to content

Unified Tags & Categories Management Page #509

@steilerDev

Description

@steilerDev

User Story

As a homeowner, I want a single management page where I can view and edit all tags, budget categories, and household item categories so that I can organize my project taxonomy from one central place instead of navigating to separate pages.

Description

Consolidate the management of three entity types — Tags, Budget Categories, and Household Item Categories — into a single unified page. Replace the existing standalone Tags page (/tags) and remove the Budget Categories tab from the Budget sub-navigation. Convert Household Item Categories from a hardcoded TypeScript enum to a database-backed table with full CRUD, pre-seeded with the eight current enum values.

Key business rule: budget lines on household items must always be assigned the "Household Items" budget category implicitly. The user should not be able to select a budget category when adding/editing a household item budget line — it is auto-assigned.

Acceptance Criteria

  • AC-1: A new unified management page exists at a single route (e.g., /manage) with three sections or tabs: "Tags", "Budget Categories", and "Household Item Categories". Each section displays a list of items and supports create, edit, and delete operations.
  • AC-2: The sidebar navigation link "Tags" (/tags) is replaced with a link to the new unified management page. The old /tags route redirects to the new page.
  • AC-3: The "Categories" tab is removed from the Budget sub-navigation. The /budget/categories route redirects to the budget categories section/tab of the new unified management page.
  • AC-4: A new database table household_item_categories is created via migration, with columns: id (TEXT PK), name (TEXT UNIQUE NOT NULL), color (TEXT, nullable), sort_order (INTEGER NOT NULL DEFAULT 0), created_at, updated_at. Pre-seeded with the eight current enum values.
  • AC-5: The household_items.category column is converted from a free-text CHECK constraint to a foreign key referencing household_item_categories(id). Existing data is preserved.
  • AC-6: Full CRUD API endpoints exist for household item categories (GET list, POST create, PATCH update, DELETE with 409 if in use).
  • AC-7: The household item categories section on the unified page displays all categories with name and color, supports create/edit/delete.
  • AC-8: The HouseholdItemCategory TypeScript union type is replaced with a dynamic type since categories are now user-defined.
  • AC-9: A new pre-seeded budget category "Household Items" (id bc-household-items) is added via migration.
  • AC-10: When creating or updating a budget line on a household item, the budget_category_id is automatically set to "Household Items". User-supplied values are ignored.
  • AC-11: The budget category selector is removed from the household item budget line create/edit form. "Household Items" is displayed as a read-only label.
  • AC-12: Existing household item budget lines with different or NULL budget_category_id are migrated to reference bc-household-items.
  • AC-13: All existing Tags management functionality continues to work identically.
  • AC-14: All existing Budget Categories management functionality continues to work identically.
  • AC-15: Old TagManagementPage and BudgetCategoriesPage components removed. No orphan pages.
  • AC-16: Household item create/edit forms populate category dropdown dynamically from GET /api/household-item-categories.
  • AC-17: Household item list page category filter populated from API instead of hardcoded enum.
  • AC-18: Backward compatibility: all existing data preserved through migration with zero data loss.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Wont-Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions