Skip to content

fix: delay invite task completion to after onboarding completed #30915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

joshsny
Copy link
Contributor

@joshsny joshsny commented Apr 8, 2025

Problem

When a user invites someone and submits onboarding they need to click twice.

Changes

Tried to get to the bottom of why this is happening for a while, for some reason the update to mark the onboarding task as completed conflicts with the update to complete onboarding, and the loader in kea overwrites the team as having not completed onboarding.

After a while trying to fix that, just added a timeout to fix the race condition.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Ran it locally

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR wraps the onboarding task completion update in a 1-second delay to mitigate a race condition between inviting teammates and marking onboarding complete.

  • Delays update in /frontend/src/scenes/settings/organization/inviteLogic.ts using setTimeout.
  • Uses optional chaining on activationLogic.findMounted() for safety.
  • The fixed delay approach may be fragile under variable network conditions.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Apr 8, 2025

Size Change: -175 B (0%)

Total Size: 10.2 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 10.2 MB -175 B (0%)

compressed-size-action

@joshsny joshsny requested a review from a team April 8, 2025 09:03
@joshsny joshsny merged commit 5832ba1 into master Apr 8, 2025
111 checks passed
@joshsny joshsny deleted the onboarding-invite-submit branch April 8, 2025 14:50
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.

2 participants