feat(management): paginate aging inventory table and clean mobile stock card layout #189

Merged
yuris merged 2 commits from feat/188-paginate-aging-table into main 2026-10-01 17:04:34 +00:00
Owner

Closes #188.

What changed

  • Created client component AgingInventoryTable using DataTable with client pagination initialized to 5 items per page (pageSize: 5) and page size options (5, 10, 25, 50).
  • Swapped static 5-item slice in dashboard page for AgingInventoryTable passing all aged inventory items.
  • Added responsive mobile card view for aging inventory table.
  • Removed distracting border separator between category and prices in InventoryMobileCard.

Verified

  • pnpm --filter garage test passed (all tests green).
  • pnpm exec tsc --noEmit passed with 0 errors.
  • .forgejo/scripts/biome-gate.sh passed with 0 findings.

Deviations

none

Closes #188. ## What changed - Created client component `AgingInventoryTable` using `DataTable` with client pagination initialized to 5 items per page (`pageSize: 5`) and page size options (5, 10, 25, 50). - Swapped static 5-item slice in dashboard page for `AgingInventoryTable` passing all aged inventory items. - Added responsive mobile card view for aging inventory table. - Removed distracting border separator between category and prices in `InventoryMobileCard`. ## Verified - `pnpm --filter garage test` passed (all tests green). - `pnpm exec tsc --noEmit` passed with 0 errors. - `.forgejo/scripts/biome-gate.sh` passed with 0 findings. ## Deviations none
feat(management): paginate aging inventory table and clean mobile stock card layout
All checks were successful
Checks / test @garage/catalog (pull_request) Successful in 1m16s
Checks / test garage (pull_request) Successful in 1m29s
Checks / test garage-store (pull_request) Successful in 1m16s
Checks / typecheck apps/management (pull_request) Successful in 1m41s
Checks / lint (biome) (pull_request) Successful in 12s
Checks / typecheck apps/store (pull_request) Successful in 1m20s
683d3ad9c3
yuris left a comment

VERDICT: request-changes

apps/management/app/(dashboard)/aging-inventory-table.tsx:L200-L202: should: The new table initializes at 5 rows, but DataTable derives the page-size dropdown from [pageSize, 10, 25, 50]. After changing to 10, 25, or 50, the 5 option disappears; users cannot return to five per page without reloading. Include 5 permanently in the shared DataTable options (for example, [5, pageSize, 10, 25, 50]).

Verified from the PR diff: all aged rows are passed in cost-descending order, DataTable paginates and renders both desktop and mobile rows, and the inventory mobile-card separator is removed. The 5/10/25/50 acceptance criterion remains unmet after changing page size. At review time CI checks for store tests, both typechecks, and biome lint are pending; please confirm all checks are green before merging.

VERDICT: request-changes apps/management/app/(dashboard)/aging-inventory-table.tsx:L200-L202: should: The new table initializes at 5 rows, but DataTable derives the page-size dropdown from [pageSize, 10, 25, 50]. After changing to 10, 25, or 50, the 5 option disappears; users cannot return to five per page without reloading. Include 5 permanently in the shared DataTable options (for example, [5, pageSize, 10, 25, 50]). Verified from the PR diff: all aged rows are passed in cost-descending order, DataTable paginates and renders both desktop and mobile rows, and the inventory mobile-card separator is removed. The 5/10/25/50 acceptance criterion remains unmet after changing page size. At review time CI checks for store tests, both typechecks, and biome lint are pending; please confirm all checks are green before merging.
fix(management): ensure page size 5 remains selectable in data table
All checks were successful
Checks / test @garage/catalog (pull_request) Successful in 1m14s
Checks / test garage (pull_request) Successful in 1m25s
Checks / test garage-store (pull_request) Successful in 1m18s
Checks / typecheck apps/management (pull_request) Successful in 1m37s
Checks / lint (biome) (pull_request) Successful in 11s
Checks / typecheck apps/store (pull_request) Successful in 1m22s
37209bf216
Author
Owner

Round 1 addressed

  • Updated DataTable in components/ui/data-table.tsx so 5 is permanently retained in the default page size options ([5, pageSize, 10, 25, 50]), preventing the 5-item option from disappearing when switching to 10, 25, or 50.
  • Added optional pageSizeOptions?: number[] prop to DataTableProps and explicitly passed pageSizeOptions={[5, 10, 25, 50]} in AgingInventoryTable.
  • Re-verified all tests (pnpm --filter garage test), typecheck (pnpm exec tsc --noEmit), and biome lint gate (.forgejo/scripts/biome-gate.sh), all passing cleanly with 0 errors/findings.
### Round 1 addressed - Updated `DataTable` in `components/ui/data-table.tsx` so `5` is permanently retained in the default page size options (`[5, pageSize, 10, 25, 50]`), preventing the 5-item option from disappearing when switching to 10, 25, or 50. - Added optional `pageSizeOptions?: number[]` prop to `DataTableProps` and explicitly passed `pageSizeOptions={[5, 10, 25, 50]}` in `AgingInventoryTable`. - Re-verified all tests (`pnpm --filter garage test`), typecheck (`pnpm exec tsc --noEmit`), and biome lint gate (`.forgejo/scripts/biome-gate.sh`), all passing cleanly with 0 errors/findings.
yuris left a comment

VERDICT: approve

Reviewed the complete PR diff at 37209bf: the dashboard now passes every aged inventory item in descending aged-cost order to a TanStack-powered DataTable, with five rows initially, persistent 5/10/25/50 page-size choices, mobile cards and a desktop table. The stock mobile-card separator is removed. The prior round-1 page-size concern is resolved. All six Forgejo checks passed for this exact head: tests for garage, garage-store, and @garage/catalog; management and store typechecks; and the Biome lint gate.

VERDICT: approve Reviewed the complete PR diff at 37209bf: the dashboard now passes every aged inventory item in descending aged-cost order to a TanStack-powered DataTable, with five rows initially, persistent 5/10/25/50 page-size choices, mobile cards and a desktop table. The stock mobile-card separator is removed. The prior round-1 page-size concern is resolved. All six Forgejo checks passed for this exact head: tests for garage, garage-store, and @garage/catalog; management and store typechecks; and the Biome lint gate.
yuris merged commit 36b1a09082 into main 2026-10-01 17:04:34 +00:00
yuris deleted branch feat/188-paginate-aging-table 2026-10-01 17:04:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/garage!189
No description provided.