Skip to content

Log team invitations before responding, not after the email - #16

Open
ostenbom wants to merge 1 commit into
webinar/mainfrom
webinar/log-invite-activity-immediately
Open

ostenbom wants to merge 1 commit into
webinar/mainfrom
webinar/log-invite-activity-immediately

Conversation

@ostenbom

Copy link
Copy Markdown
Contributor

Problem

d07b423 moved logActivity for invitations into after(), behind sendInvitationEmail. The email stand-in takes 6–9s about a quarter of the time, so the "invited a team member" entry often lands well after the inviter sees "Invitation sent successfully".

People see that as a missing activity entry, and it makes team-invite-activity.spec.ts flaky. In Endform it fails with Received string: "You created a new team" on webinar/main and on unrelated PRs such as #13.

Fix

Write the activity log entry along with the invitation, before responding. Only the email stays in after(), so inviting still feels instant. The response now waits for one extra small insert, but never for the email.

🤖 Generated with Claude Code

The invite activity was written in after(), behind the invitation email.
When the email provider was slow (6-9s), the activity log didn't show the
invite until well after the inviter saw "Invitation sent", which also made
the team-invite-activity test flaky. Write the activity with the invitation
and only defer the email.

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

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
endform-playwright-tutorial Ready Ready Preview Nov 11, 2026 7:38pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — cc721609 Deployed Nov 11, 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