发布

  • [OPIK-6027] [FE] feat: rework onboarding step 2 CTAs and demo banner (#6398)

    frostbyte_neo 发布于 2026-04-20 18:35:53 +00:00

    • feat(onboarding): combine step-2 CTAs into "Show me a demo project" + rework banner flow
    • Replace "View Demo project" + "Skip for now" with a single ShowDemoProjectButton
      • Enabled: "Show me a demo project" (navigates to demo logs page)
      • Loading: "Generating demo data…" with Loader2 spinner when demo project
        is still being generated by the backend
    • Remove handleSkip + ONBOARDING_SKIPPED tracking; primaryReady path unchanged
    • Banner simplified:
      • Shows only on demo project (no longer on user's own agent project)
      • New copy: "You are viewing a demo project, create your own"
      • Click resets onboarding step to AGENT_NAME and navigates to /get-started
    • AgentNameStep auto-advances to step 2 on 409 Conflict (treats duplicate name
      as "reuse existing project") — supports the banner round-trip
    • Move useAutoCompleteAgentOnboarding invocation out of DemoProjectBanner and
      into ConnectAgentStep; rename param activeProjectId -> projectId

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • [NA] [FE] fix: reassert active project from URL when initializer overwrites it

    ProjectPage's mount effect wrote the URL project id once, but
    useActiveProjectInitializer (in SideBar) resolves useProjectsList
    asynchronously and then overwrites that value with "latest project" —
    leaving the sidebar stuck on a stale project while the URL/breadcrumbs
    showed the real one. Listen for activeProjectId drift and re-assert the
    URL as the source of truth.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • fix(onboarding): keep auto-complete inside DemoProjectBanner where it's semantically needed

    Previous commit moved the hook into ConnectAgentStep to avoid the banner
    having to fetch the agent project. But ConnectAgentStep only mounts when
    the onboarding overlay is visible — so the hook would miss its primary
    use case: user on the demo project with stale onboarding state from a
    prior session (they have traces but never clicked "Explore Opik").

    Move it back to the banner and switch the param to agentName so the hook
    fetches the agent project itself via useProjectByName.

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • chore(onboarding): tweak demo banner link copy to "click here to create your own"

    Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

    • style(onboarding): primary blue banner with white text, link-style demo button
    • Banner: bg-primary + text-white (was bg-muted + text-foreground)
    • ShowDemoProjectButton: link variant with muted-slate text + ChevronsRight
      icon, matching the retired "Skip for now" visual language

    Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

    • style(onboarding): center demo banner content horizontally

    Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com


    Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com

    下载附件