Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): paused sidebar videos stop reloading after every command #23106

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/23106/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 8 changed files with 68 additions and 2 deletions (loading 5).

x
0 of 8 viewed, 8 left
38 additions and 0 deletionsapps/server/src/assets/AssetAccess.test.tsModified
View file
@@ -19,6 +19,7 @@
import * as Path from "effect/Path";
import * as PlatformError from "effect/PlatformError";
import * as Schema from "effect/Schema";
+import * as TestClock from "effect/testing/TestClock";
import { HttpClient, HttpClientResponse, HttpServerResponse } from "effect/http";
import { vi } from "vite-plus/test";
​
@@ -602,6 +603,43 @@
}).pipe(Effect.provide(layerTest)),
​
+ it.effect("versions media by file changes rather than by re-signing", () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-media-revision-" });
+ const filePath = path.join(root, "recording.mp4");
+ yield* fs.writeFileString(filePath, "original");
+ yield* Effect.promise(() => NodeFSP.utimes(filePath, 1_000, 1_000));
+ const input = {
+ resource: {
+ _tag: "media-file" as const,
+ threadId: ThreadId.make("thread-1"),
+ path: filePath,
+ },
+ };
+ const original = yield* issueAssetUrl(input);
+ expect(original.fileRevision).toEqual(expect.any(String));