From 6ef575dac4791ee7dab15f442543cdef08a7ff22 Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 07:30:51 +0200 Subject: [PATCH] test(app): reproduce cached background workspace visibility loss A workspace stored with background true is restored with background false. This failing reproduction isolates the cache behavior while investigating the reload assertion tracked in #6805. No production fix is included. --- .../app/src/runtime/replica-cache/index.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/app/src/runtime/replica-cache/index.test.ts b/packages/app/src/runtime/replica-cache/index.test.ts index 15adc841fb..47cfd81527 100644 --- a/packages/app/src/runtime/replica-cache/index.test.ts +++ b/packages/app/src/runtime/replica-cache/index.test.ts @@ -301,6 +301,19 @@ describe("ReplicaCache", () => { expect(storage.rows.size).toBe(0); }); + it("preserves background visibility when restoring a cached workspace", async () => { + const storage = new MemoryStorage(); + const writer = createCache(storage); + const original = directory(); + original.workspaces.get("workspace-1")!.background = true; + commitDirectory(writer, SERVER_ID, original); + await writer.flush(); + + const reader = createCache(storage); + const restored = await reader.readDirectory(SERVER_ID); + expect(restored.workspaces.get("workspace-1")?.background).toBe(true); + }); + it("round-trips explicit directory and timeline commits", async () => { const storage = new MemoryStorage(); const writer = createCache(storage);