feat(membership): claimed transactions support view on /admin/membership - #929
Merged
Merged
Conversation
Lists open TXN_CLAIMED cases (a store purchase verified by one account and bound to another) with both emails, platform, plan, status, last attempt and count. "Move to caller" confirms in a dialog that names both accounts, then POST /api/admin/membership/reassign calls admin_reassign_subscription after requireAdminAuth with the owner the admin saw, so a row that changed hands since the list loaded is refused. Toast on success, then the list reloads. Both RPCs come from classicminidiy-supabase feature/admin-txn-claimed and are not deployed yet; the routes use a narrowed rpc cast until gen:types.
- claimed list route logs the database error and returns a generic message - reassign route is header-only (refuses the cookie token path, 401) - rows and the confirm dialog say "Moved here by support" when the case was moved before and came back (Apple shared ID) - a 404 or 409 on move keeps the reason in the dialog and reloads the list - 23505 maps to 409 naming the platform; a no-op move toasts "Already linked to that account"
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.
The support view for TXN_CLAIMED cases: a store purchase verified by an account other than the one it is bound to. The backend is ClassicMiniDIY/classicminidiy-supabase#210, with migration
20261003000004, already pushed and verified on production.Changes
GET /api/admin/membership/claimed:requireAdminAuth. A database error is logged, never returned.POST /api/admin/membership/reassign:requireAdminAuthwith the Bearer header only (no cookie fallback for a money-moving write).expectedOwnerId, so a stale list cannot move a purchase away from someone else.types/database.tsis regenerated from production, and the temporaryrpccasts are removed..claude/rules/admin.md.Checks
🤖 Generated with Claude Code