Commit Graph
4488 Commits
Author SHA1 Message Date
thePR0M3TH3AN beceec7e8d Merge pull request #1964 from PR0M3TH3AN/ai/interop-tests-20250228-12917398042927663384
Add Nostr Protocol Interop Test Script
2026-01-30 09:20:00 -05:00
thePR0M3TH3AN b71346c06a Merge branch 'unstable' into ai/interop-tests-20250228-12917398042927663384 2026-01-30 09:19:49 -05:00
thePR0M3TH3AN 7fd203f1cb Merge pull request #1963 from PR0M3TH3AN/telemetry-aggregation-fix-6349074633801704985
Refactor telemetry aggregator regex for stricter error detection
2026-01-30 09:19:15 -05:00
thePR0M3TH3AN 667b48c301 Merge branch 'unstable' into telemetry-aggregation-fix-6349074633801704985 2026-01-30 09:19:03 -05:00
thePR0M3TH3AN 7b0d8c1f4f Merge pull request #1961 from PR0M3TH3AN/ai/refactor-videomodal-controller-18342133587526974097
refactor(ai): extract VideoModalController from js/app.js (agent)
2026-01-30 09:18:32 -05:00
thePR0M3TH3AN 80a0bc8bb2 Merge branch 'unstable' into ai/refactor-videomodal-controller-18342133587526974097 2026-01-30 09:18:22 -05:00
thePR0M3TH3AN 55b338ee5a Merge pull request #1962 from PR0M3TH3AN/ai/schema-validate-20250130-4578214465880061430
Event Schema Validation Tool & NIP-71 Instrumentation
2026-01-30 09:17:42 -05:00
thePR0M3TH3AN 646de9014b Merge pull request #1960 from PR0M3TH3AN/ai/ci-health-20250221-16879002849481713
chore(ai): CI health fixes (flaky tests)
2026-01-30 09:16:57 -05:00
thePR0M3TH3AN 36e724a9de Merge pull request #1956 from PR0M3TH3AN/refactor-automated-pr-review-12750616021674214922
feat: enhance automated PR review script with batch processing
2026-01-30 09:15:04 -05:00
thePR0M3TH3AN db9a6b8e69 Merge pull request #1955 from PR0M3TH3AN/ai/smoke-tests-20250129-1837019461609586530
chore(ai): add smoke test script (agent)
2026-01-30 09:14:46 -05:00
thePR0M3TH3AN 50a14edb17 Merge pull request #1970 from PR0M3TH3AN/codex/update-dev-mode-flag-defaults-and-documentation
Harden dev-mode defaults with runtime overrides
2026-01-30 09:14:07 -05:00
thePR0M3TH3AN 31b5fc5c16 Harden dev mode defaults 2026-01-30 09:13:54 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6d5170d3fc fix: flaky unit test in profile batch fetcher
Updated `tests/app-batch-fetch-profiles.test.mjs` to correctly mock `readRelays` in addition to `relays` and `writeRelays`. `profileMetadataService.js` prioritizes `readRelays`, causing the test to make unexpected network calls when falling back to default values. This fix ensures the test isolation holds and assertions pass consistently.

Also fixed a failing mock in `tests/profile-modal-controller.test.mjs` by adding a missing `load()` method to the `hashtagPreferences` service stub.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 07:55:06 +00:00
google-labs-jules[bot]andPR0M3TH3AN 51c5845ae1 fix: resolve missing mock method in profile modal tests
Added the missing `load()` method to the `hashtagPreferences` mock in `tests/profile-modal-controller.test.mjs`. This resolves the `TypeError` encountered during the `handleAddHashtagPreference` test case, ensuring the test suite passes consistently in CI.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 07:48:19 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7a3476f926 fix: flaky unit test in profile batch fetcher
Updated `tests/app-batch-fetch-profiles.test.mjs` to correctly mock `readRelays` in addition to `relays` and `writeRelays`. `profileMetadataService.js` prioritizes `readRelays`, causing the test to make unexpected network calls when falling back to default values. This fix ensures the test isolation holds and assertions pass consistently.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 07:37:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7ac4d4eee7 feat: add Nostr interop test script
This script validates protocol interoperability by publishing Video Post and View events, and sending Encrypted DMs using ephemeral keys against public relays. It ensures the NostrClient facade and event builders function correctly in a Node.js environment.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 07:34:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3302b5700a Use direct tailwindcss executable in build:css
- Replace `npx tailwindcss` with `tailwindcss` in `package.json` scripts.
- Improves build reliability by avoiding npx lookup issues in CI environments.
- Verified build success locally.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 06:49:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7d325e49db Fix profile-modal-controller test mock
- Update `tests/profile-modal-controller.test.mjs` to include a mock for `hashtagPreferences.load`.
- Fixes `TypeError: this.hashtagPreferencesService.load is not a function` in unit tests.
- Ensures all tests pass locally.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 06:45:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN a6bf25f9fc Fix app-batch-fetch-profiles test mocking
- Update `tests/app-batch-fetch-profiles.test.mjs` to correctly mock `nostrClient.readRelays`.
- Ensure deterministic relay query counts in unit tests.
- Fixes CI failure where `actual: 4` vs `expected: 2` due to unmocked read relays.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 06:39:23 +00:00
google-labs-jules[bot]andPR0M3TH3AN 782ecf3cea Refactor telemetry aggregator regex for stricter error detection
- Update `scripts/agent/telemetry-aggregator.mjs` to use a stricter regex for parsing generic logs.
- Require brackets (e.g., `[ERROR]`, `[WARN]`) or trailing colons/word boundaries (e.g., `Error:`, `FAIL`) to match errors.
- Prevent false positives from status messages like "0 errors" or "0 failures".
- Support `[WARN]` as Medium severity.
- Ensure PII sanitization and `ENABLE_TELEMETRY` guardrails are preserved.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 06:33:52 +00:00
google-labs-jules[bot]andPR0M3TH3AN 52dc6f3588 fix(test): mock load method for hashtag preferences service
- Adds `load: async () => {}` to the `hashtagPreferences` mock in `tests/profile-modal-controller.test.mjs`.
- Fixes `TypeError: this.hashtagPreferencesService.load is not a function` during `handleAddHashtagPreference` test execution.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 05:45:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN e1ca5d993d fix(test): mock readRelays in batch fetch test
- Sets `nostrClient.readRelays` in `tests/app-batch-fetch-profiles.test.mjs` to match the test relays.
- Fixes `AssertionError: expected a query per relay. 4 !== 2` caused by falling back to default read relays.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 05:39:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN 39c4e2249d chore(ai): event schema validation tool + fixes
- Created `scripts/agent/validate-events.mjs` to verify all event builders produce valid events against the schema.
- Instrumented `js/nostr/nip71.js` to validate NIP-71 events during construction (other builders in `js/nostrEventSchemas.js` were already instrumented).
- Validated all 25 event types using the new tool.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 05:34:50 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1394c42487 refactor(ai): extract VideoModalController from js/app.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 03:45:11 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3dfba92e04 refactor(ai): extract VideoModalController from js/app.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 03:40:36 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0960d3612d fix(ci): move @tailwindcss/typography to dependencies
- Move `@tailwindcss/typography` from `devDependencies` to `dependencies`.
- This ensures it is available during Netlify's production build, which prunes `devDependencies` but requires this plugin for `tailwind.config.cjs`.
- Fixes "Deploy failed" errors related to build script failures.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 02:43:42 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7995c23229 fix(ci): move build deps to dependencies
- Move `tailwindcss`, `autoprefixer`, and `postcss` to `dependencies` to ensure they are available during Netlify build (which defaults to production environment).
- Keep version compatibility with v3.
- (Implicit) Includes the `package-lock.json` update.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 02:40:10 +00:00
google-labs-jules[bot]andPR0M3TH3AN ced1f5456f fix(test): mock load method in profile-modal-controller test
- Add missing `load` method to `baseHashtagPreferences` mock in `tests/profile-modal-controller.test.mjs` to fix `TypeError: this.hashtagPreferencesService.load is not a function` in unit tests.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 02:34:39 +00:00
google-labs-jules[bot]andPR0M3TH3AN 952dc58ade chore(ai): CI health fixes (flaky tests)
- Fix `tests/app-batch-fetch-profiles.test.mjs` by mocking `readRelays` to ensure deterministic query counts.
- Set `NODE_ENV=test` in `scripts/run-unit-tests.mjs` to prevent `nostr-tools` bootstrap failures in test environment.
- Run `npm ci` and `npm audit fix` to maintain lockfile health.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 02:28:50 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2ba9b6c4a5 fix(test): mock hashtagPreferencesService.load in profile modal tests
- Updates `tests/profile-modal-controller.test.mjs` to include a mock for `load()` in `baseHashtagPreferences`.
- Resolves the `TypeError: this.hashtagPreferencesService.load is not a function` error seen in CI.
- Ensures unit tests pass for ProfileModalController interactions with the hashtag pane.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 00:27:28 +00:00
thePR0M3TH3AN 73c705831b Merge pull request #1958 from PR0M3TH3AN/codex/add-batching-and-debouncing-to-ui-updates
Debounce direct-message UI updates (250ms)
2026-01-29 19:07:40 -05:00
thePR0M3TH3AN 2726ee9ed4 Batch direct message UI updates 2026-01-29 19:07:29 -05:00
google-labs-jules[bot]andPR0M3TH3AN b594a87ef2 fix(build): fail build if critical files are missing in dist
- Updates `scripts/build-dist.mjs` to exit with error code 1 if source files like `_redirects` or `_headers` are missing.
- Prevents silent failures where `dist` directory is incomplete, potentially causing Netlify deployment checks to fail ambiguously.
- Ensures `build:css` failure also terminates the build process explicitly.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 00:05:09 +00:00
thePR0M3TH3AN 4d1c9f8ec9 Merge pull request #1957 from PR0M3TH3AN/codex/identify-cache-modules-for-profiles-and-dms
Merge cached profile fields and stabilize DM cache merging
2026-01-29 19:01:34 -05:00
thePR0M3TH3AN f0f36e7c7b Merge cached profile and DM data safely 2026-01-29 19:01:11 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6ffc53079c fix(test): mock readRelays in batch fetch test to prevent extra queries
- Updates `tests/app-batch-fetch-profiles.test.mjs` to mock `nostrClient.readRelays` alongside `relays` and `writeRelays`.
- Ensures `batchFetchProfilesFromRelays` queries only the mocked test relays (fast/fail), resolving the `4 !== 2` assertion error in CI.
- Matches logic in `profileMetadataService.js` which prioritizes `readRelays`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 23:58:27 +00:00
google-labs-jules[bot]andPR0M3TH3AN de7fceb8e2 feat: enhance automated PR review script with batch processing and refactoring
- Refactored `scripts/automated-pr-review.mjs` to separate review logic into `reviewPR` function.
- Added `--all` flag to support iterating over all open PRs using `gh` CLI.
- Updated commit message for micro-fixes to `fix(ai): formatting (agent) suggested`.
- Improved error handling and context management (e.g., passing `baseRef`).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 23:21:32 +00:00
google-labs-jules[bot]andPR0M3TH3AN 505d8dfc3c fix(deploy): update netlify config and smoke test
- Update `netlify.toml` to explicitly include redirect and header rules, ensuring they are picked up even if file copying fails or is inconsistent.
- Fix `scripts/agent/smoke-test.mjs` to ensure process cleanup on failure (avoiding zombie processes) and use polling for server startup (improving reliability).
- Verified smoke test passes locally.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 22:44:57 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3c9f9841fc fix(test): mock load method in hashtagPreferences service
- Add `load: async () => {}` stub to `baseHashtagPreferences` in `tests/profile-modal-controller.test.mjs` to prevent `TypeError` during `handleAddHashtagPreference` test.
- Fixes CI failure in `tests/profile-modal-controller.test.mjs` where `this.hashtagPreferencesService.load` was undefined.
- Verified with `npm run test:unit:shard3`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 22:30:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN 06dfe6278a chore(ai): add smoke test script (agent)
- Add scripts/agent/smoke-test.mjs for E2E verification
- Fix js/app.js to expose activeProfilePubkey and savedProfiles
- Fix tests/app-batch-fetch-profiles.test.mjs mocking (CI fix)
- Ensure smoke test uses Node.js compatible imports

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 22:00:17 +00:00
google-labs-jules[bot]andPR0M3TH3AN 624dabc576 chore(ai): add smoke test script (agent)
- Added `scripts/agent/smoke-test.mjs` which performs an end-to-e2e smoke test using a local relay, Node.js client, and headless Playwright browser.
- Fixed a bug in `js/app.js` where `activeProfilePubkey` and `savedProfiles` getters were missing, preventing auto-login and session restoration.
- The smoke test verifies:
    - Login flow (using ephemeral keys and localStorage injection).
    - Relay connection (using a local test relay).
    - Publish and Receive flow (Video Post).
    - DM Encryption/Decryption flow (Node.js client).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 21:45:32 +00:00
thePR0M3TH3AN 8779cd2524 Merge pull request #1954 from PR0M3TH3AN/codex/refactor-subscription-logic-and-add-logging
Centralize relay subscriptions and route profile fetches through metadata service
2026-01-29 16:32:23 -05:00
thePR0M3TH3AN a196e95127 Centralize relay list subscriptions 2026-01-29 16:32:11 -05:00
thePR0M3TH3AN 25e51cd5a0 Merge pull request #1953 from PR0M3TH3AN/codex/locate-nip-07-login-flow
Immediate UI update on NIP-07 login and parallelize profile/lists/DM hydration
2026-01-29 16:13:47 -05:00
thePR0M3TH3AN bba94b9908 Improve login hydration parallelism 2026-01-29 16:13:35 -05:00
thePR0M3TH3AN 901e8248a5 Merge pull request #1952 from PR0M3TH3AN/codex/audit-dm-fetching-logic-for-nip-04-and-nip-44
Include NIP-04 and NIP-44 kinds in DM filters
2026-01-29 16:09:07 -05:00
thePR0M3TH3AN 4b1725b1f1 Expand DM filters for gift-wrapped events 2026-01-29 16:08:52 -05:00
thePR0M3TH3AN 603e6b45f2 Merge pull request #1951 from PR0M3TH3AN/codex/add-batching-and-debouncing-for-relay-events
Batch relay-driven UI refreshes
2026-01-29 16:05:19 -05:00
thePR0M3TH3AN 7596f8b8fd Batch relay-driven UI refreshes 2026-01-29 16:05:03 -05:00
thePR0M3TH3AN 78618f47b4 Merge pull request #1950 from PR0M3TH3AN/codex/inspect-and-improve-relay-connection-logic
Harden relay reconnects with bounded backoff and per-relay circuit breakers
2026-01-29 16:01:23 -05:00