Skip to content

feat(dashboard): add click-to-sort headers to data tables - #21

Merged
ClaudiaFang merged 1 commit into
masterfrom
worktree-dashboard-table-sort
Jul 21, 2026
Merged

feat(dashboard): add click-to-sort headers to data tables#21
ClaudiaFang merged 1 commit into
masterfrom
worktree-dashboard-table-sort

Conversation

@ClaudiaFang

Copy link
Copy Markdown
Member

Summary

  • Adds a reusable useSort hook (dashboard/src/lib/hooks/useSort.ts) and SortableTh clickable header component (dashboard/src/components/ui/sortable-th.tsx)
  • Wires sortable headers into the two data tables in the dashboard app: the "All Projects" table on Analytics, and the "Cache Usage by Provider" table in CacheBySourceCard
  • Clicking a header sorts ascending, clicking again toggles descending; changing sort resets Analytics table pagination to page 1

These were the only two <table>-based data tables found in the dashboard (everything else is card/feed layouts without column headers).

Test plan

  • npx tsc --noEmit passes
  • pnpm build passes
  • pnpm test (15 tests) passes
  • Could not do a live browser check — no Chrome binary available in this sandbox. Please verify visually before merge: click each column header on /analytics (Projects table and Cache Usage by Provider table) and confirm sort direction toggles and the icon updates.

🤖 Generated with Claude Code

Adds a reusable useSort hook and SortableTh header component, and wires
them into the two data tables in the dashboard (Analytics "All Projects"
table and Cache Usage by Provider table) so every column is sortable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ClaudiaFang
ClaudiaFang marked this pull request as ready for review July 21, 2026 16:14
@ClaudiaFang
ClaudiaFang merged commit 40d3480 into master Jul 21, 2026
1 check passed
@ClaudiaFang
ClaudiaFang deleted the worktree-dashboard-table-sort branch July 21, 2026 16:15
ClaudiaFang pushed a commit that referenced this pull request Jul 23, 2026
docs: add real dark mode screenshots for docs site
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