-
[OPIK-6101] [FE] fix: preserve workspace prefix in Ollie navigate with basepath collision (#6435)
发布于
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 asto:to
TanStack Router.@tanstack/react-routerstrips the router
basepath from the start oftowith an unbounded^basepath
regex (seepath.jsresolvePath/removeBasepath), with no
/boundary check. With cloud basepath/opikand a workspace
named e.g.opik-demos, the string/opik-demos/...matched the
^/opikprefix 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
$workspaceNametemplate param and
pass it throughparamsinstead. 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
下载附件