fix(desktop): persist recovered legacy tile owners - #103548
Open
brandonriverott wants to merge 1 commit into
Open
brandonriverott wants to merge 1 commit into
brandonriverott wants to merge 1 commit into
Conversation
Migrate route-less saved tiles from unique durable owner hints, preserve explicit routes, and keep pop-out hydration read-only. Use unique late hints for tile lookup and gateway retention. Verified with 86 focused tests, full Desktop typecheck, clean focused lint, and independent staged-diff review.
SummaryPersists recovered legacy tile owner-routes so a proven unique hint survives cache expiry, and makes live lookups fall back to the hint cache. Secondary/browser windows are excluded from rewriting shared storage. Findings
Tests cover persistence, expiry survival, ambiguity, and pop-out no-rewrite. No blockers. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Recover exact owner routes for saved Desktop tiles written before tiles persisted those routes. Without recovery, an idle restored chat can lose the secondary gateway it needs or fail to route back to its owner.
Related Issue
Distinct from merged #96110, which backfills backend session ownership, and open #96313, which extends foreground keep-set/resume behavior. This PR migrates renderer tile storage and does not duplicate the foreground keep-set change from #96313.
Type of Change
How to Test
From
apps/desktop:npm run test:ui -- src/store/session-states-owner-route-migration.test.ts src/store/session-states.test.ts src/store/session-states-foreground-scopes.test.ts --maxWorkers=3npm run typechecknpx eslint src/store/session-states.ts src/store/session-states-owner-route-migration.test.tsVerified on macOS 26.5.1 against main
f58fcc8118d9db092ad60d363d4a28520e08ac5a:The two new invariant tests cover unambiguous recovery, explicit-route precedence, ambiguous-route rejection, persistence after hints disappear, late hints, and both pop-out window types. They use isolated jsdom local storage, not a live user's persisted workspace. Packaged-app E2E and full Python suites were not run.
Checklist
AI assistance
Prepared with Codex assistance. Stated tests, typecheck, and lint ran locally; independent review did not run tests.