Add admin claim-action API and claim status transition machine#302
Merged
GsCommand merged 1 commit intoMay 23, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Motivation
Description
db/migrations/002_claim_status_machine.sqlto extendclaim_requestswith review/rejection/approval/error fields and createclaim_status_transitionswith an index.POST /api/admin/claim-actioninapi/admin/claim-action.jsimplementing supported actionsapprove,reject,mark_failed, andadd_notewith enforced transition rules, required reason checks,claim_eventswrites, andclaim_status_transitionsinserts.GET /api/admin/claim(api/admin/claim.js) to includetransitionsin the detail response.public/admin/claims.htmlto show current status badge, approve/reject/mark failed controls, notes/reason inputs, note saving, timeline refresh, and display of events/transitions (placeholder for next step).tests/api-admin-claims.test.jsto cover admin config/auth checks, approve/reject/invalid transition behavior,mark_failedandadd_notebehavior, and assert event/transition queries are attempted.Testing
npm test(repo root) and all tests passed (73tests,0failures).npm installat repo root but it failed in this environment due to npm registry policy returning403for@neondatabase/serverless(external registry access issue).cd examples/webhook-auto-verify && npm installandnpm run checkboth succeeded.npm run buildwas not run because abuildscript is not defined inpackage.json.Codex Task