Skip to content

✨ feat: land new signups directly on onboarding#15629

Merged
tjx666 merged 6 commits into
canaryfrom
feat/signup-direct-onboarding
Jun 10, 2026
Merged

✨ feat: land new signups directly on onboarding#15629
tjx666 merged 6 commits into
canaryfrom
feat/signup-direct-onboarding

Conversation

@tjx666

@tjx666 tjx666 commented Jun 10, 2026

Copy link
Copy Markdown
Member

πŸ’» Change Type

  • ✨ feat

πŸ”— Related Issue

None

πŸ”€ Description of Change

New users previously bounced through the home page after signup: the page rendered, the async user-state fetch resolved, and only then did the client hard-redirect to /onboarding, causing a visible flash.

Now every signup entry lands on /onboarding directly:

  • Email signup (useSignUp): signUp.email callbackURL, the verify-email param, and the success router.push all go through the new buildOnboardingRedirectUrl helper β€” covers both email-verification on/off paths.
  • First-time social OAuth / generic OAuth / magic link (useSignIn): pass better-auth's native newUserCallbackURL, so only newly created accounts land on onboarding; existing users are unaffected.
  • Fallback needs-onboarding redirect (useUserStateRedirect): now threads the page the user was on, so finishing onboarding returns them there instead of always landing on home. The previous skip for agent pages with a message param (✨ feat(onboarding): skip redirect when landing on agent/inbox with message paramΒ #15256) is removed β€” these users now go through onboarding like everyone else, and the threaded callbackUrl keeps the message intact so it is delivered right after onboarding completes.

An explicit signup target (e.g. marketplace "Try in LobeHub" links) is threaded through the callbackUrl query param, stashed in sessionStorage at onboarding entry (survives internal route hops and mid-flow refreshes), and consumed at every onboarding finish point:

  • classic agent picker (AgentPickerStep)
  • lite mode selection (ModeSelectionStep)
  • agent flow completion panel (CompletionPanel, original target wins over the onboarding topic)

Only same-site relative paths are accepted as redirect targets (open-redirect guard). trackOnboardingCompleted now reports the real target URL.

πŸ§ͺ How to Test

  1. Sign up with a fresh email (verification off) β†’ lands on /onboarding directly, no home flash.
  2. Sign up with email verification on β†’ clicking the email link lands on /onboarding.
  3. First-time Google/GitHub login β†’ lands on /onboarding; existing account login behavior unchanged.
  4. Visit /signup?callbackUrl=%2Fagent%2Fxxx%3Fmessage%3Dhi, sign up and finish onboarding (any branch) β†’ returns to /agent/xxx?message=hi.
  5. Existing not-onboarded user opens /settings β†’ redirected to onboarding, finishing returns to /settings.
  6. Existing not-onboarded user opens /agent/inbox?message=hi β†’ redirected to onboarding, finishing returns to /agent/inbox?message=hi and the message auto-sends.
  • Tested locally
  • Added/updated tests

πŸ“ Additional Information

No new routes, no schema changes. Desktop builds are unaffected (no stashed target β†’ all finish points behave as before).

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 10, 2026
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Jun 10, 2026 8:48am

Request Review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 673ea53782

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/onboardingRedirect.ts Outdated
Comment thread src/utils/onboardingRedirect.ts Outdated
Comment thread src/features/Onboarding/Agent/CompletionPanel.tsx
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.51648% with 15 lines in your changes missing coverage. Please review.
βœ… Project coverage is 67.63%. Comparing base (1ed93b6) to head (c2226a6).
⚠️ Report is 4 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff            @@
##           canary   #15629     +/-   ##
=========================================
  Coverage   67.63%   67.63%             
=========================================
  Files        3353     3354      +1     
  Lines      338269   338348     +79     
  Branches    35248    29480   -5768     
=========================================
+ Hits       228786   228846     +60     
- Misses     109292   109311     +19     
  Partials      191      191             
Flag Coverage Ξ”
app 60.17% <83.51%> (+<0.01%) ⬆️
database 98.12% <ΓΈ> (ΓΈ)
packages/agent-manager-runtime 49.69% <ΓΈ> (ΓΈ)
packages/agent-runtime 81.06% <ΓΈ> (ΓΈ)
packages/app-config 44.58% <ΓΈ> (ΓΈ)
packages/builtin-tool-lobe-agent 20.07% <ΓΈ> (ΓΈ)
packages/context-engine 84.12% <ΓΈ> (ΓΈ)
packages/conversation-flow 91.29% <ΓΈ> (ΓΈ)
packages/device-gateway-client 90.18% <ΓΈ> (ΓΈ)
packages/env 11.42% <ΓΈ> (ΓΈ)
packages/eval-dataset-parser 95.15% <ΓΈ> (ΓΈ)
packages/eval-rubric 76.11% <ΓΈ> (ΓΈ)
packages/file-loaders 87.89% <ΓΈ> (ΓΈ)
packages/locales 0.87% <ΓΈ> (-0.01%) ⬇️
packages/memory-user-memory 74.99% <ΓΈ> (ΓΈ)
packages/model-bank 99.99% <ΓΈ> (ΓΈ)
packages/model-runtime 84.27% <ΓΈ> (ΓΈ)
packages/prompts 72.51% <ΓΈ> (ΓΈ)
packages/python-interpreter 92.90% <ΓΈ> (ΓΈ)
packages/ssrf-safe-fetch 0.00% <ΓΈ> (ΓΈ)
packages/trpc 40.43% <ΓΈ> (ΓΈ)
packages/types 35.18% <ΓΈ> (ΓΈ)
packages/utils 85.03% <ΓΈ> (ΓΈ)
packages/web-crawler 88.08% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Store 68.41% <ΓΈ> (ΓΈ)
Services 54.25% <ΓΈ> (ΓΈ)
Server 97.03% <ΓΈ> (ΓΈ)
Libs 54.03% <ΓΈ> (-0.17%) ⬇️
Utils 82.48% <90.90%> (+0.40%) ⬆️
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tjx666

tjx666 commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@codex review latest code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ea07c4075

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/onboardingRedirect.ts
@tjx666

tjx666 commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@codex review latest code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c2226a6a93

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/routes/onboarding/_layout/index.tsx
tjx666 added 5 commits June 10, 2026 15:18
New users previously bounced through the home page before the async user
state check hard-redirected them to /onboarding. Now every signup entry
(email signup with/without email verification, first-time social OAuth and
magic link via better-auth newUserCallbackURL) lands on /onboarding first.

An explicit signup target is threaded through the callbackUrl query param,
stashed in sessionStorage at onboarding entry, and restored at every
onboarding finish point (classic agent picker, lite mode selection, agent
flow completion panel).
The legacy needs-onboarding redirect now threads the page the user was on
through the same callbackUrl mechanism, so finishing onboarding returns
them there instead of always landing on home.
…Url threading

Needs-onboarding users landing on agent pages with a message param now go
through onboarding like everyone else; the threaded callbackUrl preserves
the original target so the message is still delivered once onboarding
completes.
- Reject backslash paths: browsers normalize \ to / in navigations, so
  /\evil.com would escape as a protocol-relative URL
- Normalize same-origin absolute callback URLs (e.g. from the
  protected-route proxy) to relative paths instead of dropping them
A callback stashed by an abandoned onboarding attempt could be consumed
by a later attempt in the same tab that landed on plain /onboarding,
redirecting its completion to the previous target. Clear the stash on
fresh top-level entries without a valid callbackUrl; internal step
re-entries (?step=...) and branch paths keep it intact.
@tjx666 tjx666 force-pushed the feat/signup-direct-onboarding branch from c2226a6 to 4bad732 Compare June 10, 2026 07:18
@tjx666

tjx666 commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@codex review latest code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tjx666 tjx666 merged commit 8b342c6 into canary Jun 10, 2026
24 of 26 checks passed
@tjx666 tjx666 deleted the feat/signup-direct-onboarding branch June 10, 2026 07:31
arvinxx added a commit that referenced this pull request Jun 10, 2026
# πŸš€ LobeHub Release (20260610)

**Release Date:** June 10, 2026  
**Since v2.2.2:** 131 merged PRs Β· 13 contributors

> This weekly release strengthens agent collaboration across cloud,
desktop, CLI, and workspace flows, with steadier runtime behavior and a
broader foundation for workspace-scoped data.

---

## ✨ Highlights

- **Agent execution across devices** β€” Unifies per-device working
directories, project skill discovery, and sub-agent suspend/resume
behavior across server, QStash, and device RPC flows. (#15543, #15566,
#15481, #15620, #15591)
- **Connector and sandbox platform** β€” Expands connector permissions,
custom OAuth MCP connector onboarding, sandbox provider support, and
user-uploaded file sync into cloud sandbox runs. (#15463, #15546,
#15184, #15550)
- **Desktop and CLI reliability** β€” Fixes desktop cold-start,
auto-update, Windows build, CLI skill discovery, and `lh connect` agent
dispatch paths. (#15547, #15525, #15527, #15562, #15632, #15634)
- **Pages and sharing** β€” Refreshes topic sharing, improves Page Editor
layout behavior, and routes Page Agent tool execution through the
server-side editor path. (#15581, #15556, #15588, #15023, #15610)
- **Model availability and provider updates** β€” Adds user-scoped LobeHub
model availability, Claude Fable 5, Qwen thinking preservation, and
MiniMax M3 updates. (#15590, #15639, #13494, #15376)

---

## πŸ—οΈ Core Product & Architecture

### Agent Runtime & Heterogeneous Agents

- Improves sub-agent lifecycle handling, including async suspend/resume,
queue-mode QStash resume delivery, and blocking nested sub-agent calls.
(#15481, #15620, #15575)
- Stabilizes heterogeneous agent ingestion and streaming with raw stream
dumps, per-turn usage, image forwarding on regenerate, and
duplicate-text fixes. (#15602, #15577, #15592, #15585)
- Adds execution-device and working-directory controls across device
RPC, legacy defaults, and remote-spawned Claude Code sessions. (#15543,
#15566, #15591, #15572)
- Improves runtime diagnostics and compatibility, including Gemini
multimodal output capture, abort stream semantics, and trace quality
analysis. (#15535, #13677, #15508)

---

## πŸ“± Platforms, Integrations & UX

### Connectors, Sandbox & Tools

- Ships API-level connector tool permissions, custom OAuth MCP connector
onboarding, and connector-first runtime execution. (#15463, #15546)
- Adds sandbox provider support, cloud sandbox file sync, and safer
external URL file input handling with SSRF validation. (#15184, #15550,
#12657)
- Improves tool visibility and execution with pinned app-fixed tools,
ANSI output rendering, gateway-tunneled MCP calls, and automatic
headless tool runs. (#15509, #15516, #15469, #15492)

### Desktop, CLI & Web UX

- Restores desktop startup and reload behavior, preserves IPC error
causes, and keeps the tab bar new-tab action visible across routes.
(#15547, #15597, #15638)
- Fixes desktop update and build stability for browser quit guards,
macOS update signing, and Windows Visual Studio detection. (#15525,
#15527, #15562)
- Shows the plan-limit upgrade UI on desktop builds. (#15628)
- Adds the Agent Run delivery checker and fixes CLI device dispatch plus
skill list/search output. (#15489, #15634, #15632)
- Refreshes onboarding, auth source preservation, topic UI states,
referral/Fable campaign copy, and chat-input control bar behavior.
(#15629, #15544, #15573, #15614, #15616, #15617, #15622, #15643)

---

## πŸ”’ Security, Reliability & Rollout Notes

- External URL file input now includes SSRF validation for safer Google
file handling. (#12657)
- Database workspace-scope migrations are part of this release;
self-hosted operators should run the normal migration path before
serving the updated app. (#15446, #15465, #15468, #15472)
- The release branch was re-cut from `canary` and includes the latest
`main` release-version commit so `v2.2.2` is the verified compare base.

---

## πŸ‘₯ Contributors

@ONLY-yours, @sxjeru, @hardy-one, @xujingli, @hezhijie0327, @Coooolfan,
@arvinxx, @tjx666, @Innei, @rivertwilight, @rdmclin2, @cy948,
@AmAzing129

**Full Changelog**:
v2.2.2...release/weekly-20260610-recut-3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants