发布

  • [OPIK-6101] [FE] fix: preserve workspace prefix in Ollie navigate with basepath collision (#6435)

    frostbyte_neo 发布于 2026-04-22 13:21:02 +00:00

    Ollie's bridge navigate callback was building the target URL as
    /${workspaceName}${path} and passing the result as to: to
    TanStack Router. @tanstack/react-router strips the router
    basepath from the start of to with an unbounded ^basepath
    regex (see path.js resolvePath / removeBasepath), with no
    / boundary check. With cloud basepath /opik and a workspace
    named e.g. opik-demos, the string /opik-demos/... matched the
    ^/opik prefix and got mangled to -demos/..., producing the
    final URL /opik/-demos/... — a workspace the user has no access
    to, landing them on the "This is a private project" screen.

    Inject the workspace via a $workspaceName template param and
    pass it through params instead. The basepath strip now runs
    against /$workspaceName/..., which doesn't match the basepath
    regex, and the workspace name is substituted after the strip.

    Co-authored-by: Claude Opus 4.7 noreply@anthropic.com

    下载附件