Files
GearBox/.planning/phases/37-admin-global-item-management/37-02-SUMMARY.md

2.0 KiB

plan, phase, status, completed
plan phase status completed
37-02 37 complete 2026-04-19

Summary: 37-02 — Client — Admin Items List, Edit Page & Sidebar

What Was Built

Full client-side implementation of the admin global item management feature: hooks file, list page with infinite scroll, edit page with all fields and delete confirmation, and sidebar activation.

Key Files

Created

  • src/client/hooks/useAdminGlobalItems.tsuseAdminGlobalItems (infinite query), useAdminGlobalItem (detail), useUpdateAdminGlobalItem, useDeleteAdminGlobalItem
  • src/client/routes/admin/items.tsx — List page with data table, infinite scroll, search, tag filters, skeleton loading, empty state
  • src/client/routes/admin/items.$itemId.tsx — Edit page with all fields, manufacturer dropdown, TagInput chip component, delete confirmation dialog with ownerCount

Modified

  • src/client/routes/admin.tsx — Replaced disabled Items div with active <Link to="/admin/items">
  • src/client/routeTree.gen.ts — Auto-regenerated with /admin/items and /admin/items/$itemId routes

Decisions & Deviations

  • useTags hook existed and was used as-is for tag filter chips on list page
  • useFormatters() returns { weight, price } — used as formatWeight/formatPrice aliases in the list page

Test Results

  • bun run build: exits 0
  • routeTree.gen.ts contains both new admin routes confirmed

Self-Check: PASSED

  • useAdminGlobalItems.ts with infinite query, detail, update/delete mutations
  • Sidebar Items link active (Link component, no "Soon" badge, no cursor-not-allowed)
  • List page with table, infinite scroll, search, tag filters, skeleton, empty state
  • Edit page with all fields, manufacturer dropdown, TagInput, save/delete actions
  • Delete confirmation shows ownerCount impact message
  • Navigate to /admin/items after successful delete
  • routeTree.gen.ts updated with both routes
  • Build exits 0
  • ADMN-02, ADMN-03, ADMN-04 fully implemented (client side)