发布

  • [OPIK-6027] [FE] feat: add demo project button in onboarding and demo project banner (#6346)

    frostbyte_neo 发布于 2026-04-20 13:31:56 +00:00

    • [OPIK-6027] [FE] feat: add demo project button in onboarding and demo project banner
    • Add "View Demo project" link button to ConnectAgentStep footer
      (only shown when demo project exists, navigates on same tab)
    • Add DemoProjectBanner at layout level using existing --banner-height
      mechanism (shows only when viewing demo project and onboarding is active)
    • Update HelpLinks.DemoProject to link directly to demo project logs
    • Fix DEMO_PROJECT_NAME to match backend demo data generator

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

    • refactor(onboarding): extract ViewDemoProjectButton to separate file

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

    • fix(onboarding): use theme token for banner bg, fix import order, keep Skip right-aligned
    • Replace bg-slate-100 with bg-muted in DemoProjectBanner
    • Move Link import above @/ imports in ViewDemoProjectButton
    • Add ml-auto to Skip button so it stays right-aligned when demo button is absent

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

    • feat(onboarding): show banner on agent project and auto-complete when traces exist
    • Banner now shows on demo project OR the onboarding agent project (by name match)
    • Extract useAutoCompleteAgentOnboarding hook that marks onboarding DONE when
      the agent project already has traces (covers stale state from prior sessions)
    • Export AgentOnboardingState/AgentOnboardingStep from context, drop duplicate
      local interface in banner
    • Use functional setter in auto-complete to avoid effect re-runs from
      localStorage hook's unstable object reference

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

    • feat(onboarding): poll for demo project during onboarding to handle async backend setup

    Demo data creation on signup runs in the background for ~30-60s, so the
    "View Demo project" button was hidden for the first session. Add an opt-in
    poll flag to useDemoProject (5s interval, 5min cap) and enable it from
    ViewDemoProjectButton so the button appears as soon as the project is
    ready, without a page reload.

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

    • fix(onboarding): track demo project poll start in ref so max duration cap triggers

    React Query updates dataUpdatedAt on every successful fetch (even null
    results), so deriving the "first fetch" timestamp from query state defeated
    the 5min cap — polling would continue forever. Capture the start time in a
    useRef instead, reset when the project appears.

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


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

    下载附件