perf(desktop): instant channel switching — non-blocking first paint, persisted snapshots (#1452)

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
Wes
2026-07-02 08:45:38 -07:00
committed by GitHub
co-authored by Brain
parent a9e752e254
commit deb3e6adca
8 changed files with 531 additions and 30 deletions
@@ -18,6 +18,7 @@ import {
} from "./workspaceStorage";
import { removeSelfProfileCachesForRelay } from "@/features/profile/lib/selfProfileStorage";
import { removeChannelSnapshotForRelay } from "@/features/channels/channelSnapshot";
import { removeMessageSnapshotsForRelay } from "@/features/messages/lib/messageSnapshot";
export type UseWorkspacesReturn = {
workspaces: Workspace[];
@@ -118,6 +119,7 @@ function useWorkspacesInternal(): UseWorkspacesReturn {
if (removed) {
removeSelfProfileCachesForRelay(removed.relayUrl);
removeChannelSnapshotForRelay(removed.relayUrl);
removeMessageSnapshotsForRelay(removed.relayUrl);
}
}