From 65c26b8c1e20ec5a59ad8c5f0dd0c2a791b99466 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 03:30:56 +0000 Subject: [PATCH 1/2] test: fix LinkPreviewService test isolation Restores globalThis.fetch after each test in LinkPreviewService test suite to prevent pollution of other tests with mocked implementations. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- tests/services/link-preview-service.test.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/services/link-preview-service.test.mjs b/tests/services/link-preview-service.test.mjs index bcd9c7a6..4783d20e 100644 --- a/tests/services/link-preview-service.test.mjs +++ b/tests/services/link-preview-service.test.mjs @@ -14,6 +14,12 @@ globalThis.DOMParser = dom.window.DOMParser; globalThis.URL = URL; test("LinkPreviewService", async (t) => { + const originalFetch = globalThis.fetch; + + t.afterEach(() => { + globalThis.fetch = originalFetch; + }); + const service = new LinkPreviewService({ ttlMs: 1000 }); await t.test("initializes IndexedDB", async () => { From 8a156c6956cc4554ef64155feea446b47e4f2f4b Mon Sep 17 00:00:00 2001 From: bitvid-agent Date: Tue, 27 Jan 2026 03:31:55 +0000 Subject: [PATCH 2/2] fix(ai): formatting (agent) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index de73e680..a05d0496 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,10 @@ Every video note ships with a stable series identifier so edits and deletes can Storage tags hang off that identifier to make asset discovery deterministic: -* **Storage pointer (`s` tag)**: The note includes `['s', ':']`. If you don’t supply a pointer, bitvid derives one from the hosted URL (preferred), the torrent info hash (as `btih:`), or finally the `videoRootId` fallback (`nostr:`).【F:js/nostr/client.js†L823-L862】 -* **Prefix derivation**: For URL-based assets, the prefix is the public base URL plus the object key **without** its file extension. For example, `/uploads/demo/video.mp4` becomes `/uploads/demo/video`.【F:js/utils/storagePointer.js†L56-L88】 -* **`info.json` location**: The companion metadata file lives at `.info.json`. If the storage prefix is not an absolute URL, the UI uses the hosted URL’s origin to build the prefix before appending `.info.json` (and falls back to the raw prefix when no URL is available).【F:js/utils/storagePointer.js†L90-L129】 -* **`info.json` contents**: The file is expected to describe the stored assets that back the note—typically the hosted URLs and optional WebTorrent metadata (info hash, web seeds, torrent URL) along with the derived prefix—so the UI can hydrate asset metadata even when the note only carries minimal fields. +- **Storage pointer (`s` tag)**: The note includes `['s', ':']`. If you don’t supply a pointer, bitvid derives one from the hosted URL (preferred), the torrent info hash (as `btih:`), or finally the `videoRootId` fallback (`nostr:`).【F:js/nostr/client.js†L823-L862】 +- **Prefix derivation**: For URL-based assets, the prefix is the public base URL plus the object key **without** its file extension. For example, `/uploads/demo/video.mp4` becomes `/uploads/demo/video`.【F:js/utils/storagePointer.js†L56-L88】 +- **`info.json` location**: The companion metadata file lives at `.info.json`. If the storage prefix is not an absolute URL, the UI uses the hosted URL’s origin to build the prefix before appending `.info.json` (and falls back to the raw prefix when no URL is available).【F:js/utils/storagePointer.js†L90-L129】 +- **`info.json` contents**: The file is expected to describe the stored assets that back the note—typically the hosted URLs and optional WebTorrent metadata (info hash, web seeds, torrent URL) along with the derived prefix—so the UI can hydrate asset metadata even when the note only carries minimal fields. **How the UI resolves assets**