-
[OPIK-6150] [FE] fix: navigate to workspace root on version mismatch
发布于
2026-04-23 10:39:11 +00:00 The non-blocking change in the previous commit let V2App's TanStack
Router mount before the Resolver could detect a v1-workspace mismatch.
The router may rewrite the URL during that brief window (normalizing,
stripping unknown query params, or redirecting unmatched routes). By
the time the Resolver reloads to V1App, the URL is already corrupted
and v1 can't match it to a route.Fix: on version mismatch, navigate to the workspace root URL
(/opik/) instead of reloading the current URL. The correct
version's router then routes to home from that entrypoint. This is
the same pattern already used by UserMenu's new-experience toggle.Extracted the URL construction into a shared helper
navigateToWorkspaceRootin workspaceVersion.ts so both call sites
use the same code and intent.Tradeoff: users hitting a version mismatch lose their original deep
link (land on workspace home). Mismatch is rare (~5% of loads per
OPIK-6066 cache-hit measurements) and users with wrong cache almost
never have deep links worth preserving.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
下载附件