Skip to content

Log team invites before responding, not after the email - #12

Closed
ostenbom wants to merge 1 commit into
mainfrom
fix-invite-activity-log
Closed

ostenbom wants to merge 1 commit into
mainfrom
fix-invite-activity-log

Conversation

@ostenbom

Copy link
Copy Markdown

Why

team-invite-activity.spec.ts has failed on about a third of runs since 1a95e67. That commit moved the activity log write into after(), behind sendInvitationEmail. A quarter of email sends take 6–9 s, so the invite didn't appear in the activity log until long after the form showed "Invitation sent successfully". The test's 5 s expect ran out first. This also affected PR #3, which doesn't touch this code.

What

  • Log the invite with await logActivity(...) before the action responds, like every other action in actions.ts does.
  • Keep only the email in after(), so a slow email provider still doesn't slow down inviting.

The test stays as it is: the activity log should show the invite as soon as the app says it was sent.

🤖 Generated with Claude Code

The invite was only written to the activity log after the invitation
email had been sent, inside after(). A slow email send (up to 9s) kept
the invite out of the activity log well after the form said it was sent,
which made team-invite-activity.spec.ts fail about a third of the time.

Log the invite before responding, as every other action does, and keep
only the email in after().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webinar-playwright-example Building Building Preview Nov 12, 2026 1:44pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — d7c10d3e Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant