Skip to content

fix(onboarding): repoint funnel entry at /setup/tasks, not home (chat#1889 item 1, part 1)#1887

Open
sweetmantech wants to merge 3 commits into
mainfrom
feat/converge-onboarding-surfaces
Open

fix(onboarding): repoint funnel entry at /setup/tasks, not home (chat#1889 item 1, part 1)#1887
sweetmantech wants to merge 3 commits into
mainfrom
feat/converge-onboarding-surfaces

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What

Today direct-chat signups render the unified OnboardingSequence (via HomePageuseOnboardingGate), while marketing-funnel signups deep-link to the standalone /onboarding/first-task mount — a second, divergent onboarding surface.

This ships the minimal user-testable first slice of convergence: the funnel entry now routes through the same surface.

Change

  • app/onboarding/first-task/page.tsx — replace the standalone <FirstTaskStep /> mount with redirect("/").

The home gate renders OnboardingSequence at the account's derived step (getOnboardingStep — first unmet checkpoint), so the funnel CTA always lands at the right step instead of a hard-coded first-task, and both entry paths converge on one experience.

Why a redirect (not re-mounting the sequence here)

OnboardingSequence needs the full gate wiring (checkpoints, session skip flags, resume) that HomePage already owns. Redirecting to / reuses that single source of truth (DRY) rather than duplicating the gate on this route.

Deferred follow-up (out of scope here)

  • Fully retire the interim standalone /onboarding/* mounts (/onboarding/first-task once nothing links to it, plus /onboarding/roster).
  • Repoint any external/marketing deep-links straight at /.

Kept as a redirect for now so any live funnel link keeps working through the cutover.

Verification

  • pnpm exec tsc --noEmit — clean for the changed page.
  • pnpm exec eslint app/onboarding/first-task/page.tsx — clean.
  • Behavior: visiting /onboarding/first-task now server-redirects to /, where an incomplete account resumes OnboardingSequence at its derived step (existing HomePage behavior, covered by components/Home/__tests__/HomePage.onboarding.test.tsx).

Targets main. Part of chat#1885 (converge the two onboarding surfaces).

🤖 Generated with Claude Code


Summary by cubic

Redirect /onboarding/first-task to /setup/tasks and /onboarding/roster to /setup/artists, and repoint the catalog report CTA to /setup/tasks so funnel and email land in the canonical OnboardingSequence. Keeps /onboarding/* as redirects for legacy links and adds a test; progresses chat#1885 and aligns with chat#1889.

Written for commit 3d26e22. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Updated onboarding navigation to use the canonical setup flow for tasks and artists.
    • Existing onboarding links now redirect automatically to the appropriate setup pages.
    • Updated catalog report calls to action to direct users to the current task setup experience.

…quence

The funnel-entry deep-link (/onboarding/first-task) rendered a standalone
FirstTaskStep mount — a surface distinct from the unified OnboardingSequence
that direct-chat signups see. Redirect it to the home gate, which renders
OnboardingSequence at the account's derived step, so both entry paths converge
on one onboarding experience and the funnel CTA always lands at the correct
step rather than a hard-coded one.

Deferred (noted in PR): fully retire the interim standalone /onboarding/*
mounts and repoint external deep-links.

Refs chat#1885.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview Jul 27, 2026 4:28am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 717f1d53-d617-4a72-92bc-89559450f125

📥 Commits

Reviewing files that changed from the base of the PR and between a2d8cf8 and 3d26e22.

⛔ Files ignored due to path filters (1)
  • components/Catalog/report/__tests__/CatalogReportCta.test.tsx is excluded by !**/*.test.* and included by components/**
📒 Files selected for processing (3)
  • app/onboarding/first-task/page.tsx
  • app/onboarding/roster/page.tsx
  • components/Catalog/report/CatalogReportCta.tsx

📝 Walkthrough

Walkthrough

Legacy onboarding routes now redirect to /setup/tasks and /setup/artists. The catalog report CTA also links directly to /setup/tasks, avoiding the retired first-task surface.

Changes

Onboarding route migration

Layer / File(s) Summary
Redirect retired onboarding routes
app/onboarding/first-task/page.tsx, app/onboarding/roster/page.tsx
The legacy first-task and roster pages now redirect to the canonical setup routes.
Update catalog task CTA
components/Catalog/report/CatalogReportCta.tsx
The CTA link and documentation now target /setup/tasks instead of the retired onboarding route.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

  • recoupable/chat#1870 — Introduced the roster page behavior that this change now replaces with a redirect.
  • recoupable/chat#1888 — Introduced the /setup/* pages targeted by these legacy-route redirects.

Poem

Old paths turn,
New setup routes shine,
Tasks and artists align,
Links take the cleaner line.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Solid & Clean Code ✅ Passed The touched files are tiny, single-purpose redirects/link updates; canonical setup routes are centralized, and the CTA test asserts the new /setup/tasks target.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/converge-onboarding-surfaces

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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: cb7472c12c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread app/onboarding/first-task/page.tsx Outdated
*/
const FirstTaskOnboardingPage = () => <FirstTaskStep />;
const FirstTaskOnboardingPage = () => {
redirect("/");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the first-task scheduling flow

For users coming from the catalog report CTA, CatalogReportCta still links to /onboarding/first-task, but this redirect sends them to /, where the task step is only the generic OnboardingStepCard linking to /tasks rather than FirstTaskStep with the pre-run report and Monday scheduling confirmation. In the funnel case where the derived onboarding step is task, this removes the promised one-click weekly-report setup path and drops users into the generic app instead of running/scheduling the first report.

Useful? React with 👍 / 👎.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Replaces a standalone onboarding step with a redirect to the shared home gate, converging funnel entry onto existing logic. The change is bounded, clearly beneficial, and the redirect preserves backward compatibility and is trivially verifiable.

Re-trigger cubic

sweetmantech and others added 2 commits July 26, 2026 23:18
chat#1887 previously redirected /onboarding/first-task to `/`. That route's
only internal referrer is the catalog report's primary CTA, which is where
both the marketing valuation funnel and the valuation email land — so the
redirect sent converting users to the home surface instead of the step,
where they hit the placeholder onboarding cards.

Repoint at the canonical `/setup/*` sequence instead (chat#1889):
- /onboarding/first-task -> /setup/tasks
- /onboarding/roster     -> /setup/artists
- CatalogReportCta href  -> /setup/tasks

The `/onboarding/*` mounts stay as redirects rather than being deleted so any
pasted or indexed link still resolves; deletion is a follow-up once logs show
no traffic.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sweetmantech sweetmantech changed the title feat(onboarding): converge funnel entry onto the unified OnboardingSequence fix(onboarding): repoint funnel entry at /setup/tasks, not home (chat#1889 item 1, part 1) Jul 27, 2026
@sweetmantech

Copy link
Copy Markdown
Collaborator Author

Re-scoped 2026-07-26

The prior diff redirected /onboarding/first-task/. That is the wrong target under the 2026-07-23 decision that /setup/* is the canonical onboarding sequence, and it was an active regression risk: this route's only internal referrer is components/Catalog/report/CatalogReportCta.tsx L23 — the primary CTA on the catalog report, which is the landing page for both the marketing valuation funnel and the valuation email. Merging as-is would have sent converting users to the home surface, which still renders the placeholder onboarding step cards.

What changed

File Before After
app/onboarding/first-task/page.tsx redirect("/") redirect("/setup/tasks")
app/onboarding/roster/page.tsx rendered a 2nd RosterSocialsFlow redirect("/setup/artists")
components/Catalog/report/CatalogReportCta.tsx href="/onboarding/first-task" href="/setup/tasks"

The /onboarding/* mounts stay as redirects rather than deletions — no already-sent email deep-links there (welcome used /setup, valuation used /catalogs/{id}), but redirects are cheap insurance against pasted or indexed links. Deletion is a follow-up once logs show no traffic.

Verification

TDD, red → green on a new regression guard:

# RED (href still /onboarding/first-task)
AssertionError: expected '/onboarding/first-task' to be '/setup/tasks'
  components/Catalog/report/__tests__/CatalogReportCta.test.tsx:28:38
  Test Files  1 failed (1)

# GREEN (href /setup/tasks)
✓ components/Catalog/report/__tests__/CatalogReportCta.test.tsx (1 test) 176ms
  Test Files  1 passed (1)

pnpm exec tsc --noEmit reports no errors in the touched files. Preview click-through pending.

Tracked in chat#1889 (matrix row 1).

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 4 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Consolidates two onboarding surfaces into one by replacing standalone mounts with redirects to canonical setup routes, and updates the CTA link. Bounded refactor with no new behavior; backward-compatible via redirects.

Re-trigger cubic

@sweetmantech

Copy link
Copy Markdown
Collaborator Author

Preview verification — 2026-07-27

Preview: https://chat-hhy9sxnkd-recoup.vercel.app
Built from: 3d26e22d4233b0deb9b0fb2ecf8bcafa8c9f2294 (PR head — confirmed via sha-filtered deployment 5617142700, status success)
Account: brand-new signup, zero artists / zero catalogs / no valuation — i.e. the cold-start cohort described in chat#1889, tested in a fresh isolated browser context so first-run state is real.

Results

# Path Documented Actual Result
1 /onboarding/first-task (logged out) /setup/tasks landed /setup/tasks, rendered "Your first weekly report" + Privy login modal
2 /onboarding/roster (logged out) /setup/artists landed /setup/artists, rendered "Confirm your roster" + Privy login modal
3 /onboarding/first-task (authed) /setup/tasks landed /setup/tasks, rendered "Select an artist to generate your first report."
4 /onboarding/roster (authed) /setup/artists landed /setup/artists, rendered "No artists on your roster yet."
5 Redirect payload, both routes 307 to the setup route NEXT_REDIRECT;replace;/setup/tasks;307; and NEXT_REDIRECT;replace;/setup/artists;307;
6 CatalogReportCta href → /setup/tasks CTA routes to /setup/tasks not exercisable on this account — see below ⚠️ not verified live

The blocker note on chat#1889 is satisfied for rows 1–5: neither retired route lands on home, and neither renders the placeholder step cards. Both resolve to the canonical /setup/* pages.

/onboarding/first-task lands on /setup/tasks

/onboarding/roster lands on /setup/artists

Row 6 — why the CTA could not be verified live

CatalogReportCta only renders on a catalog report that has a valuation. On a cold-start account there is no path to one:

  • /catalogs"No catalogs found."
  • /catalogs/{unknown-id}"No valuation found for this catalog" (the page is account-scoped, so another account's catalog can't stand in)
  • /setup/catalog → redirects to /catalogs, which is empty

I also scanned all 36 chunks loaded on the catalog report route for /setup/tasks, /onboarding/first-task, and the CTA copy — none are present, so the component ships in a chunk that only loads once a valuation renders. That is not evidence either way; it just means the bundle can't stand in for the live check.

The href change is covered by the new unit test in this PR (components/Catalog/report/__tests__/CatalogReportCta.test.tsx). To close row 6 live, someone needs an account that arrived through the valuation funnel — I did not run the marketing funnel because it creates an Attio lead and sends real email.

Finding — the redirects are client-side, not HTTP

Both retired routes return HTTP 200, not 307:

$ curl -sI https://chat-hhy9sxnkd-recoup.vercel.app/onboarding/first-task
HTTP/2 200
x-matched-path: /onboarding/first-task
x-nextjs-prerender: 1

Next prerendered both pages, so the redirect() ships inside the RSC flight payload and executes on hydration rather than as a server redirect. It works correctly in a real browser (rows 1–4 above), so this does not block the merge. But it means a non-JS client — curl, a crawler, a link previewer — sees the old URL return 200 with an empty shell. Given the PR's stated intent is that "any pasted/indexed link still resolves," worth a follow-up: export const dynamic = "force-dynamic" on both pages, or a redirects() entry in next.config, would make it a real 307.

Pre-existing issues observed (not caused by this PR, already tracked)

  • /setup/artists shows "Step 1 of 2" — the disagreeing progress counter that #1891 fixes.
  • Copy reads "We set these artists up from your valuation" on an account with no valuation, and "This is my artist — continue" is disabled with an empty roster — the cold-start dead end #1892 addresses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant