Skip to content

Add Transactions › Categories page (#91, 4/5) - #243

Draft
NotThaDev wants to merge 4 commits into
feature/91-frontend-categoriesfrom
feature/91-categories-page
Draft

NotThaDev wants to merge 4 commits into
feature/91-frontend-categoriesfrom
feature/91-categories-page

Conversation

@NotThaDev

@NotThaDev NotThaDev commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Part 4 of 5 for #91, stacked on #242.

What

  • New page Transactions › Categories (/transactions/categories), with a sidebar entry after Category Rules.
  • Table:
    • custom categories come first, then the locked defaults;
    • defaults show a quiet "Default" badge with a lock and a tooltip, and have no actions;
    • the Group column is hidden on mobile.
    • A muted hint shows while the user has no custom categories.
  • Drawer:
    • fields: name, Expense/Income, icon grid, color swatches (the default palette), and a live preview badge;
    • a server validation message (e.g. duplicate name) shows under Name.
  • Delete dialog: shows how many transactions move to Other and how many rules get disabled, then shows a "Category deleted" toast.
  • IconPicker / ColorPicker in components/common/category, both radio groups with aria-checked.
  • CategoryBadge gets an opt-in showIcon and a preview prop. Other pages keep their text-only badges.
  • fetchWrapper keeps plain-text error bodies (BadRequest("message")). Before, they were lost to .json().

Screenshots

Categories page, desktop
New category drawer, desktop
Categories page, mobile
New category drawer, mobile

Tested

  • bun run lint and bun run build pass.
  • Worktree API + frontend on an isolated Postgres DB:
    • create: autofocus, Save disabled while the name is empty, defaults Tag + first swatch, live preview;
    • duplicate name: inline error, drawer stays open;
    • edit: name and color change;
    • delete: 1 transaction moved to Other and 1 rule disabled, as the dialog said;
    • other pages keep text-only badges; no horizontal scroll at 375 px, drawer full width, 6-column icon grid.

Known, not from this PR

  • After closing an edit drawer opened from a row menu, body keeps pointer-events: none until reload. The Rules page does the same today.

Out of scope

  • Cleanup of the backfill and legacy fields (PR 5).

🤖 Generated with Claude Code

Table of custom (first) and locked default categories, a drawer to create or edit
a custom category (name, type, icon grid, color swatches, live preview) and a
delete dialog with usage counts. fetchWrapper keeps plain-text error bodies so
server validation messages reach the form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant