fix(onboarding): add initialize-organization trigger task and recover…#2512
fix(onboarding): add initialize-organization trigger task and recover…#2512
Conversation
…y guard If createOrganizationMinimal partially fails (org created but initializeOrganization doesn't run), the org ends up with no framework instances, controls, policies, or tasks. completeOnboarding now detects this and runs initializeOrganization as recovery before triggering the onboard job. A standalone Trigger.dev task allows manual re-runs from the dashboard for orgs already in this broken state. Also saves raw framework IDs to context for reliable recovery lookups and upserts the onboarding record in case that was also missing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Adds a reusable Introduces a standalone Trigger.dev Reviewed by Cursor Bugbot for commit 73df3dd. Bugbot is set up for automated code reviews on this repo. Configure here. |
Deduplicates the resolveFrameworkIds logic that was copied in both complete-onboarding.ts and initialize-organization.ts. Now lives in actions/organization/lib/resolve-framework-ids.ts alongside initialize-organization.ts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# [3.21.0](v3.20.2...v3.21.0) (2026-04-10) ### Bug Fixes * **onboarding:** add initialize-organization trigger task and recover… ([#2512](#2512)) ([082501f](082501f)) * **onboarding:** disable Complete button while server action is running ([8e53a10](8e53a10)) * **onboarding:** don't delete org after session activation succeeds ([a9cb9c5](a9cb9c5)) * **onboarding:** fix org creation timeout and improve error handling ([726760d](726760d)) * **onboarding:** harden cancel action — guard completed orgs, switch before delete ([b1dec0e](b1dec0e)) * **onboarding:** hide cancel button while onboarding submission is in-flight ([887dfa9](887dfa9)) * **onboarding:** require fallback org before allowing cancel ([03452e3](03452e3)) * **onboarding:** rollback active org switch if delete fails ([9b884f0](9b884f0)) * **onboarding:** sanitize error messages shown to users ([14a35df](14a35df)) * use barrel import for email package (Trigger build fix) ([b165a18](b165a18)) ### Features * add List-Unsubscribe headers and throttle email sends ([#2507](#2507)) ([80db5d9](80db5d9)) * **onboarding:** add cancel button to abandon onboarding and return to previous org ([7d990c2](7d990c2))
|
🎉 This PR is included in version 3.21.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
…y guard
If createOrganizationMinimal partially fails (org created but initializeOrganization doesn't run), the org ends up with no framework instances, controls, policies, or tasks. completeOnboarding now detects this and runs initializeOrganization as recovery before triggering the onboard job. A standalone Trigger.dev task allows manual re-runs from the dashboard for orgs already in this broken state.
Also saves raw framework IDs to context for reliable recovery lookups and upserts the onboarding record in case that was also missing.
What does this PR do?
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist