diff --git a/docs/agents/task-logs/daily/2026-02-16_18-47-18_innerhtml-migration-agent_completed.md b/docs/agents/task-logs/daily/2026-02-16_18-47-18_innerhtml-migration-agent_completed.md new file mode 100644 index 00000000..14a04f61 --- /dev/null +++ b/docs/agents/task-logs/daily/2026-02-16_18-47-18_innerhtml-migration-agent_completed.md @@ -0,0 +1,17 @@ +# innerhtml-migration-agent Completion Log + +**Date:** 2026-02-16_18-47-18 +**Agent:** innerhtml-migration-agent +**Status:** Completed + +## Summary +Migrated `js/ui/subscriptionHistoryController.js` from 7 `innerHTML` usages to 1 (static template load). +Updated baseline in `scripts/check-innerhtml.mjs`. + +## Artifacts +Artifacts moved to `docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/`. + +## Verification +- Lint: Passed +- Unit Tests: Passed +- Frontend Verification: Passed (Modal opens, list renders via DOM APIs) diff --git a/context/CONTEXT_2026-02-16.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16.md similarity index 100% rename from context/CONTEXT_2026-02-16.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16.md diff --git a/context/CONTEXT_2026-02-16_06-40-11.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_06-40-11.md similarity index 100% rename from context/CONTEXT_2026-02-16_06-40-11.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_06-40-11.md diff --git a/context/CONTEXT_2026-02-16_07-03-19.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_07-03-19.md similarity index 100% rename from context/CONTEXT_2026-02-16_07-03-19.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_07-03-19.md diff --git a/context/CONTEXT_2026-02-16_docs-code-investigator.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_docs-code-investigator.md similarity index 100% rename from context/CONTEXT_2026-02-16_docs-code-investigator.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_docs-code-investigator.md diff --git a/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_innerhtml.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_innerhtml.md new file mode 100644 index 00000000..3768b6d0 --- /dev/null +++ b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/CONTEXT_2026-02-16_innerhtml.md @@ -0,0 +1,2 @@ +Target File: js/ui/subscriptionHistoryController.js +Reason: High innerHTML count (7). Most usages are clear/reset or simple template literals that can be converted to DOM APIs. One usage is template loading which might remain. diff --git a/decisions/DECISIONS_1771241005.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_1771241005.md similarity index 100% rename from decisions/DECISIONS_1771241005.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_1771241005.md diff --git a/decisions/DECISIONS_2026-02-16.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16.md similarity index 100% rename from decisions/DECISIONS_2026-02-16.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16.md diff --git a/decisions/DECISIONS_2026-02-16_06-40-11.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16_06-40-11.md similarity index 100% rename from decisions/DECISIONS_2026-02-16_06-40-11.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16_06-40-11.md diff --git a/decisions/DECISIONS_2026-02-16_07-03-19.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16_07-03-19.md similarity index 100% rename from decisions/DECISIONS_2026-02-16_07-03-19.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16_07-03-19.md diff --git a/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16_innerhtml.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16_innerhtml.md new file mode 100644 index 00000000..d3098ddc --- /dev/null +++ b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/DECISIONS_2026-02-16_innerhtml.md @@ -0,0 +1,7 @@ +- fetchHistory(): Replaced listContainer.innerHTML = "" with replaceChildren(). +- renderList(): Replaced listContainer.innerHTML = "" with replaceChildren(). +- renderList(): Replaced item.innerHTML template literal with createElement/appendChild construction. All variables (isBackup, dateStr, timeAgo) are trusted or boolean, but textContent is safer anyway. +- selectEvent(): Replaced selectedChannelsList.innerHTML = "" with replaceChildren(). +- selectEvent(): Replaced error message innerHTML with createElement('p') and textContent. +- renderChannels(): Replaced selectedChannelsList.innerHTML = "" with replaceChildren(). +- load(): template.innerHTML = html left as-is (static template loading from file). diff --git a/test_logs/TEST_LOG_1771241005.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_1771241005.md similarity index 100% rename from test_logs/TEST_LOG_1771241005.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_1771241005.md diff --git a/test_logs/TEST_LOG_2026-02-16.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16.md similarity index 100% rename from test_logs/TEST_LOG_2026-02-16.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16.md diff --git a/test_logs/TEST_LOG_2026-02-16_06-40-11.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16_06-40-11.md similarity index 100% rename from test_logs/TEST_LOG_2026-02-16_06-40-11.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16_06-40-11.md diff --git a/test_logs/TEST_LOG_2026-02-16_07-03-19.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16_07-03-19.md similarity index 100% rename from test_logs/TEST_LOG_2026-02-16_07-03-19.md rename to docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16_07-03-19.md diff --git a/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16_innerhtml.md b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16_innerhtml.md new file mode 100644 index 00000000..8d79fe1a --- /dev/null +++ b/docs/agents/task-logs/daily/artifacts/2026-02-16_innerhtml/TEST_LOG_2026-02-16_innerhtml.md @@ -0,0 +1,10943 @@ + +> bitvid@1.0.0 lint +> npm run lint:css && npm run lint:hex && npm run lint:inline-styles && npm run lint:tokens && npm run lint:tailwind-brackets && npm run lint:tailwind-colors && npm run lint:file-size && npm run lint:innerhtml && npm run lint:assets && npm run lint:sw-compat + + +> bitvid@1.0.0 lint:css +> stylelint css/tailwind.source.css css/tokens.css css/docs.css + + +> bitvid@1.0.0 lint:hex +> node scripts/check-hex.js + + +> bitvid@1.0.0 lint:inline-styles +> node scripts/check-inline-styles.mjs + +No inline style usage found. + +> bitvid@1.0.0 lint:tokens +> node scripts/check-design-tokens.mjs --check=tokens + + +> bitvid@1.0.0 lint:tailwind-brackets +> node scripts/check-design-tokens.mjs --check=brackets + + +> bitvid@1.0.0 lint:tailwind-colors +> node scripts/check-tailwind-colors.mjs + + +> bitvid@1.0.0 lint:file-size +> node scripts/check-file-size.mjs + + +> bitvid@1.0.0 lint:innerhtml +> node scripts/check-innerhtml.mjs + + +> bitvid@1.0.0 lint:assets +> node scripts/check-asset-references.mjs + +[lint:assets] Missing dist/asset-manifest.json. Skipping asset reference check (build required). + +> bitvid@1.0.0 lint:sw-compat +> node scripts/check-sw-compat.mjs + +[sw-compat] Skipping check: unable to determine HEAD^ or git history unavailable. +[sw-compat] No commit delta found; skipping compatibility check. + +> bitvid@1.0.0 test:unit +> node scripts/run-unit-tests.mjs + + +→ Running tests/app-batch-fetch-profiles.test.mjs +TAP version 13 +# Subtest: batchFetchProfiles handles fast and failing relays +ok 1 - batchFetchProfiles handles fast and failing relays + --- + duration_ms: 5.599762 + type: 'test' + ... +# Subtest: batchFetchProfiles respects forceRefresh +ok 2 - batchFetchProfiles respects forceRefresh + --- + duration_ms: 1.709709 + type: 'test' + ... +1..2 +# tests 2 +# suites 0 +# pass 2 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 25.107703 + +→ Running tests/app-state.test.mjs +TAP version 13 +# Subtest: AppState + # Subtest: Initial state is clean + ok 1 - Initial state is clean + --- + duration_ms: 2.542587 + type: 'test' + ... + # Subtest: setPubkey() updates state and notifies subscribers + ok 2 - setPubkey() updates state and notifies subscribers + --- + duration_ms: 1.005319 + type: 'test' + ... + # Subtest: setCurrentUserNpub() updates state + ok 3 - setCurrentUserNpub() updates state + --- + duration_ms: 0.473161 + type: 'test' + ... + # Subtest: setCurrentVideo() updates state + ok 4 - setCurrentVideo() updates state + --- + duration_ms: 0.567929 + type: 'test' + ... + # Subtest: setVideosMap() updates state + ok 5 - setVideosMap() updates state + --- + duration_ms: 0.58441 + type: 'test' + ... + # Subtest: setVideoSubscription() updates state + ok 6 - setVideoSubscription() updates state + --- + duration_ms: 0.406273 + type: 'test' + ... + # Subtest: setModalState() updates state and notifies modal subscribers + ok 7 - setModalState() updates state and notifies modal subscribers + --- + duration_ms: 0.871853 + type: 'test' + ... + # Subtest: Global subscriber receives updates + ok 8 - Global subscriber receives updates + --- + duration_ms: 0.613104 + type: 'test' + ... + # Subtest: resetAppState() clears all state and notifies + ok 9 - resetAppState() clears all state and notifies + --- + duration_ms: 0.653591 + type: 'test' + ... + 1..9 +ok 1 - AppState + --- + duration_ms: 9.957826 + type: 'suite' + ... +1..1 +# tests 9 +# suites 1 +# pass 9 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 29.918032 + +→ Running tests/app/channel-profile-moderation.test.mjs +TAP version 13 +# Subtest: renderChannelVideosFromList decorates videos before storing +ok 1 - renderChannelVideosFromList decorates videos before storing + --- + duration_ms: 175.953465 + type: 'test' + ... +# Subtest: renderChannelVideosFromList applies moderation blur without existing metadata +ok 2 - renderChannelVideosFromList applies moderation blur without existing metadata + --- + duration_ms: 45.259718 + type: 'test' + ... +# Subtest: applyChannelVisualBlur blurs banner and avatar when viewer mutes author +ok 3 - applyChannelVisualBlur blurs banner and avatar when viewer mutes author + --- + duration_ms: 15.122562 + type: 'test' + ... +# Subtest: moderation override clears channel blur via event wiring +ok 4 - moderation override clears channel blur via event wiring + --- + duration_ms: 36.552364 + type: 'test' + ... +# Subtest: channel header moderation badge reflects blur state and override actions +ok 5 - channel header moderation badge reflects blur state and override actions + --- + duration_ms: 34.582574 + type: 'test' + ... +# Subtest: channel video cards update moderation state in place when summary changes +ok 6 - channel video cards update moderation state in place when summary changes + --- + duration_ms: 38.166172 + type: 'test' + ... +1..6 +# tests 6 +# suites 0 +# pass 6 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 364.888742 + +→ Running tests/app/feedCoordinator.test.mjs +TAP version 13 +# Subtest: createFeedCoordinator - loadForYouVideos + # Subtest: loadForYouVideos executes successfully + ok 1 - loadForYouVideos executes successfully + --- + duration_ms: 2.573244 + type: 'test' + ... + 1..1 +ok 1 - createFeedCoordinator - loadForYouVideos + --- + duration_ms: 4.801423 + type: 'test' + ... +1..1 +# tests 2 +# suites 0 +# pass 2 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 18.066297 + +→ Running tests/app/hash-change-handler.test.mjs +TAP version 13 +# Subtest: handleHashChange defaults to for-you when logged in +ok 1 - handleHashChange defaults to for-you when logged in + --- + duration_ms: 114.213706 + type: 'test' + ... +# Subtest: handleHashChange defaults to most-recent-videos when logged out +ok 2 - handleHashChange defaults to most-recent-videos when logged out + --- + duration_ms: 20.261281 + type: 'test' + ... +# Subtest: handleHashChange respects explicit view regardless of login state +ok 3 - handleHashChange respects explicit view regardless of login state + --- + duration_ms: 22.756792 + type: 'test' + ... +1..3 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 177.765195 + +→ Running tests/app/hydrate-sidebar-navigation.test.mjs +TAP version 13 +# Subtest: hydrateSidebarNavigation reveals chrome controls for authenticated viewers +ok 1 - hydrateSidebarNavigation reveals chrome controls for authenticated viewers + --- + duration_ms: 115.904193 + type: 'test' + ... +# Subtest: hydrateSidebarNavigation hides chrome controls for logged-out viewers +ok 2 - hydrateSidebarNavigation hides chrome controls for logged-out viewers + --- + duration_ms: 15.151587 + type: 'test' + ... +1..2 +# tests 2 +# suites 0 +# pass 2 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 155.485183 + +→ Running tests/app/is-user-logged-in.test.mjs +TAP version 13 +# Subtest: isUserLoggedIn returns false when no user pubkey is set +ok 1 - isUserLoggedIn returns false when no user pubkey is set + --- + duration_ms: 1.331739 + type: 'test' + ... +# Subtest: isUserLoggedIn treats extension logins as authenticated +ok 2 - isUserLoggedIn treats extension logins as authenticated + --- + duration_ms: 0.342597 + type: 'test' + ... +# Subtest: isUserLoggedIn guards against mismatched nostrClient state +ok 3 - isUserLoggedIn guards against mismatched nostrClient state + --- + duration_ms: 0.298143 + type: 'test' + ... +# Subtest: isUserLoggedIn ignores anonymous session actor mismatches +ok 4 - isUserLoggedIn ignores anonymous session actor mismatches + --- + duration_ms: 0.257641 + type: 'test' + ... +# Subtest: isUserLoggedIn rejects mismatched managed session actors +ok 5 - isUserLoggedIn rejects mismatched managed session actors + --- + duration_ms: 0.362806 + type: 'test' + ... +1..5 +# tests 5 +# suites 0 +# pass 5 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 36.767785 + +→ Running tests/app/moderation-overrides.test.mjs +TAP version 13 +# Subtest: handleModerationOverride decorates stored and current videos then refreshes UI +ok 1 - handleModerationOverride decorates stored and current videos then refreshes UI + --- + duration_ms: 6.015429 + type: 'test' + ... +# Subtest: handleModerationOverride resumes deferred playback +ok 2 - handleModerationOverride resumes deferred playback + --- + duration_ms: 1.296011 + type: 'test' + ... +# Subtest: handleModerationBlock requests a block, clears overrides, and refreshes hidden state +ok 3 - handleModerationBlock requests a block, clears overrides, and refreshes hidden state + --- + duration_ms: 3.638156 + type: 'test' + ... +# Subtest: handleModerationBlock returns false when viewer is logged out +ok 4 - handleModerationBlock returns false when viewer is logged out + --- + duration_ms: 1.208986 + type: 'test' + ... +1..4 +# tests 4 +# suites 0 +# pass 4 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 27.650975 + +→ Running tests/app/moderation-settings-refresh.test.mjs +TAP version 13 +# Subtest: handleModerationSettingsChange refreshes feeds with updated thresholds +ok 1 - handleModerationSettingsChange refreshes feeds with updated thresholds + --- + duration_ms: 4.809263 + type: 'test' + ... +1..1 +# tests 1 +# suites 0 +# pass 1 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 17.68268 + +→ Running tests/app/similar-content.test.mjs +TAP version 13 +# Subtest: orders similar videos by shared tags then timestamp +ok 1 - orders similar videos by shared tags then timestamp + --- + duration_ms: 3.48486 + type: 'test' + ... +# Subtest: returns no matches when the active video lacks tags +ok 2 - returns no matches when the active video lacks tags + --- + duration_ms: 0.61747 + type: 'test' + ... +# Subtest: skips candidates without tag metadata +ok 3 - skips candidates without tag metadata + --- + duration_ms: 0.348437 + type: 'test' + ... +# Subtest: filters NSFW and private videos when NSFW content is disabled +ok 4 - filters NSFW and private videos when NSFW content is disabled + --- + duration_ms: 0.578823 + type: 'test' + ... +1..4 +# tests 4 +# suites 0 +# pass 4 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 18.885722 + +→ Running tests/auth-service.test.mjs +TAP version 13 +# Subtest: AuthService + # Subtest: applyPostLoginState success flow + ok 1 - applyPostLoginState success flow + --- + duration_ms: 14.514342 + type: 'test' + ... + # Subtest: applyPostLoginState with deferBlocks: true + ok 2 - applyPostLoginState with deferBlocks: true + --- + duration_ms: 12.070445 + type: 'test' + ... + # Subtest: applyPostLoginState partial failure + ok 3 - applyPostLoginState partial failure + --- + duration_ms: 1.686286 + type: 'test' + ... + # Subtest: applyPostLoginState without pubkey + ok 4 - applyPostLoginState without pubkey + --- + duration_ms: 0.602141 + type: 'test' + ... + # Subtest: login mocks postLogin flow + ok 5 - login mocks postLogin flow + --- + duration_ms: 3.449489 + type: 'test' + ... + # Subtest: login fails on lockdown + ok 6 - login fails on lockdown + --- + duration_ms: 1.092605 + type: 'test' + ... + # Subtest: login succeeds for admin on lockdown + ok 7 - login succeeds for admin on lockdown + --- + duration_ms: 1.637314 + type: 'test' + ... + # Subtest: loadOwnProfile + # Subtest: Fast Relay Success + ok 1 - Fast Relay Success + --- + duration_ms: 1.328019 + type: 'test' + ... + # Subtest: All Relays Fail + ok 2 - All Relays Fail + --- + duration_ms: 1.349507 + type: 'test' + ... + # Subtest: Timeout Fallback + ok 3 - Timeout Fallback + --- + duration_ms: 2502.116278 + type: 'test' + ... + 1..3 + ok 8 - loadOwnProfile + --- + duration_ms: 2505.612018 + type: 'suite' + ... + 1..8 +ok 1 - AuthService + --- + duration_ms: 2542.808758 + type: 'suite' + ... +1..1 +# tests 10 +# suites 2 +# pass 10 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 2552.328847 + +→ Running tests/auth/signingAdapter.test.mjs +TAP version 13 +# Subtest: createNip07SigningAdapter + # Subtest: uses explicit extension if provided + ok 1 - uses explicit extension if provided + --- + duration_ms: 2.632348 + type: 'test' + ... + # Subtest: falls back to window.nostr if no extension provided + ok 2 - falls back to window.nostr if no extension provided + --- + duration_ms: 0.623353 + type: 'test' + ... + # Subtest: throws error if no extension available + ok 3 - throws error if no extension available + --- + duration_ms: 1.542387 + type: 'test' + ... + # Subtest: prioritizes explicit extension over window.nostr + ok 4 - prioritizes explicit extension over window.nostr + --- + duration_ms: 0.882692 + type: 'test' + ... + 1..4 +ok 1 - createNip07SigningAdapter + --- + duration_ms: 7.388991 + type: 'suite' + ... +1..1 +# tests 4 +# suites 1 +# pass 4 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 25.220344 + +→ Running tests/authService.test.mjs +TAP version 13 +# Subtest: AuthService Coverage + # Subtest: login + # Subtest: successfully logs in with valid pubkey + ok 1 - successfully logs in with valid pubkey + --- + duration_ms: 8.020255 + type: 'test' + ... + # Subtest: updates global state and calls post-login hooks + ok 2 - updates global state and calls post-login hooks + --- + duration_ms: 2.108253 + type: 'test' + ... + # Subtest: throws if lockdown is active and user is not admin + ok 3 - throws if lockdown is active and user is not admin + --- + duration_ms: 1.95587 + type: 'test' + ... + # Subtest: allows login if lockdown is active but user is admin + ok 4 - allows login if lockdown is active but user is admin + --- + duration_ms: 1.503181 + type: 'test' + ... + 1..4 + ok 1 - login + --- + duration_ms: 15.11783 + type: 'suite' + ... + # Subtest: logout + # Subtest: clears state and calls reset on dependencies + ok 1 - clears state and calls reset on dependencies + --- + duration_ms: 3.354272 + type: 'test' + ... + 1..1 + ok 2 - logout + --- + duration_ms: 4.025014 + type: 'suite' + ... + # Subtest: requestLogin + # Subtest: uses provider to login + ok 1 - uses provider to login + --- + duration_ms: 2.165276 + type: 'test' + ... + # Subtest: does not call login if autoApply is false + ok 2 - does not call login if autoApply is false + --- + duration_ms: 1.098755 + type: 'test' + ... + 1..2 + ok 3 - requestLogin + --- + duration_ms: 3.590097 + type: 'suite' + ... + # Subtest: switchProfile + # Subtest: switches to an existing profile + ok 1 - switches to an existing profile + --- + duration_ms: 4.15233 + type: 'test' + ... + # Subtest: reorders saved profiles on switch + ok 2 - reorders saved profiles on switch + --- + duration_ms: 2.591215 + type: 'test' + ... + 1..2 + ok 4 - switchProfile + --- + duration_ms: 7.122621 + type: 'suite' + ... + 1..4 +ok 1 - AuthService Coverage + --- + duration_ms: 31.312149 + type: 'suite' + ... +1..1 +# tests 9 +# suites 5 +# pass 9 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 57.090046 + +→ Running tests/comment-event-builder.test.mjs +TAP version 13 +# Subtest: buildCommentEvent emits NIP-22 root metadata while keeping legacy fallbacks +ok 1 - buildCommentEvent emits NIP-22 root metadata while keeping legacy fallbacks + --- + duration_ms: 4.848172 + type: 'test' + ... +# Subtest: buildCommentEvent includes parent pointers, kinds, and authors for replies +ok 2 - buildCommentEvent includes parent pointers, kinds, and authors for replies + --- + duration_ms: 0.623372 + type: 'test' + ... +# Subtest: buildCommentEvent normalizes relays and preserves explicit overrides +ok 3 - buildCommentEvent normalizes relays and preserves explicit overrides + --- + duration_ms: 0.874901 + type: 'test' + ... +# Subtest: buildCommentEvent falls back to event pointers when no address is supplied +ok 4 - buildCommentEvent falls back to event pointers when no address is supplied + --- + duration_ms: 0.286762 + type: 'test' + ... +# Subtest: buildCommentEvent accepts partial metadata for parent overrides +ok 5 - buildCommentEvent accepts partial metadata for parent overrides + --- + duration_ms: 0.470847 + type: 'test' + ... +# Subtest: buildCommentEvent sanitizes additional tags before signing +ok 6 - buildCommentEvent sanitizes additional tags before signing + --- + duration_ms: 0.890492 + type: 'test' + ... +1..6 +# tests 6 +# suites 0 +# pass 6 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 23.087853 + +→ Running tests/comment-thread-service.test.mjs +TAP version 13 +# Subtest: CommentThreadService caches mixed-case video ids consistently +ok 1 - CommentThreadService caches mixed-case video ids consistently + --- + duration_ms: 3.558545 + type: 'test' + ... +# Subtest: CommentThreadService surfaces cache read failures +ok 2 - CommentThreadService surfaces cache read failures + --- + duration_ms: 0.799739 + type: 'test' + ... +# Subtest: CommentThreadService surfaces cache write failures +ok 3 - CommentThreadService surfaces cache write failures + --- + duration_ms: 0.486774 + type: 'test' + ... +# Subtest: CommentThreadService persists caches safely during teardown failures +ok 4 - CommentThreadService persists caches safely during teardown failures + --- + duration_ms: 2.119812 + type: 'test' + ... +# Subtest: CommentThreadService logs cache usage and fallback decisions +ok 5 - CommentThreadService logs cache usage and fallback decisions + --- + duration_ms: 1.375215 + type: 'test' + ... +# Subtest: CommentThreadService normalizes mixed-case event ids in thread state +ok 6 - CommentThreadService normalizes mixed-case event ids in thread state + --- + duration_ms: 2.30251 + type: 'test' + ... +# Subtest: CommentThreadService normalizes mixed-case pubkeys during hydration +ok 7 - CommentThreadService normalizes mixed-case pubkeys during hydration + --- + duration_ms: 1.034793 + type: 'test' + ... +# Subtest: CommentThreadService deduplicates mixed-case event ids and pubkeys +ok 8 - CommentThreadService deduplicates mixed-case event ids and pubkeys + --- + duration_ms: 0.963562 + type: 'test' + ... +# Subtest: CommentThreadService retries profile hydration before succeeding +ok 9 - CommentThreadService retries profile hydration before succeeding + --- + duration_ms: 77.386464 + type: 'test' + ... +# Subtest: CommentThreadService surfaces profile hydration failures after retries +ok 10 - CommentThreadService surfaces profile hydration failures after retries + --- + duration_ms: 201.372302 + type: 'test' + ... +# Subtest: listVideoComments accepts builder events without parent ids and filters replies +ok 11 - listVideoComments accepts builder events without parent ids and filters replies + --- + duration_ms: 6.38033 + type: 'test' + ... +# Subtest: CommentThreadService hydrates, subscribes, and dedupes incoming comment events +ok 12 - CommentThreadService hydrates, subscribes, and dedupes incoming comment events + --- + duration_ms: 34.130292 + type: 'test' + ... +# Subtest: CommentThreadService loadThread falls back to event id when address is missing +ok 13 - CommentThreadService loadThread falls back to event id when address is missing + --- + duration_ms: 1.124067 + type: 'test' + ... +# Subtest: CommentThreadService requests and snapshots comments by root identifier +ok 14 - CommentThreadService requests and snapshots comments by root identifier + --- + duration_ms: 0.807075 + type: 'test' + ... +# Subtest: CommentThreadService falls back to pointerIdentifiers root id +ok 15 - CommentThreadService falls back to pointerIdentifiers root id + --- + duration_ms: 0.732062 + type: 'test' + ... +# Subtest: CommentThreadService preserves raw video author pubkeys during hydration fetches +ok 16 - CommentThreadService preserves raw video author pubkeys during hydration fetches + --- + duration_ms: 3.726236 + type: 'test' + ... +# Subtest: CommentThreadService teardown cancels hydration timers +ok 17 - CommentThreadService teardown cancels hydration timers + --- + duration_ms: 81.476646 + type: 'test' + ... +1..17 +# tests 17 +# suites 0 +# pass 17 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 430.014779 + +→ Running tests/compliance/nip04_44_compliance.test.mjs +TAP version 13 +# Subtest: NIP-04/44 Compliance: Encryption Preference + # Subtest: createNip46Cipher prefers nip44.v2 when available + ok 1 - createNip46Cipher prefers nip44.v2 when available + --- + duration_ms: 21.985793 + type: 'test' + ... + # Subtest: createNip46Cipher falls back to nip04 if nip44 is missing + ok 2 - createNip46Cipher falls back to nip04 if nip44 is missing + --- + duration_ms: 9.716431 + type: 'test' + ... + 1..2 +ok 1 - NIP-04/44 Compliance: Encryption Preference + --- + duration_ms: 108.760942 + type: 'test' + ... +# Subtest: NIP-04/44 Compliance: Decryption Fallback + # Subtest: decryptNip46PayloadWithKeys handles nip44 (v2) payload + ok 1 - decryptNip46PayloadWithKeys handles nip44 (v2) payload + --- + duration_ms: 25.027841 + type: 'test' + ... + # Subtest: decryptNip46PayloadWithKeys handles nip04 payload + ok 2 - decryptNip46PayloadWithKeys handles nip04 payload + --- + duration_ms: 29.030066 + type: 'test' + ... + 1..2 +ok 2 - NIP-04/44 Compliance: Decryption Fallback + --- + duration_ms: 56.275828 + type: 'test' + ... +1..2 +# tests 6 +# suites 0 +# pass 6 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 178.614375 + +→ Running tests/compliance/nip07_compliance.test.mjs +TAP version 13 +# Subtest: NIP-07 Compliance: Retry Logic + # Subtest: runNip07WithRetry succeeds on first try + ok 1 - runNip07WithRetry succeeds on first try + --- + duration_ms: 2.014889 + type: 'test' + ... + # Subtest: runNip07WithRetry retries on timeout error + ok 2 - runNip07WithRetry retries on timeout error + --- + duration_ms: 21.306378 + type: 'test' + ... + # Subtest: runNip07WithRetry fails after max retries or if error is not timeout + ok 3 - runNip07WithRetry fails after max retries or if error is not timeout + --- + duration_ms: 1.387836 + type: 'test' + ... + 1..3 +ok 1 - NIP-07 Compliance: Retry Logic + --- + duration_ms: 26.494513 + type: 'test' + ... +1..1 +# tests 4 +# suites 0 +# pass 4 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 59.210423 + +→ Running tests/compliance/nip65_compliance.test.mjs +TAP version 13 +# Subtest: NIP-65 Compliance: Relay List Loading + # Subtest: loadRelayList requests Kind 10002 + ok 1 - loadRelayList requests Kind 10002 + --- + duration_ms: 6.363397 + type: 'test' + ... + # Subtest: loadRelayList parses r tags correctly + ok 2 - loadRelayList parses r tags correctly + --- + duration_ms: 0.614151 + type: 'test' + ... + 1..2 +ok 1 - NIP-65 Compliance: Relay List Loading + --- + duration_ms: 145.044266 + type: 'test' + ... +1..1 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 158.728634 + +→ Running tests/compliance/video_note_compliance.test.mjs +TAP version 13 +# Subtest: Video Note Compliance (Kind 30078 & NIP-71) + # Subtest: prepareVideoPublishPayload creates Kind 30078 event + ok 1 - prepareVideoPublishPayload creates Kind 30078 event + --- + duration_ms: 2.88566 + type: 'test' + ... + # Subtest: prepareVideoPublishPayload includes NIP-71 tags when provided + ok 2 - prepareVideoPublishPayload includes NIP-71 tags when provided + --- + duration_ms: 0.997305 + type: 'test' + ... + 1..2 +ok 1 - Video Note Compliance (Kind 30078 & NIP-71) + --- + duration_ms: 38.092292 + type: 'test' + ... +1..1 +# tests 3 +# suites 0 +# pass 3 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 50.315729 + +→ Running tests/design-system-metrics.test.mjs +TAP version 13 +# Subtest: metric probe falls back to numeric parsing when measurement fails +ok 1 - metric probe falls back to numeric parsing when measurement fails + --- + duration_ms: 294.449179 + type: 'test' + ... +1..1 +# tests 1 +# suites 0 +# pass 1 +# fail 0 +# cancelled 0 +# skipped 0 +# todo 0 +# duration_ms 306.255919 + +→ Running tests/designSystem/dynamicStyles.test.mjs +TAP version 13 +# Subtest: js/designSystem/dynamicStyles.js + # Subtest: registerScope + # Subtest: should register a scope and return a string ID + ok 1 - should register a scope and return a string ID + --- + duration_ms: 104.488793 + type: 'test' + ... + # Subtest: should create a style element or use adoptedStyleSheets + ok 2 - should create a style element or use adoptedStyleSheets + --- + duration_ms: 17.804438 + type: 'test' + ... + # Subtest: should insert rules with the correct selector + ok 3 - should insert rules with the correct selector + --- + duration_ms: 14.432385 + type: 'test' + ... + # Subtest: should handle "&" in selectors + ok 4 - should handle "&" in selectors + --- + duration_ms: 11.724795 + type: 'test' + ... + 1..4 + ok 1 - registerScope + --- + duration_ms: 149.827053 + type: 'suite' + ... + # Subtest: setVariables + # Subtest: should update CSS variables on the scope + ok 1 - should update CSS variables on the scope + --- + duration_ms: 12.924573 + type: 'test' + ... + # Subtest: should handle removing variables + ok 2 - should handle removing variables + --- + duration_ms: 19.482751 + type: 'test' + ... + 1..2 + ok 2 - setVariables + --- + duration_ms: 32.854182 + type: 'suite' + ... + # Subtest: releaseScope + # Subtest: should remove rules and clean up + ok 1 - should remove rules and clean up + --- + duration_ms: 13.296582 + type: 'test' + ... + # Subtest: should return false for non-existent scope + ok 2 - should return false for non-existent scope + --- + duration_ms: 9.431358 + type: 'test' + ... + 1..2 + ok 3 - releaseScope + --- + duration_ms: 23.379884 + type: 'suite' + ... + # Subtest: Isolation + # Subtest: should manage scopes independently for different documents + ok 1 - should manage scopes independently for different documents + --- + duration_ms: 34.85588 + type: 'test' + ... + 1..1 + ok 4 - Isolation + --- + duration_ms: 35.043857 + type: 'suite' + ... + # Subtest: Edge cases + # Subtest: should handle invalid selectors gracefully + ok 1 - should handle invalid selectors gracefully + --- + duration_ms: 11.928165 + type: 'test' + ... + # Subtest: should handle missing document gracefully + ok 2 - should handle missing document gracefully + --- + duration_ms: 9.633989 + type: 'test' + ... + # Subtest: should fallback to