google-labs-jules[bot] and PR0M3TH3AN
96f630a738
Fix nostr-tools v2 compatibility and test quality issues
...
- js/nostr/nip46Client.js: Convert hex keys to Uint8Array before calling nip44.v2 functions. Remove .bind() from getConversationKey getters to fix context issues.
- js/ui/components/RevertModal.js: Remove duplicate imports and variable declarations causing SyntaxErrors.
- tests/compliance/nip04_44_compliance.test.mjs: Update test setup to mock nostr-tools.utils and pass byte keys.
- tests/nostr/dm-direct-message-flow.test.mjs: Update setupDmScenario to pass byte keys to getPublicKey and finalizeEvent.
- tests/nostr/nip46Client.test.js: Update tests to handle byte vs hex keys correctly for nostr-tools v2.
- tests/minimal-webtorrent.test.mjs: Add explicit assertions.
- tests/ui/components/debug_hashtag_strip_helper.test.mjs: Add explicit assertions.
- artifacts/test-audit-report.md: Add audit report.
Co-authored-by: PR0M3TH3AN <[email protected] >
2026-02-27 03:43:14 +00:00
thePR0M3TH3AN
0e5e56b146
Merge branch 'unstable' into refactor-revert-modal-dtag-18208308647871133769
2026-02-26 13:04:04 -05:00
google-labs-jules[bot] and PR0M3TH3AN
2703382ab4
Refactor RevertModal rendering logic into separate module
...
Extracted excessive DOM rendering logic from `RevertModal.js` into `revertModalRenderers.js`.
This improves code readability and maintainability by separating the view construction from the modal logic.
Added unit tests for the new renderers using a lightweight DOM mock.
Replaced local d-tag extraction with shared utility `getDTagValueFromTags`.
Co-authored-by: PR0M3TH3AN <[email protected] >
2026-02-26 17:50:10 +00:00
google-labs-jules[bot] and PR0M3TH3AN
931f57eebe
Refactor RevertModal to use shared d-tag extraction utility
...
- Removed duplicated `extractDTagValue` method from `js/ui/components/RevertModal.js`
- Imported and used `getDTagValueFromTags` from `js/nostr/nip71.js`
- Added unit tests for `getDTagValueFromTags` in `tests/nostr/nip71-d-tag.test.mjs`
This reduces code duplication and ensures consistent d-tag extraction logic.
Co-authored-by: PR0M3TH3AN <[email protected] >
2026-02-26 17:37:26 +00:00
google-labs-jules[bot] and PR0M3TH3AN
f676fb2ff5
[security] replace innerHTML in RevertModal.js
...
Migrated `js/ui/components/RevertModal.js` to safe DOM APIs (`createElement`, `textContent`, `DOMParser`).
Extracted rendering logic to `js/ui/components/revertModalRenderers.js`.
Updated baseline in `scripts/check-innerhtml.mjs` (0 remaining usages).
Updated tests to mock DOMParser.
Co-authored-by: PR0M3TH3AN <[email protected] >
2026-02-14 18:58:02 +00:00
thePR0M3TH3AN
e767316501
feat: add semantic color palette and lint guard
2025-10-14 15:18:02 -04:00
thePR0M3TH3AN
fc095e9796
Add semantic tokens and utilities for modal typography
2025-10-14 14:54:01 -04:00
thePR0M3TH3AN
8316800ceb
Use shared button styles in revert modal
2025-10-10 23:07:37 -04:00
thePR0M3TH3AN
3df86a7630
Add accessibility wiring for modals
2025-10-10 22:12:05 -04:00
thePR0M3TH3AN
6aa4b6517a
Surface audience flags in revert modal
2025-10-09 22:31:46 -04:00
thePR0M3TH3AN
ff83438dee
Enhance revert modal metadata details
2025-10-08 15:02:09 -04:00
thePR0M3TH3AN
004c6426a8
Stop obfuscating private magnets
2025-10-08 09:31:33 -04:00
thePR0M3TH3AN
361185ec02
Refactor revert modal into standalone component
2025-10-03 15:28:35 -04:00