-
[OPIK-6066] [FE] fix: verify workspace version on pair routes
发布于
2026-04-22 10:10:54 +00:00 Pair routes (/pair/v1 and the /opik/pair/v1 OSS alias) render outside
WorkspaceGuard — they must work without auth — so WorkspaceVersionResolver
was never mounted for them. Combined with OPIK-6066's optimistic v2
default, a v1-workspace user clicking an SDK-generated pair link with a
cold cache would have landed on V2App's PairingPage instead of V1App's
"upgrade required" screen.Adds PairRouteVersionGuard which seeds activeWorkspaceName from the
pair URL's ?workspace= query and mounts WorkspaceVersionResolver. The
Resolver's existing API check + reload-on-mismatch flow now runs for
pair routes too:- v2 workspace + cache miss: V2 PairingPage renders immediately,
Resolver confirms v2 in background, no reload. - v1 workspace + cache miss: gate picks v2 optimistically → Resolver
detects v1 → reload → V1 PairV1Page (upgrade-required) renders. - cache hit: correct App on first paint, Resolver confirms.
Caught by baz-reviewer[bot] on PR #6429.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
下载附件
- v2 workspace + cache miss: V2 PairingPage renders immediately,