feat(onboarding): end setup on the catalog valuation (chat#1889 row 10)

Merged
SW
4mo ago
+285-24

Matrix row 10 in chat#1889 — the payoff the issue is named for. Independent of the convergence chain.

Why

Two dead ends on the same number:

  1. Finishing roster + socials ended on a generic green CheckCircle2 and a "Back to Recoup" button.
  2. /setup/valuation was a bare redirect("/catalogs") — so the welcome email's "See your baseline valuation" link had no real destination.

A signup converts on a valuation and then never sees it again inside the product.

What changed

  • RosterVerifiedPanel renders the account's valuation using the existing homepage hero (useHomeValuation + ValuationHero) — no second valuation surface — then points at the weekly report that keeps it measured.
  • New SetupValuation mounts at /setup/valuation with the same hero, and falls back to /catalogs only when the account genuinely has no catalog to value.
  • The no-valuation fallback now points at the step that unlocks one (/setup/catalog) instead of dead-ending on "Back to Recoup".

Verification

TDD, red → green:

```

RED — panel still renders the generic check, no valuation

× ends setup on the catalog valuation, not a generic green check
Tests 1 failed | 1 passed (2)

GREEN

pnpm exec vitest run components/Onboarding
Test Files 1 passed (1)
Tests 2 passed (2)
```

Tests assert both directions: the valuation figure and measured-track count render when a valuation exists ($1.4M, 42 tracks measured), and the confirmation state still appears when it does not — so a cold-start account can't hit an empty hero.

pnpm exec tsc --noEmit clean for the touched files. Preview click-through pending (needs an authed account with a measured catalog).

Tracked in chat#1889 (matrix row 10).


Summary by cubic

End onboarding on the catalog valuation and make /setup/valuation show the same valuation instead of redirecting. Delivers chat#1889 row 10 and adds a guard to prevent cold-load bounces.

  • New Features

    • RosterVerifiedPanel now shows the account’s valuation using ValuationHero + useHomeValuation, with a CTA to /setup/tasks. If no valuation, show confirmation with a CTA to /setup/catalog.
    • New SetupValuation at /setup/valuation renders the same hero and weekly report CTA; only redirects to /catalogs when the account has no catalog. Tests cover the hero view, fallbacks, and /setup/valuation redirects.
  • Bug Fixes

    • Gate /setup/valuation on isPending (not isLoading) from useCatalogs to avoid redirecting before auth enables the query, preventing cold-load bounces from the welcome email link.

Summary by CodeRabbit

  • New Features

    • Added a baseline valuation step to the onboarding flow.
    • Displays valuation details, artist information, and measured track counts.
    • Added a link to set up weekly reports after valuation is available.
    • Added loading placeholders while valuation and catalog information loads.
    • Routes users without an existing catalog to catalog setup.
  • Bug Fixes

    • Welcome email links now open the intended valuation onboarding experience instead of redirecting immediately.