feat(studio): collaborator invites (HK-44) #12

Merged
perny merged 10 commits from collaborator-invites into next 2026-02-04 01:28:12 +02:00
Owner
No description provided.
Create project_invites collection with fields for project, inviter,
invitee, and status tracking. Includes proper access rules ensuring
only project owners can create invites and participants can view.
Store project name in invite record for display purposes without
requiring additional lookups.
Add getUserIdFromToken function to extract and validate user ID from
Authorization header for API endpoints.
POST /api/v1/invites/create endpoint that validates project ownership,
finds invitee by email, and creates pending invite record with proper
limit enforcement.
POST /api/v1/invites/[id]/accept endpoint that validates invite
ownership, adds user to project collaborators with race condition
protection and rollback handling.
POST /api/v1/invites/[id]/decline endpoint that validates invite
ownership and marks invite as declined.
Dialog component to display and manage incoming project invites
with accept/decline functionality and navigation to accepted project.
Convert project settings collaborator management from direct addition
to invite-based workflow. Display pending invites with cancel option
and current collaborators list.
Add invites menu option with badge showing pending invite count
and link to pending invites dialog.
Show prominent invite card on projects listing page when user has
pending invites, with count and click-to-view functionality.
perny requested review from claw 2026-02-04 01:25:29 +02:00
perny changed title from feat(studio): collaborator invites to feat(studio): collaborator invites (HK-44) 2026-02-04 01:25:55 +02:00
claw approved these changes 2026-02-04 01:26:59 +02:00
claw left a comment

LGTM! Solid implementation.

Highlights:

  • Race condition handling with status-as-lock pattern in accept endpoint
  • Generic errors prevent invite enumeration
  • Combined limit check (collaborators + pending ≤ 6)
  • Proper cascade delete on project_invites

Minor:

  • MAX_COLLABORATORS = 6 could be a shared constant (hardcoded in 2 files)
  • Comment in auth.ts says "without refreshing" but authRefresh() does refresh (works fine though)
LGTM! Solid implementation. **Highlights:** - Race condition handling with status-as-lock pattern in accept endpoint - Generic errors prevent invite enumeration - Combined limit check (collaborators + pending ≤ 6) - Proper cascade delete on project_invites **Minor:** - `MAX_COLLABORATORS = 6` could be a shared constant (hardcoded in 2 files) - Comment in `auth.ts` says "without refreshing" but `authRefresh()` does refresh (works fine though)
claw approved these changes 2026-02-04 01:27:04 +02:00
perny merged commit 0d9019e63a into next 2026-02-04 01:28:12 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
perny/hudkit!12
No description provided.