Skip to content

feat(tags): tags page with create/rename/delete and usage counts#114

Open
mikkisguy wants to merge 5 commits into
mainfrom
issue/27-tags-page
Open

feat(tags): tags page with create/rename/delete and usage counts#114
mikkisguy wants to merge 5 commits into
mainfrom
issue/27-tags-page

Conversation

@mikkisguy

Copy link
Copy Markdown
Owner

Closes #27.

What changed

Replaces the /tags placeholder with a full tag-management page (Phase 3 — Web UI Core):

  • Lists every tag with its usage count, fetched from GET /api/tags.
  • Sort toggle: by name or count; clicking the active field flips direction (default name asc).
  • + New tag button opens a create dialog.
  • Per-row rename (dialog seeded with the current name) and delete (confirmation dialog spelling out how many items lose the tag).
  • All mutations go through the existing /api/tags and /api/tags/[id] endpoints and refresh the list (and its counts) on success.
  • Loading / error (with retry) / empty states for the list; per-dialog submit spinners.
  • Client-side validation mirrors the server contract (1–64 chars, [a-zA-Z0-9 _-], case-insensitive uniqueness); a 409 from a concurrent create maps to an inline "already exists" message.

No API routes, DB, or auth code were touched — this is UI over the existing endpoints.

Files

  • src/app/tags/{page,tags-page,tag-form-dialog,delete-tag-dialog}.tsx, {api,use-tags,types}.ts
  • Tests: api.test.ts, use-tags.test.tsx, tags-page.test.tsx
  • Version bump to 0.14.0 (package.json + README badge)

Review pass

A strategic/large-diff review (>200 lines) flagged one material issue — dialogs could be dismissed mid-mutation, letting a destructive delete complete after an apparent cancel. Fixed: all dismiss paths (Escape, overlay, X, Cancel) are now blocked while a create/rename/delete is in flight, with a regression test. No remaining must-fix/should-fix findings.

Verification

pnpm verify is green locally: lint, typecheck, build, 816 tests (26 new for the tags page), knip.

Made with Cursor

mikkisguy and others added 3 commits June 25, 2026 21:54
Replace the /tags placeholder with a full tag-management page: lists
every tag with its usage count, toggles sort by name or count, and
drives create / rename / delete through the existing /api/tags
endpoints. Client-side validation mirrors the server contract and a
409 maps to an inline "already exists" message; dialogs block every
dismiss path while a mutation is in flight so destructive deletes
can't be silently cancelled.

Bumps version to 0.14.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
Swap the blue primary fill on the tags page's prominent actions (New
tag, Create, Save) for a high-contrast cream-on-dark "inverted"
variant, keeping blue reserved for brand/links. Delete stays
destructive.
Switch all buttons to JetBrains Mono and add a 200ms border-color
fade on hover (transparent → cream hairline), with per-variant
overrides so the hairline stays visible on the cream inverted and
red destructive fills and is suppressed on the borderless link.
Applies the same treatment to the bespoke login submit button.

Bumps version to 0.15.0.
Reserve JetBrains Mono for inverted primary buttons and dialog chrome
(title + footer actions) so mono reads as a deliberate accent while
secondary controls stay in the UI sans. Replace Inter with Geist for a
better technical/editorial pairing with Newsreader and JetBrains Mono.
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.

Tags page

1 participant