supermemory/apps/web/app/api/onboarding
vimzh 698aa9ea69 fix(onboarding): handle www. and bare-domain X/Twitter URLs in research extractHandle
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.
2026-05-24 11:44:23 +05:30
..
account-status fix: Implement the onboarding account lookup (#913) 2026-05-11 02:29:15 -07:00
extract-content feat: deep-research on user profile and tiptap integration (#672) 2026-01-15 21:53:53 +00:00
research fix(onboarding): handle www. and bare-domain X/Twitter URLs in research extractHandle 2026-05-24 11:44:23 +05:30