feat: maintainer bulk-actions toolbar for multi-select release/refund (#829) - #1153
Merged
ritik4ever merged 1 commit intoSep 1, 2026
Merged
Conversation
…ect release/refund (ritik4ever#829) - Add admin-protected POST /api/bounties/bulk-action endpoint with zod validation - Process release/refund per item independently; return per-item results - Add checkboxes to bounty cards in maintainer view for multi-select - Add bulk-actions toolbar (release/refund/clear) above the board - Show per-item success/failure results panel + summary toasts - Add bulkAction.test.ts integration tests; allowlist route in OpenAPI drift test - Fix pre-existing repoOwner undefined crash; add missing @stellar/freighter-api dep
|
@CodeMayor is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@CodeMayor Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Description
Closes #829
Adds a maintainer bulk-actions toolbar that enables multi-selecting bounties
on the board and applying a release or refund to all selected items in
one request, with per-item success/failure reporting.
Backend
POST /api/bounties/bulk-action(zod-validated
bulkActionSchema; authenticated via the existingx-admin-api-keybcrypt middleware, same as/api/audit-log).(unknown ID, wrong maintainer, already finalized, invalid status, …) is
recorded per item and never aborts the remaining items.
{ results: [{ bountyId, success, status?, error? }], succeeded, failed }so partial success/failure is always visible to callers.
the public spec), along with two pre-existing undocumented routes
(
POST /api/bounties/:id/resolve-dispute,GET /api/config) that werealready failing the drift test.
Frontend
wallet is connected; hidden for finalized bounties) enabling multi-select.
selected count, "Release selected", "Refund selected", "Clear selection",
with disabled/loading states while a bulk action runs.
✅ Success (with new status) or ❌ Failed (with the exact backend error),
plus summary toasts — failures are surfaced without hiding successes.
bulkBountyAction()API helper sending thex-admin-api-keyheader.repoOwner is not definedruntime crash inApp.tsx.@stellar/freighter-apidependency (imported by existing codebut absent from
package.json, which broke 5 test suites).Type of change
repoOwnercrash + missing dependency)Security Checklist
bulkActionSchema(zod) validates action,bounty IDs (1–100), maintainer Stellar address, optional tx hash
x-admin-api-keyadmin middleware; per-item maintainer ownership isstill enforced by the store (
maintainermust match each bounty)@stellar/freighter-api(was already imported;only formalized in package.json)
prompt; no secrets are stored or logged
Testing
backend/test/bulkAction.test.ts(new): all-succeed refund; per-item failurewith unknown ID keeps processing and reports both outcomes;
already-finalized bounty reported as failure without hiding successes;
400s for empty list and unsupported action — 7/7 passing (with OpenAPI
drift test).
failures (toast tests expecting pre-Freighter behavior, one axe contrast
warning on
.theme-toggle) are pre-existing onmainand unaffected.closes #829