Problem
The invite flow is half-built and its two halves disagree:
- Client posts
{ email } (client/src/hooks/useCollaborators.ts:41)
- Server destructures
{ userId, permission } (server/src/controllers/document.controller.ts:827) → Prisma crash / 500
- The email input UI is commented out (
collaborators-dropdown.tsx:81-96), hiding the breakage
No lookup-by-email endpoint exists server-side.
Related: #10 (dropdown functionality gaps).
Fix
Decide the contract — either an owner-facing lookup endpoint resolving email → userId, or accept email server-side — then restore the UI and cover it with a test.
Problem
The invite flow is half-built and its two halves disagree:
{ email }(client/src/hooks/useCollaborators.ts:41){ userId, permission }(server/src/controllers/document.controller.ts:827) → Prisma crash / 500collaborators-dropdown.tsx:81-96), hiding the breakageNo lookup-by-email endpoint exists server-side.
Related: #10 (dropdown functionality gaps).
Fix
Decide the contract — either an owner-facing lookup endpoint resolving email → userId, or accept email server-side — then restore the UI and cover it with a test.