Let a creator archive or delete a bounty - #560
Merged
Merged
Conversation
Bounties had a status column (open/paused/closed) but no control anywhere to change it, and no way to remove one. This adds both. Archive is a new `archived` status. It keeps the bounty and every submission, invoice and payout record, hides the bounty from the public list and detail page (RLS, same as closed) and moves it to its own Archived tab on /dashboard/bounties. Unarchive sets it back to closed so it does not silently reopen for submissions. Delete is DELETE /api/bounties/:id, creator only. It is refused with 409 (and `archive_instead: true`) once any submission has been approved, invoiced or paid, because the cascade would erase payment history; the UI then offers to archive. Pending and rejected submissions delete with the bounty. The new BountyActions menu mirrors GigActions (pause/resume/close, archive/unarchive, delete) and sits on the bounty detail page and each dashboard row. When the bounty funds a GitHub issue, the status comment is flipped to "withdrawn" on archive or delete and restored on reopen; the comment bodies now live in one module. Migration applied to the live project as 20260922045204. openapi.json and skill.md document the new status and endpoint. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ThreatCrush Security Scan45 finding(s) HIGH/CRITICAL: 1 | MEDIUM: 8 | LOW: 36
Snippets are redacted; ThreatCrush never prints matched credential material. |
ralyodio
marked this pull request as ready for review
September 22, 2026 04:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bounties had a status column (
open/paused/closed) but no control anywhere to change it, and no way to remove one. This adds both.Archive
archivedstatus. Keeps the bounty and every submission, invoice and payout record.closed)./dashboard/bounties.closed, so it does not silently reopen for submissions. Reopen is one more click.Delete
DELETE /api/bounties/:id, creator only.409andarchive_instead: trueonce any submission has been approved, invoiced or paid. The cascade would erase payment history, so the UI offers to archive instead.UI
BountyActionsmenu (mirrorsGigActions): pause / resume / close, archive / unarchive, delete, with confirm dialogs./bounties/:idand on every row of the dashboard list (rows are no longer one big link).GitHub issue comment
When the bounty funds a GitHub issue, the status comment is flipped to "withdrawn" on archive or delete and restored to "posted" on reopen. The comment bodies now live in
src/lib/bounty-issue-comments.ts.Database
Migration applied to the live project via the Supabase MCP and recorded as
20260922045204_bounty_archived_status. It widens the status CHECK and rewrites the public SELECT policy. Both changes are backwards compatible with the code on master.Docs
public/openapi.jsonandpublic/skill.mddocument the new status, the DELETE endpoint and the 409.Verification
tsc --noEmitcleanpnpm lint0 errorspnpm buildexit 0Noticed but not changed:
updateBountySchemaiscreateBountySchema.partial(), and thepayout_currencydefault survives.partial(), so every PATCH also writespayout_currency: "USD". Harmless today since every bounty is USD.🤖 Generated with Claude Code