The previous extractHandle only stripped exact "https://x.com/" / "https://twitter.com/"
prefixes (and one leading "@"), so common URL formats produced garbage:
https://www.x.com/vansh -> "https:"
x.com/vansh -> "x.com"
https://mobile.twitter.com/foo -> "https:"
That junk handle was then passed straight to the Grok call, wasting an LLM
request and returning unusable research to the user.
Rewrite the parser to use the URL constructor (mirroring the more robust
parseXAccount in apps/web/app/api/onboarding/account-status/route.ts) so any
subdomain or bare-domain form works. Validate the resulting handle against the
1-15 char alphanumeric+underscore rule before invoking the model; fail fast
with a 400 instead of burning a model call on a bad input.
- Created a new `useOrgOnboarding` hook that uses `org.metadata.isOnboarded` to track onboarding state
- Updated the home page to conditionally use either the old localStorage-based onboarding or the new DB-backed onboarding based on feature flag
- Added a "Restart Onboarding" option in the user dropdown menu
- Improved the onboarding chat sidebar with per-link loading indicators
- Enhanced the X/Twitter research API to better handle different URL formats
- Updated the integrations step to use the new onboarding completion method
- Added `updateOrgMetadata` function to the auth context for easier metadata updates