fix(desktop): key-based React remount for workspace switching (#415)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Wes
2026-04-28 18:13:12 +00:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 1ba01965c0
commit 00a4aaba3d
14 changed files with 252 additions and 48 deletions
+10
View File
@@ -70,6 +70,16 @@ if (typeof window !== "undefined") {
portPromise = fetchProxyPort();
}
/**
* Reset module-level caches so the next render re-fetches the proxy port
* and relay origin for the new workspace.
*/
export function resetMediaCaches(): void {
cachedPort = null;
portPromise = null;
cachedRelayOrigin = null;
}
/**
* If `url` is a Blossom media URL hosted on the Sprout relay, rewrite it
* to go through the localhost streaming proxy. External Blossom URLs and