Skip to content

feat: confirm-and-override dialog for stale proposal conflicts - #397

Open
Scr4tch587 wants to merge 1 commit into
feat/proposal-override-apifrom
feat/proposal-override-ui
Open

feat: confirm-and-override dialog for stale proposal conflicts#397
Scr4tch587 wants to merge 1 commit into
feat/proposal-override-apifrom
feat/proposal-override-ui

Conversation

@Scr4tch587

@Scr4tch587 Scr4tch587 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator
image

Wires the stale-branch conflict info from the API into the create-dataset form.

What changed:

  • `ApiError` gains an optional `body` field carrying the parsed error response, so callers can read structured fields beyond `detail` (previously only the string `detail` was ever surfaced)
  • `DatasetProposalPayload` gains `override?: boolean`, passed through on resubmit
  • on a 409 with `conflict_type: "stale_branch"`, the form shows a confirm dialog (same pattern as the build panel's real-build confirmation) naming the open PR if there is one, and resubmits with `override: true` on confirm
  • a `conflict_type: "dataset_exists"` conflict is unaffected — still just the existing inline error box, no override offered, since that case is a hard block

Testing: `bun run typecheck`, `bun run lint`, `bun run format:write`, and `bun run build` all pass. Smoke-tested the form in a scratch dev server (Chrome) — renders and opens with no console errors; the actual 409 trigger needs a live backend to exercise end-to-end, covered by the backend-layer tests in the earlier PRs in this stack.

Benefit: re-testing/re-proposing a dataset name whose earlier proposal PR was closed without deleting the branch no longer requires a human to manually clean up the branch via the GitHub API/UI — the form surfaces it and lets the user recover in place.

ApiError now carries the parsed response body so callers can inspect
structured fields beyond detail. the create-dataset form catches a
409 stale_branch conflict and offers to close the stale pr (if any),
delete the branch, and resubmit -- a dataset_exists conflict still
just shows the existing inline error with no override option.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

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