Skip to content

feat(dashboard): grid/table views, sorting & filtering for Projects - #86

Merged
dvcdsys merged 2 commits into
developfrom
feat/dashboard-project-views
Jun 22, 2026
Merged

feat(dashboard): grid/table views, sorting & filtering for Projects#86
dvcdsys merged 2 commits into
developfrom
feat/dashboard-project-views

Conversation

@dvcdsys

@dvcdsys dvcdsys commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What

Adds list ergonomics to the dashboard Projects page. All client-side — no backend, OpenAPI, or gen:api changes (the /api/v1/projects response already carries every field used).

  1. View toggle — tiles (current) ↔ a compact table. Choice persists in localStorage (cix.projects.view, default grid = prior behaviour).
  2. Table sorting — clickable Name / Last indexed / Added column headers (asc↔desc, chevron indicators). Never-indexed rows always sink to the bottom regardless of direction.
  3. Filters (apply to both views) — name search + external/local type filter.

"Last indexed" sorts on last_indexed_at (the same value cards show as "Indexed X ago"); "Added" sorts on created_at. External vs local uses the existing host_path github.com/ prefix convention.

Changes

  • New lib/projectList.ts — shared isExternal / projectLabel / filterProjects / sortProjects + basename / STATUS_VARIANT. Sort copies the array; the React Query cache is never mutated in place.
  • New lib/viewPreference.ts — localStorage view preference, mirroring editorPreference.ts.
  • New components/ProjectsTable.tsx — shadcn Table: sortable headers, type + status/drift badges, languages, file/symbol counts, clickable rows → detail, per-row Sync for external repos (click-guarded so it doesn't navigate).
  • Edit ProjectsListPage.tsx — toolbar (search + type Select + view toggle), useMemo filter→sort, grid/table branch, a distinct "No projects match your filters" state, and a "Showing X of Y" subtitle while filtered.
  • Edit ProjectCard.tsx — reuses the shared helpers instead of its own copies (no visual change).

Verification

  • npm run typecheck — clean.
  • npm run build (tsc -b && vite build) — success; dist/.gitkeep preserved.
  • Live click-through (toggle / search / filter / sort against real data) needs a running cix-server with indexed projects — run cd server/dashboard && npm run dev against it.

🤖 Generated with Claude Code

dvcdsys and others added 2 commits June 22, 2026 14:59
Add a tiles/table view toggle to the Projects page, plus name search and
external/local type filters that apply to both views, and sortable
Name / Last indexed / Added columns in the table view. All client-side
over the existing /api/v1/projects response — no backend changes.

- New lib/projectList.ts: shared isExternal / label / filter / sort
  helpers (never-indexed rows always sort last; query-cache array is
  copied, never mutated in place)
- New lib/viewPreference.ts: persist the view choice in localStorage,
  mirroring the editorPreference.ts pattern (default 'grid' = no change)
- New ProjectsTable: shadcn Table with chevron-sortable headers, type +
  status/drift badges, and a per-row Sync button for external repos
- ProjectCard now reuses the shared basename/STATUS_VARIANT/isExternal
  helpers so cards and table can't drift apart (no visual change)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- ProjectsTable: make rows keyboard-accessible — the name is now a real
  <Link> (focusable, Cmd/Ctrl-click → new tab); the whole-row onClick
  bails on defaultPrevented and modified/non-left clicks so it neither
  double-navigates nor hijacks open-in-new-tab.
- sortProjects: name column sorts case-insensitively (localeCompare
  sensitivity:'base'); extract compareTimes() so created and
  last_indexed sink missing timestamps to the bottom identically.
- isExternal: widen to a structural { host_path } param and route the
  two remaining inline host_path.startsWith('github.com/') copies
  (ProjectDetailPage, WorkspaceProjectRow) through it — now the single
  source of truth for the whole dashboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dvcdsys
dvcdsys merged commit 2606c5b into develop Jun 22, 2026
1 check passed
@dvcdsys
dvcdsys deleted the feat/dashboard-project-views branch June 22, 2026 14:23
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