Previously, `probePeers` would mark a stream as unhealthy if no P2P peers were found, even if a valid webseed was present. This caused the UI to disable playback for webseed-only content.
This fix:
1. Updates `js/webtorrent.js` to return `healthy: true` (reason: "webseed") if `peers === 0` but `hasWebSeed` is true.
2. Adds `tests/webtorrent-regression.test.mjs` to verify this behavior.
3. Fixes `package-lock.json` to resolve inconsistencies with `esbuild` versions that were causing CI build failures.
Co-authored-by: PR0M3TH3AN <[email protected]>
Previously, `probePeers` would mark a stream as unhealthy (healthy: false) if no P2P peers were found, even if a valid webseed was present. This caused the UI to potentially disable playback or show error states for webseed-only content.
This fix ensures that if `peers === 0` but `hasWebSeed` is true, the probe result returns `healthy: true` with reason `"webseed"`.
Added `tests/webtorrent-regression.test.mjs` to verify this behavior and prevent future regressions.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Create `.nvmrc` with `22` to ensure consistent Node version on Netlify/CI.
- Move `cross-env`, `esbuild`, `nostr-tools` to `dependencies` to prevent pruning issues.
- (Previous) Added fuzz harnesses and harmonized iterations.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Create `.nvmrc` with `22` to ensure consistent Node version on Netlify/CI.
- Move `cross-env`, `esbuild`, `nostr-tools` to `dependencies` to prevent pruning issues.
- (Previous) Added fuzz harnesses and harmonized iterations.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Move `nostr-tools`, `esbuild`, `cross-env` to `dependencies` to ensure availability in production builds.
- Remove duplicate dependencies (`autoprefixer`, `@noble/hashes`, `@tailwindcss/typography`) to fix potential version conflicts.
- Fix timeout leak in `hashtagPreferencesService.js`.
- Fix test mock in `hashtag-preferences.test.mjs` to prevent timeouts.
- Update `nostrClient` permission request to use correct constant.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Fix flaky mock in `tests/hashtag-preferences.test.mjs` (limit mock responses to avoid timeouts)
- Fix timeout leak in `js/services/hashtagPreferencesService.js` (clear timeout on success)
- Update `nostrClient.loginWithExtension` to request full permissions (fixing `nostr-login-permissions.test.mjs`)
- Ensure `jsdom` is available for `channel-profile-moderation.test.mjs`
Co-authored-by: PR0M3TH3AN <[email protected]>
* Updated `loginWithExtension` in `js/nostr/client.js` to request `DEFAULT_NIP07_PERMISSION_METHODS` (which includes encryption permissions) instead of `DEFAULT_NIP07_CORE_METHODS`. This fixes `tests/nostr-login-permissions.test.mjs` by ensuring the permission cache is correctly populated during login.
* Updated the `fetchListIncrementally` mock in `tests/hashtag-preferences.test.mjs` to consistently return the event array on subsequent calls. This fixes the "load defers permission-required decrypts" test case by ensuring the second `load()` attempt actually receives data to process, triggering the decryption retry logic.
* Retained artifacts from the TODO triage task (`artifacts/todos.txt` and `artifacts/issue_moderation_tests.md`) as part of the overall work unit.
Co-authored-by: PR0M3TH3AN <[email protected]>
* Updated `loginWithExtension` in `js/nostr/client.js` to request `DEFAULT_NIP07_PERMISSION_METHODS` (which includes encryption permissions) instead of `DEFAULT_NIP07_CORE_METHODS`. This fixes `tests/nostr-login-permissions.test.mjs` by ensuring the permission cache is correctly populated during login.
* Updated the `fetchListIncrementally` mock in `tests/hashtag-preferences.test.mjs` to consistently return the event array on subsequent calls. This fixes the "load defers permission-required decrypts" test case by ensuring the second `load()` attempt actually receives data to process, triggering the decryption retry logic.
* Retained artifacts from the TODO triage task (`artifacts/todos.txt` and `artifacts/issue_moderation_tests.md`) as part of the overall work unit.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Fix flaky mock in `tests/hashtag-preferences.test.mjs`
- Update `nostrClient.loginWithExtension` to request full permissions (fixing `nostr-login-permissions.test.mjs`)
- Ensure `jsdom` is available for `channel-profile-moderation.test.mjs`
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `js/nostr/client.js` to request all default permissions (including encryption) during login, fixing `tests/nostr-login-permissions.test.mjs`.
- Update `tests/hashtag-preferences.test.mjs` to properly mock `window.nostr` with `signEvent` and `getPublicKey`, and fix `fetchListIncrementally` mock.
- Fix broken test assertions in `hashtag-preferences.test.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `js/nostr/client.js` to request all default permissions (including encryption) during login, fixing `tests/nostr-login-permissions.test.mjs`.
- Update `tests/hashtag-preferences.test.mjs` to properly mock `window.nostr` with `signEvent` and `getPublicKey`, and fix `fetchListIncrementally` mock.
- Fix broken test assertions in `hashtag-preferences.test.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `js/nostr/client.js` to request all default permissions (including encryption) during login, fixing `tests/nostr-login-permissions.test.mjs`.
- Update `tests/hashtag-preferences.test.mjs` to properly mock `window.nostr` with `signEvent` and `getPublicKey`, and fix `fetchListIncrementally` mock to ensure reliable test execution.
- Fix broken test assertions in `hashtag-preferences.test.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `README.md` example to clarify 's' tag auto-generation.
- Update `CONTRIBUTING.md` with explicit `npm run lint` details and new "Event Schema Validation" section.
- Verified all documentation against codebase.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Removes `@noble/hashes`, `@tailwindcss/typography`, and `autoprefixer` from `devDependencies` as they are already in `dependencies`.
- This resolves build instability on Netlify caused by duplicate dependency declarations.
- Updates `package-lock.json`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Removes `@noble/hashes`, `@tailwindcss/typography`, and `autoprefixer` from `devDependencies`.
- These packages are already listed in `dependencies` (sometimes with mismatched versions), which violates the project's dependency guidelines and can cause build instability on CI platforms like Netlify.
- Updates `package-lock.json` via `npm install`.
Co-authored-by: PR0M3TH3AN <[email protected]>