Cross-PR review 2026-06-11 (epic #3808 P5a follow-up). A pending owner_add is currently a write-only row:
- The owner sees NOTHING after addMember (members list is ACTIVE-only) and has no cancel affordance; re-add 422s.
- The invitee can accept but NOT decline (no endpoint, no button) — yet
createJoinRequest's error copy says "Please accept or decline it".
- The row never expires (no TTL/sweep).
remove()'s last-owner protection counts the PENDING row's role → an API-created pending owner-role row in a 1-owner org cannot be cancelled at all (scope the check to ACTIVE rows being removed).
users.service remove() cleans ACTIVE memberships only → user deletion orphans PENDING rows (join_request orphans pollute the approval list; owner_adds orphan silently).
Fix set: invitee DELETE (decline) on own pending owner_add with the same consent gate; owner cancel path (and/or show pending owner_adds in the members list with a status chip + cancel — Vue counterpart below); scope last-owner protection to ACTIVE; deleteMany({userId, status:'pending'}) on user delete; fix the join-request error copy.
Vue counterpart (same topic): pending rows in the members table + a Decline button on the My-Organizations pending list.
Refs: #3813, pierreb-devkit/Vue#4281, epic #3808.
Cross-PR review 2026-06-11 (epic #3808 P5a follow-up). A pending owner_add is currently a write-only row:
createJoinRequest's error copy says "Please accept or decline it".remove()'s last-owner protection counts the PENDING row's role → an API-created pending owner-role row in a 1-owner org cannot be cancelled at all (scope the check to ACTIVE rows being removed).users.service remove()cleans ACTIVE memberships only → user deletion orphans PENDING rows (join_request orphans pollute the approval list; owner_adds orphan silently).Fix set: invitee
DELETE(decline) on own pending owner_add with the same consent gate; owner cancel path (and/or show pending owner_adds in the members list with a status chip + cancel — Vue counterpart below); scope last-owner protection to ACTIVE;deleteMany({userId, status:'pending'})on user delete; fix the join-request error copy.Vue counterpart (same topic): pending rows in the members table + a Decline button on the My-Organizations pending list.
Refs: #3813, pierreb-devkit/Vue#4281, epic #3808.