Skip to content

feat(web): split onboarding newsletter into its own third step#4106

Merged
Siri-Ray merged 5 commits into
mainfrom
feat/onboarding-newsletter-step
Jun 10, 2026
Merged

feat(web): split onboarding newsletter into its own third step#4106
Siri-Ray merged 5 commits into
mainfrom
feat/onboarding-newsletter-step

Conversation

@elihahah666

Copy link
Copy Markdown
Contributor

Why

onboarding 第二步「了解你」(About you) 同时塞了身份/规模/用途/来源四个调研下拉 newsletter 邮箱订阅,一屏里混了两类不相干的诉求,邮箱框被挤在问卷底部容易被忽略。把订阅单拎成独立的第三步,让 About-you 只做用户画像问卷、订阅有自己的落地步骤,转化路径更清楚。i18n key 和埋点枚举此前已为「第三步」预留,这次只是把 UI 接上。

What users will see

首次启动的 onboarding 引导从 2 步变 3 步:连接 → 了解你 → 获取最新动态

  • 第二步「了解你」只剩四个调研下拉,不再有邮箱框。
  • 新增第三步「获取最新动态」(Stay in the loop):一个占满面板宽度的可选邮箱订阅框,底部「上一步 / 完成设置」。
  • 顶部步骤指示器相应变为三格,可点击来回切换。

行为不变:邮箱仍在最后一步点「完成设置」时提交;留空则跳过;只上报 opt-in 布尔,不上报邮箱地址本身。

Surface area

  • UI — onboarding 新增独立的 newsletter 第三步 (apps/web)
  • Keyboard shortcut
  • CLI / env var
  • API / contract
  • Extension point
  • i18n keys — 新增 settings.onboardingStepNewsletter(19 个 locale)
  • New top-level dependency
  • Default behavior change

说明 CLI 双轨:newsletter 订阅本身不是新 capability(既有功能),本 PR 仅在 onboarding UI 内重排步骤,未新增 /apiod 子命令,故 CLI 轨不适用。

Screenshots

第二步「了解你」(邮箱框已移出):四个调研下拉 + 上一步/继续。
第三步「获取最新动态」:独立页面,占满宽度的邮箱框 + 上一步/完成设置;顶部三格步骤条第 3 格高亮。

(本地 headless 截图已核对:第三步邮箱框宽度 860px = 面板宽度,和第二步下拉框对齐。)

Bug fix verification

Validation

  • pnpm guard
  • pnpm typecheck
  • pnpm --filter @open-design/web test ✅(324 文件 / 3184 用例通过,含更新后的 EntryShell.onboarding.test.tsx
  • 本地 pnpm tools-dev run web 起服务,headless 浏览器走完三步逐屏核对

@lefarcen lefarcen added size/M PR changes 100-300 lines risk/medium Medium risk: regular code changes labels Jun 10, 2026
@lefarcen lefarcen requested a review from nettee June 10, 2026 14:50
@lefarcen lefarcen added the type/feature New feature label Jun 10, 2026
@lefarcen

Copy link
Copy Markdown
Contributor

Heads-up: PR #3651 (@Sid-Qin, "Make onboarding a focused setup flow") is also open and touches all four files this PR modifies — EntryShell.tsx, entry-layout.css, EntryShell.onboarding.test.tsx, and analytics/events.ts. #3651 is currently APPROVED but DIRTY against main. The two PRs will need a coordinated merge order to avoid conflicts — sharing so neither effort blocks the other.

@elihahah666 elihahah666 requested a review from Siri-Ray June 10, 2026 14:54
@github-actions

Copy link
Copy Markdown
Contributor

Visual regression review

Head: 8e92a0d · Base: e98e75f

10 changed · 25 unchanged · 0 missing baseline · 0 failed

Changed cases

Case Main PR Diff
visual-avatar-local-agent-list main pr diff
visual-avatar-menu main pr diff
visual-home-plugin-use-with-query main pr diff
visual-new-project-modal main pr diff
visual-onboarding-runtime main pr diff
visual-project-avatar-model-dropdown main pr diff
visual-project-workspace main pr diff
visual-settings-byok main pr diff
visual-settings-execution main pr diff
visual-settings-local-cli main pr diff
Unchanged cases
Case Main PR Diff
visual-design-system-detail main pr diff
visual-design-systems main pr diff
visual-home main pr diff
visual-home-catalog main pr diff
visual-home-context-picker main pr diff
visual-home-plugin-filter main pr diff
visual-home-plugin-use-staged main pr diff
visual-home-staged-attachment main pr diff
visual-integrations main pr diff
visual-integrations-mcp main pr diff
visual-integrations-use-everywhere main pr diff
visual-plugin-details main pr diff
visual-plugin-share-menu main pr diff
visual-plugins main pr diff
visual-projects main pr diff
visual-projects-kanban main pr diff
visual-settings-byok-model-dropdown main pr diff
visual-settings-byok-openai main pr diff
visual-settings-local-cli-model-dropdown main pr diff
visual-tasks main pr diff

Visual diff is advisory only and does not block merging.

@nettee nettee 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.

I found one non-blocking analytics regression in the new onboarding step split: the About-you snapshot is now tied to a specific navigation action instead of the overall completion path.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

Comment thread apps/web/src/components/EntryShell.tsx Outdated

@Siri-Ray Siri-Ray 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.

@elihahah666 thanks for splitting the newsletter capture into its own focused onboarding step. I found one merge-blocking issue: the PR adds the third step in the app and unit coverage, but the critical Playwright onboarding flows still exercise the old two-step path and are failing in CI.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

Comment thread apps/web/src/components/EntryShell.tsx

@nettee nettee 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.

One non-blocking item remains in the current head: the e2e follow-up looks addressed, but the About-you analytics snapshot is still tied to one navigation path instead of the overall completion path.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

Comment thread apps/web/src/components/EntryShell.tsx Outdated
…tion path

The newsletter step is now its own (final) step with a clickable stepper
and Back button. Emitting the about_you_submit survey snapshot when the
user leaves the About-you step double-fired on Back-then-Continue and
fired zero times on a forward stepper jump. Move it onto the completion
path, stamp it with fixed About-you coordinates (it describes the
About-you submission regardless of which step finishes), and guard it
with a per-session ref so it is exactly-once. Adds regression tests for
the stepper-jump and Back-then-Continue flows.
@elihahah666

Copy link
Copy Markdown
Contributor Author

Thanks for the review — both points addressed:

@Siri-Ray (e2e P0 gate): Fixed in 09b1b96. e2e/ui/amr-onboarding.test.ts now clicks Continue from About you into the new Newsletter step before Finish setup, across every completion flow (AMR sign-in, BYOK, about-you, transient-recovery). Ran the full file locally — 10/10 passed.

@nettee (about_you_submit no longer exactly-once): Fixed in a361b3a. Moved the snapshot off the "leaving About-you" path back onto the completion path, stamped it with fixed About-you coordinates (area/step) since it describes the About-you submission regardless of which step finishes, and guarded it with a per-session aboutYouReportedRef so it fires exactly once. Added regression tests for both the forward stepper-jump and the Back-then-Continue detour flows.

Re-requesting review.

@lefarcen lefarcen requested a review from Siri-Ray June 10, 2026 16:08
@Siri-Ray Siri-Ray added this pull request to the merge queue Jun 10, 2026
Merged via the queue into main with commit 4c8914d Jun 10, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk: regular code changes size/M PR changes 100-300 lines type/feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants