发布

  • [OPIK-6150] [FE] fix: block render on pair routes to preserve URL state

    frostbyte_neo 发布于 2026-04-23 11:06:52 +00:00

    Pair routes carry critical state in search/hash (e.g.
    /pair/v1?workspace=X#payload). Previously PairRouteVersionGuard
    delegated to WorkspaceVersionResolver, which renders optimistically —
    on a version mismatch, navigateToWorkspaceRoot would drop the query
    and hash, breaking the pairing flow.

    Give the pair guard its own blocking version check instead. It waits
    for /workspaces/versions before mounting children, so no router ever
    touches the URL on the wrong version. On mismatch we can use a plain
    window.location.reload() which preserves the full URL for the correct
    App's router to pick up.

    Same reload-count safety pattern as WorkspaceVersionResolver
    (VERSION_RELOAD_PREFIX + MAX_RELOADS = 2) to bound reload attempts
    if cache writes are failing silently.

    Addresses baz-reviewer feedback on PR #6452.

    Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

    下载附件