Skip to content

feat: api client support for dataset proposals - #385

Merged
Scr4tch587 merged 12 commits into
kai/dataset-proposalsfrom
kai/proposal-api-client
Jul 28, 2026
Merged

feat: api client support for dataset proposals#385
Scr4tch587 merged 12 commits into
kai/dataset-proposalsfrom
kai/proposal-api-client

Conversation

@Scr4tch587

Copy link
Copy Markdown
Collaborator

What changed

  • `lib/api.ts`: `apiFetch` gains an options object (method, JSON body, ok-statuses) and now extracts the backend's `detail` message from error bodies, so `ApiError.message` carries the server's actual validation error instead of a generic status line
  • new `proposeDataset()` + typed `DatasetProposalPayload` / `ProposalResponse` for `POST /api/v1/datasets`
  • `main.tsx`: the QueryClient's 401 handling (toast + reopen key dialog) now also covers mutations via a `MutationCache`, sharing one `handleAuthError`

Why

The create-dataset form (next PR) submits proposals and must surface the backend's precise 400/409 messages ("granularity is finer than dependency ...") inline in the form.

Benefit

Client layer for the proposal flow with no UI yet — small, independently reviewable. Existing fetch call sites are updated to the new signature with identical behavior.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Scr4tch587 and others added 3 commits July 27, 2026 22:06
docs: document dataset proposal flow in specs
…ordances

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Scr4tch587
Scr4tch587 merged commit 28ece36 into kai/dataset-proposals Jul 28, 2026
2 checks passed
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.

2 participants