发布

  • [OPIK-4964] [FE] feat: v2 sidebar navigation with project-scoped routing (#5802)

    frostbyte_neo 发布于 2026-03-24 11:08:16 +00:00

    Implements the v2 sidebar with project-first navigation as part of the
    IA Revamp (OPIK-4617).

    Route tree:

    • All feature routes moved under /$ws/projects/$projectId/...
    • V1 compat splat redirects catch old workspace-level URLs
    • SDK redirects (RedirectProjects, RedirectDatasets) unchanged

    Active project:

    • activeProjectId stored in AppStore (single source of truth)
    • useActiveProject hook syncs localStorage/API fallback → store
    • ProjectPage syncs URL $projectId → store

    Sidebar:

    • Project selector dropdown with search, edit/delete actions
    • Grouped menu sections: Observability, Evaluation, Prompt engineering,
      Optimization, Production
    • Workspace section at bottom with workspace selector + Dashboards +
      Configuration
    • SupportHub moved to TopBar
    • Insights and Agent configuration shown as disabled (no route yet)

    Internal links:

    • ~40 navigate()/Link references updated to project-scoped paths
    • Shared hooks (useSuiteIdFromURL, usePromptIdFromURL, etc.) duplicated
      in v2 with project-scoped from: paths
    • useNavigateToExperiment and useLoadPlayground duplicated in v2
    • ResourceLink uses projectUrl field for version-aware URL resolution
    • matchRoute/useParams from: patterns updated for project-scoped routes

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

    下载附件