feat(auth): #243 Admin Invite User - #302
Conversation
|
🌿 ⏳ Creating preview environment… (logs) |
|
🌿 Preview environment — failed ❌ to update. See the workflow logs. |
|
🌿 ⏳ Creating preview environment… (logs) |
|
🌿 Preview environment torn down 🧹 — the stack for this PR has been destroyed. |
🌿 Preview environment — ready ✅Open: https://d3nmtjoh6ir9ym.cloudfront.net/pr-302/ Shared RDS + Cognito (prod data); DB migrations are not applied here — if this PR adds a migration, endpoints using the new columns will fail until it merges. New commits update this environment in place — a note is posted here on each update. Remove the |
|
🌿 Preview environment torn down 🧹 — the stack for this PR has been destroyed. |
|
🌿 ⏳ Creating preview environment… (logs) |
🌿 Preview environment — ready ✅Open: https://d3nmtjoh6ir9ym.cloudfront.net/pr-302/ Shared RDS + Cognito (prod data); DB migrations are not applied here — if this PR adds a migration, endpoints using the new columns will fail until it merges. New commits update this environment in place — a note is posted here on each update. Remove the |
|
🌿 Preview environment — failed ❌ to update. See the workflow logs. |
….tsx The merge of main into this branch kept this branch's Button/AddUserModal JSX but took main's import block (which moved mock data into mockUsers.ts), silently dropping Button, AddUserModal, and getAccessToken. Broke frontend-ci's typecheck step. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The merge of main into this branch kept main's version of the CognitoIdentityProviderClient mock (a bare jest.fn() with no default resolution, added for main's DELETE-route tests), dropping this branch's default that resolved a User.Attributes shape. The POST /users success test never stubbed it itself, so handler.ts's cognitoResponse.User?.Attributes threw against an undefined response, returning 500 instead of 201. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ng shared/lambda-auth shared/lambda-auth/src/types.ts imports @branch/types, but none of the per-lambda Dockerfiles copied shared/types into the build context before running shared/lambda-auth's own `npm run build` — only auth's build context was even wide enough to reach shared/ at all, and it was missing this step too. `tsc` failed with "Cannot find module '@branch/types'" inside the shared/lambda-auth build step for every lambda, and auth's `npm install` failed even earlier since its context/dockerfile in docker-compose.yml didn't reach shared/ at all. `make up` never actually succeeded from a clean build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ssage
reportError()'s fallback ("Cannot reach the server...") fires for any
non-ApiError throw, not just a genuine fetch TypeError, and never logged
what actually happened. A login attempt in the PR's test-environment
preview hit this exact message with zero corresponding network request or
console output, so the real cause is currently undiagnosable from the
browser alone. This just surfaces it next time.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
I think I need to match this to Figma |
nourshoreibah
left a comment
There was a problem hiding this comment.
This is looking really good, thank you! just one nit
|
|
||
| setIsLoading(true); | ||
| try { | ||
| await apiFetch('/users/', { |
There was a problem hiding this comment.
Small nit: Can we move this to a hook instead of fetching inline?
@tsudhakar87 i think it's ok to do this in a separate pr but totally up to you |
|
Oh also @shreeyaadhikari will work on the accounts page if that's what you're talking about (but i think the modal spacing also needs to be adjusted) |
ok sounds good I can fix that spacing in this PR |
Terraform Plan 📖
|
ℹ️ Issue
Closes #243
📝 Description
Here's what this PR adds on top of PR #290:
Backend (lambdas/users)
Infrastructure
Frontend
✔️ Verification
What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.
🏕️ (Optional) Future Work / Notes
Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!