Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a cross-service user-deletion workflow: gateway schema additions, journeys-side evaluation & deletion services, users-side lookup/firebase/db deletion and subscription orchestration, Prisma audit-log model + migration, inter-service Apollo calls, and unit tests across services. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant APIUsers as API Users
participant APIJourneys as API Journeys Modern
participant PrismaDB as Prisma Database
participant FirebaseAuth as Firebase Auth
Client->>APIUsers: userDeleteCheck(idType,id)
APIUsers->>PrismaDB: lookup user by id/email
PrismaDB-->>APIUsers: user record or null
APIUsers->>FirebaseAuth: check Firebase existence/uid
FirebaseAuth-->>APIUsers: firebase metadata
APIUsers->>APIJourneys: callJourneysCheck(userId)
APIJourneys->>PrismaDB: evaluate journeys/teams (counts)
PrismaDB-->>APIJourneys: counts & logs
APIJourneys-->>APIUsers: check result + logs
APIUsers-->>Client: UserDeleteCheckResult + logs
Client->>APIUsers: subscribe userDeleteConfirm(idType,id)
APIUsers->>PrismaDB: lookup user & get caller
APIUsers->>APIJourneys: callJourneysConfirm(userId)
APIJourneys->>PrismaDB: transfer/delete journeys & cleanup
APIJourneys-->>APIUsers: confirm result + logs
APIUsers->>FirebaseAuth: deleteFirebaseUser(uid)
FirebaseAuth-->>APIUsers: deletion logs/result
APIUsers->>PrismaDB: create/update UserDeleteAuditLog and delete user row
APIUsers-->>Client: streamed progress entries (log, done, success)
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run journeys-e2e:e2e |
❌ Failed | 4m 8s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-04-15 07:18:18 UTC
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
I see you added the "on stage" label, I'll get this merged to the stage branch! |
|
Merge conflict attempting to merge this into stage. Please fix manually. |
…rneys-modern schema (NES-1454) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Merge conflict attempting to merge this into stage. Please fix manually. |
|
Merge conflict attempting to merge this into stage. Please fix manually. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Merge conflict attempting to merge this into stage. Please fix manually. |
…ckend' into siyangcao/nes-1454-deleteuser-backend
|
The latest updates on your projects.
|
… failures - Remove duplicate `isSuperAdmin: boolean` from AuthScopes interface (merge conflict artifact from stage merge — line 82 was the stale copy; the lazy `boolean | (() => Promise<boolean>)` on line 84 is correct) - Move `aria-label` on UserDelete TextField to `inputProps` so it reaches the actual <input> element rather than the outer FormControl div - Fix UserDelete spec assertions using `toHaveValue(expect.stringContaining(...))` which silently fails in jest-dom 6.5.0 (lodash isEqualWith doesn't handle jest asymmetric matchers); changed to `.value.toContain(...)` instead Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
…NES-1454) - Add migration 20260415000000 to ADD deletedUserFirebaseUid and completedAt columns to UserDeleteAuditLog on existing DBs — these fields were added to the Prisma schema but had no corresponding SQL migration, so they would be missing on any DB that had already run the earlier migrations - Add self-deletion test to deleteUserData.spec.ts: verifies the audit log is created BEFORE user.delete() and that callerEmail is stored, so the log is useful even after the user record is removed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…S-1454) TS2339 type-check failure — getByRole returns HTMLElement which does not have a .value property; cast to HTMLTextAreaElement (the actual rendered element from MUI TextField multiline) at the three affected assertions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three ESLint errors blocking journeys-admin:lint: - import/order: move CircularProgress after Button (alphabetical MUI order) in UserDelete.tsx - import/order: move GET_ME import before UserDelete import in pages/users/delete.tsx - no-void (x2): wrap `void handleCheck()` and `void handleConfirmDelete()` in block bodies per allowAsStatement:true rule config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Found 1 test failure on Blacksmith runners: Failure
|

Add user deletion endpoints with interop pattern:
Summary by CodeRabbit
New Features
Chores