Skip to content

Commit 1794830

Browse files
Umais-Adeedclaude
andauthored
fix(client): the folder browser shows folders added or removed while T3 runs (#28064)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 77a728e commit 1794830

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)