Skip to content

Commit d1fc571

Browse files
Umais-Adeedclaude
andcommitted
fix(client): the folder browser shows folders added or removed while T3 runs
A folder listing stayed cached for five minutes after the browser closed, and a listing kept alive that way is never revalidated, so reopening the browser showed folders as they were. Drop unread listings after five seconds, which still covers a prefetch landing before navigation commits. Fixes #27916 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 85bd3f2 commit d1fc571

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎packages/client-runtime/src/state/filesystem.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import {
2222
} from "./projects.ts";
2323
import { createEnvironmentRpcQueryAtomFamily } from "./runtime.ts";
2424

25+
const BROWSE_IDLE_TTL_MS = 5_000;
26+
2527
export function resolveFilesystemReadAccess(input: {
2628
readonly isCatalogReady: boolean;
2729
readonly connection: Pick<EnvironmentConnectionPresentation, "phase" | "error"> | null;
@@ -121,6 +123,9 @@ export function createFilesystemEnvironmentAtoms<R, E>(
121123
browse: createEnvironmentRpcQueryAtomFamily(runtime, {
122124
label: "environment-data:filesystem:browse",
123125
tag: WS_METHODS.filesystemBrowse,
126+
// A listing kept alive while unread is never revalidated, so reopening the browser
127+
// would show folders as they were. Keep it only long enough for a prefetch to land.
128+
idleTtlMs: BROWSE_IDLE_TTL_MS,
124129
}),
125130
};
126131
}

0 commit comments

Comments
 (0)