发布

  • [OPIK-5898] [FE] fix: pairing page V2 routing and workspace-version gate (#6269)

    frostbyte_neo 发布于 2026-04-15 10:30:08 +00:00

    • [OPIK-5898] [FE] fix: route /pair/v1 to V2 app and gate pairing on workspace version

    • [OPIK-5898] [FE] fix: make V2-only path detection basepath-independent

    • [OPIK-5898] [FE] fix: make pairing route basepath-relative

    TanStack strips the router basepath before matching, so the route path
    must be basepath-relative like every other route in the tree. With the
    hardcoded /opik/ prefix, the route only matched on OSS (basepath "/")
    and missed on cloud (basepath "/opik"), where the internal path is
    /pair/v1 after stripping — causing the pair link to fall through to
    the home redirect.

    • [OPIK-5898] [FE] fix: pairing UX polish and OSS fallback route
    • Add /opik/pair/v1 alias for OSS: the Python SDK hardcodes the /opik/
      prefix, which only strips on cloud where basepath is /opik. Marked
      with a TODO to remove once the SDK builds basepath-aware URLs.
    • Resolve workspace version synchronously at module load when possible
      (override, V2-only path, or no workspace in URL) so the first paint
      renders the correct App — no Loader flash on /pair/*.
    • PairingPage: use project icons (CheckCircle2, CircleAlert, Spinner),
      redirect to agent-configuration on success instead of window.close,
      and treat 409 (runner already paired) as success so the user still
      gets redirected.
    • [OPIK-5898] [FE] fix: surface parse errors before workspace-version check
    • Check parseError before the workspacePhase === "checking" branch so a
      malformed pairing fragment doesn't sit on "Connecting…" while the
      version query is in flight.
    • Drop the useMemo around workspaceName so any re-render picks up the
      current query string instead of the value frozen at mount.
    下载附件