From 1e0a94509e595be2f8891e01f12549841418a4ee Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 13:28:56 +0000 Subject: [PATCH 1/4] chore(ai): apply formatting/lint autofixes Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> From 79ad3c4709934e2bbd053bf6fe59dac4a93f98dc Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 13:46:17 +0000 Subject: [PATCH 2/4] fix(test): resolve unit test failures in batch fetch and profile modal - Mock `readRelays` in `tests/app-batch-fetch-profiles.test.mjs` to correctly reflect `profileMetadataService` prioritization logic, ensuring relay query count assertions match actual execution (2 queries instead of 4). - Add missing `load` mock to `hashtagPreferences` in `tests/profile-modal-controller.test.mjs` to prevent `TypeError` during `handleAddHashtagPreference` test. - Verified all unit tests pass with `npm run test:unit`. - Verified `npm run build` succeeds locally. - Verified `_headers` and `_redirects` are present and valid in `dist/`. This commit addresses the CI failures reported by the user, including the `agent-review` failure and likely resolving the associated 'Deploy failed' checks. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- tests/app-batch-fetch-profiles.test.mjs | 5 +++++ tests/profile-modal-controller.test.mjs | 1 + 2 files changed, 6 insertions(+) diff --git a/tests/app-batch-fetch-profiles.test.mjs b/tests/app-batch-fetch-profiles.test.mjs index df90a4bc..45148645 100644 --- a/tests/app-batch-fetch-profiles.test.mjs +++ b/tests/app-batch-fetch-profiles.test.mjs @@ -49,6 +49,9 @@ test("batchFetchProfiles handles fast and failing relays", async () => { const originalRelays = Array.isArray(nostrClient.relays) ? [...nostrClient.relays] : []; + const originalReadRelays = Array.isArray(nostrClient.readRelays) + ? [...nostrClient.readRelays] + : nostrClient.readRelays; const originalWriteRelays = Array.isArray(nostrClient.writeRelays) ? [...nostrClient.writeRelays] : nostrClient.writeRelays; @@ -57,6 +60,7 @@ test("batchFetchProfiles handles fast and failing relays", async () => { const poolListCalls = []; nostrClient.relays = [FAST_RELAY, FAIL_RELAY]; + nostrClient.readRelays = [FAST_RELAY, FAIL_RELAY]; nostrClient.writeRelays = [FAST_RELAY, FAIL_RELAY]; nostrClient.pool = { list: (relays, filters) => { @@ -92,6 +96,7 @@ test("batchFetchProfiles handles fast and failing relays", async () => { }); } finally { nostrClient.relays = originalRelays; + nostrClient.readRelays = originalReadRelays; nostrClient.writeRelays = originalWriteRelays; nostrClient.pool = originalPool; } diff --git a/tests/profile-modal-controller.test.mjs b/tests/profile-modal-controller.test.mjs index f14c3730..9d746088 100644 --- a/tests/profile-modal-controller.test.mjs +++ b/tests/profile-modal-controller.test.mjs @@ -275,6 +275,7 @@ function createController(options = {}) { }, publish: async () => ({ ok: true }), on: () => () => {}, + load: async () => {}, }; const hashtagPreferences = { From d48cca1a666ce441d60c128bcef74f2e831c4cc5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 14:09:20 +0000 Subject: [PATCH 3/4] fix(ci): resolve unit test failures in batch fetch and profile modal - Mock `readRelays` in `tests/app-batch-fetch-profiles.test.mjs` to correctly reflect `profileMetadataService` prioritization logic, ensuring relay query count assertions match actual execution (2 queries instead of 4). - Add missing `load` mock to `hashtagPreferences` in `tests/profile-modal-controller.test.mjs` to prevent `TypeError` during `handleAddHashtagPreference` test. - Verified all unit tests pass with `npm run test:unit`. - Reverted risky dependency moves in `package.json` to maintain project structure. - Build process verified locally; addressing test failures is the primary fix for the reported CI errors. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> From d68003cc9693613be963abb25bcdfdd218a32416 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 14:14:14 +0000 Subject: [PATCH 4/4] fix(ci): resolve unit test failures and ensure build dependencies - Mock `readRelays` in `tests/app-batch-fetch-profiles.test.mjs` to correctly reflect `profileMetadataService` prioritization logic, ensuring relay query count assertions match actual execution. - Add missing `load` mock to `hashtagPreferences` in `tests/profile-modal-controller.test.mjs` to prevent `TypeError` during `handleAddHashtagPreference` test. - Update `netlify.toml` to set `NODE_ENV = "development"` during build, ensuring `devDependencies` (required for `npm run build:css`) are installed. - Verified all unit tests pass locally. - Verified build configuration syntax. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- netlify.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netlify.toml b/netlify.toml index a1680b2f..eca58593 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,6 @@ [build] command = "npm run build" publish = "dist" + +[build.environment] + NODE_ENV = "development"