feat(web): wire knowledge pages to real API data #476

Merged
jason.woltje merged 1 commits from feat/knowledge-real-api into main 2026-02-23 04:12:16 +00:00
Owner

Summary

  • Remove mockEntries and mockTags arrays from the knowledge API client
  • Wire the main knowledge list page to use fetchEntries/fetchTags API calls with server-side filtering, pagination, and sorting
  • Replace generic loading spinners with MosaicSpinner across all knowledge components (EntryList, KnowledgeGraphViewer, StatsDashboard)
  • Update error states to use var(--danger) design token and empty states to use var(--surface)/var(--border) tokens
  • Replace window.location.reload() with proper API refetch on import complete

Pages reviewed

All 6 knowledge pages were audited:

  • knowledge/page.tsx: Rewritten (was using mock data, now uses real API)
  • knowledge/new/page.tsx: Already wired to real API, no changes needed
  • knowledge/[slug]/page.tsx: Already wired to real API, no changes needed
  • knowledge/search/page.tsx: Already wired to real API, no changes needed
  • knowledge/graph/page.tsx: Loading/error states updated to use MosaicSpinner and design tokens
  • knowledge/stats/page.tsx: Loading/error states updated to use MosaicSpinner and design tokens

Test plan

  • Verify knowledge list page loads entries from API
  • Verify filter/sort/pagination controls work with server-side filtering
  • Verify loading spinner appears during data fetch
  • Verify error state renders with retry button when API is unavailable
  • Verify empty state renders when no entries match filters
  • Verify graph and stats pages still load correctly

Refs #467

## Summary - Remove mockEntries and mockTags arrays from the knowledge API client - Wire the main knowledge list page to use fetchEntries/fetchTags API calls with server-side filtering, pagination, and sorting - Replace generic loading spinners with MosaicSpinner across all knowledge components (EntryList, KnowledgeGraphViewer, StatsDashboard) - Update error states to use var(--danger) design token and empty states to use var(--surface)/var(--border) tokens - Replace window.location.reload() with proper API refetch on import complete ## Pages reviewed All 6 knowledge pages were audited: - **knowledge/page.tsx**: Rewritten (was using mock data, now uses real API) - **knowledge/new/page.tsx**: Already wired to real API, no changes needed - **knowledge/[slug]/page.tsx**: Already wired to real API, no changes needed - **knowledge/search/page.tsx**: Already wired to real API, no changes needed - **knowledge/graph/page.tsx**: Loading/error states updated to use MosaicSpinner and design tokens - **knowledge/stats/page.tsx**: Loading/error states updated to use MosaicSpinner and design tokens ## Test plan - [ ] Verify knowledge list page loads entries from API - [ ] Verify filter/sort/pagination controls work with server-side filtering - [ ] Verify loading spinner appears during data fetch - [ ] Verify error state renders with retry button when API is unavailable - [ ] Verify empty state renders when no entries match filters - [ ] Verify graph and stats pages still load correctly Refs #467
jason.woltje added 1 commit 2026-02-23 04:12:04 +00:00
feat(web): wire knowledge pages to real API data
Some checks failed
ci/woodpecker/push/web Pipeline failed
db5c380c83
Replace mock data usage in the knowledge list page with real API calls
via fetchEntries/fetchTags. Remove mockEntries and mockTags arrays from
the API client. Update all knowledge components (EntryList, GraphViewer,
StatsDashboard) to use MosaicSpinner for loading states and design
tokens (var(--danger), var(--surface)) for error/empty states.

Refs #467
jason.woltje merged commit 5a6d00a064 into main 2026-02-23 04:12:16 +00:00
Sign in to join this conversation.