Skip to content

feat: dataset browsing ui#377

Open
Scr4tch587 wants to merge 1 commit into
kai/react-api-clientfrom
kai/react-browse
Open

feat: dataset browsing ui#377
Scr4tch587 wants to merge 1 commit into
kai/react-api-clientfrom
kai/react-browse

Conversation

@Scr4tch587

Copy link
Copy Markdown
Collaborator

What changed

Re-implements the Svelte browsing UX in React:

  • `dataset-list.tsx`: all datasets in a table (name / version / data dot — green when `has_data`), clickable rows, loading / error-with-retry / empty states
  • `dataset-detail.tsx`: back button, fetches a 5-year window on mount (`build-data=false`), client-side pagination (50 rows per page, newest first), meta line `{returned_timestamps} timestamps · page X of Y`, newer/older buttons
  • `data-table.tsx`: columns derived from the first entry's keys; multi-entry timestamps (e.g. one row per ticker) render with the timestamp cell rowspanned; horizontally scrollable
  • `json-view.tsx`: recursive JSX syntax highlighter — replaces the old HTML-string `highlightJson`, so no `innerHTML`/manual escaping anywhere
  • `json-modal.tsx`: row details in a shadcn Dialog (Escape / backdrop / × close built in)
  • `App.tsx`: state-based list ↔ detail switching, no router
  • `use-datasets` / `use-dataset-data`: TanStack Query hooks over the typed client from the parent PR

Why

Feature parity with the old frontend on the new stack — this is the browsing half of the React migration.

Benefit

Same UX as before, but typed end to end, with caching/retry/401-recovery handled by the query layer instead of per-component state.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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