Skip to content

feat: dataset creation ui#386

Open
Scr4tch587 wants to merge 1 commit into
kai/proposal-api-clientfrom
kai/create-dataset-ui
Open

feat: dataset creation ui#386
Scr4tch587 wants to merge 1 commit into
kai/proposal-api-clientfrom
kai/create-dataset-ui

Conversation

@Scr4tch587

Copy link
Copy Markdown
Collaborator

What changed

New create view (`components/create-dataset.tsx`, reachable via the "new dataset" header button):

  • Proposer section (required): name, Wat Street team, discord user, and a "what is this dataset for?" description — all shown to reviewers in the PR body
  • Basics: name/version inputs, calendar + granularity selects, start-date
  • Schema: dynamic key/type rows (str · int · float · bool)
  • Dependencies: picker populated from `GET /datasets` plus optional lookback (`5d`-style, zod-validated)
  • Builder script: CodeMirror editor with Python highlighting and a template pre-filled
  • Extras: optional requirements.txt; env-vars checkbox reveals a `.env.template` field with a "secrets never go in the PR" note
  • zod + react-hook-form validation mirrors the server's rules (name regex, semver, date format, lookback format), and server-side 400/409 messages render inline on submit
  • success screen links the opened PR and repeats the manual-`.env` warning for env-vars datasets

The view is lazy-loaded (`React.lazy`) so CodeMirror's chunk (~540 kB) never loads during normal browsing. shadcn `select`/`checkbox`/`textarea` components added; new deps: `@uiw/react-codemirror`, `@codemirror/lang-python`.

Why

The UI half of the PR-based dataset-creation flow — pairs with the `POST /datasets` endpoint below this PR in the stack.

Benefit

Anyone on the team can propose a dataset without touching git; reviewers get a fully-attributed, pre-validated, pre-linted PR.

🤖 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