Commit Graph
15 Commits
Author SHA1 Message Date
thePR0M3TH3ANandClaude Opus 4.8 a20388c5d6 [video-modal] Fix dead channel/creator link — event-name mismatch (#53)
Clicking the creator avatar/name in the video player modal did nothing. VideoModal
dispatched "navigate:profile", but ModalManager only listens for "creator:navigate"
(→ app.openCreatorChannel), so the event went into the void — same class as the old
action:embed bug noted just above the handler.

Fix:
- VideoModal.handleCreatorNavigation dispatches "creator:navigate" (the listened name)
  with { pubkey }.
- ModalManager's handler forwards event.detail.pubkey to app.openCreatorChannel.
- routerCoordinator.openCreatorChannel(pubkey) accepts an optional pubkey (prefers it,
  falls back to the active video's creator), so it navigates to the modal's own
  creator rather than whatever currentVideo happens to be.

Tests: tests/video-modal-controllers.test.mjs (+2 — dispatches creator:navigate with
the pubkey and never the dead navigate:profile; no-op without a pubkey). Lint + build green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-02 08:51:10 -04:00
thePR0M3TH3ANandClaude Opus 4.8 c8a63c57c6 feat(edit): thumbnail + video file upload in Edit modal (steps 2-3/3)
Brings the Edit modal to upload parity with the Upload modal: re-upload a
thumbnail or video file instead of only pasting URLs.

- Wire storage services (r2/s3/storageService) + pubkey/npub accessors into
  EditModal via ModalManager/initEditModal; EditModal constructs a shared
  MediaUploader.
- New editModalUpload.js holds all the upload glue (file-picker wiring, progress,
  storage-unlock checks, field write-back) to keep EditModal under its file-size
  budget. EditModal calls initEditModalUpload(this, context) in one line.
- edit-video-modal.html: "Replace video file…" (under the URL field) and
  "Replace thumbnail file…" (under the thumbnail field), each with a hidden file
  input + status line.
- On thumbnail upload: writes the new URL into the thumbnail field. On video
  upload: writes url + magnet (+ ws/xs hints). All written via setFieldUnlocked,
  which marks the field edited so EditModal.collect actually persists it (gated
  behind storage being configured + unlocked).

setFieldUnlocked is unit-tested (mutation-verified): without the unlock, the
re-upload would silently not save. Build + full lint + unit suite green.

NOTE: the upload/storage flow itself can't be unit-tested (browser + R2/S3);
pending manual verification of editing a video's thumbnail/file.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 09:09:07 -04:00
google-labs-jules[bot]andPR0M3TH3AN ecd59b616b test: fix video modal tests and add missing polyfills
- Added `scrollTo`, `HTMLMediaElement.prototype.pause`, and `load` polyfills in `tests/video-modal-accessibility.test.mjs` (via `setupModal`) and `tests/test-setup.mjs`.
- Added defensive check in `ModalManager.teardown` to prevent `TypeError` when removing event listeners.
- Updated `tests/video-modal-moderation.test.mjs` to use correct selector `[data-moderation-bar]` and updated assertions for moderation overlay visibility (override state).
- Created `tests/test-setup.mjs` to handle early global polyfills for dependencies like `floating-ui`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 02:09:22 +00:00
thePR0M3TH3AN 999235d71e Add S3 storage option to upload modal 2026-01-24 20:00:00 -05:00
google-labs-jules[bot] 981fac785a fix(embed): implement robust EmbedPlayerModal and guard resetTorrentStats
- Add `js/ui/components/EmbedPlayerModal.js` to implement the `VideoModal` interface for embed contexts (including `resetStats`).
- Update `js/ui/ModalManager.js` to detect embed mode and use `EmbedPlayerModal`.
- Clean up `js/embed.js` to remove local modal definition and add `postMessage` diagnostic logging.
- Update `js/app.js` `resetTorrentStats` log message and verify guard.
- Add unit tests for `EmbedPlayerModal` and `resetTorrentStats` logic.
- Add E2E reproduction script `tests/e2e/repro_issue.spec.ts`.
2026-01-24 22:09:03 +00:00
thePR0M3TH3AN b3de79f46c Add embed video modal 2026-01-23 17:14:07 -05:00
thePR0M3TH3AN 8e5b8b09ce Add Nostr share note publishing 2026-01-22 22:46:15 -05:00
thePR0M3TH3AN 012643ce12 Add share on Nostr modal 2026-01-22 22:36:56 -05:00
google-labs-jules[bot] cf9d1c08be Refactor UploadModal to use StorageService for secure R2 credentials 2026-01-16 02:35:00 +00:00
google-labs-jules[bot] 6794a54fba Fix View Channel button functionality and styling in EventDetailsModal 2026-01-14 20:42:36 +00:00
google-labs-jules[bot] f1d74894f2 Fix View Channel button functionality and styling in EventDetailsModal 2026-01-14 20:28:26 +00:00
google-labs-jules[bot] 4b5a46c5bd Add Event Details modal to video card menu 2026-01-14 19:29:32 +00:00
thePR0M3TH3AN 11479e28e2 Refactor video modal comment handling into controller 2025-10-27 13:58:55 -04:00
thePR0M3TH3AN 108ef37456 Restore similar content playback handling 2025-10-27 13:24:01 -04:00
thePR0M3TH3AN f4819060e4 Fix VideoListView import in ApplicationBootstrap 2025-10-27 12:47:53 -04:00