Commit Graph
118 Commits
Author SHA1 Message Date
thePR0M3TH3ANandClaude Opus 5 d141c316a9 [ui] Make "Share on Nostr" a working button
The share menu's "Share on Nostr" entry was never clickable, no matter who was
logged in -- it rendered as inert, dimmed text.

VideoModal initialized `shareNostrAuthState` to { isLoggedIn: false, hasSigner:
false } and nothing ever wrote to it. createVideoShareMenuPanel gates the item
on `isLoggedIn && hasSigner`, so it was always disabled, and the click
delegation in bindShareMenuActions() bails on `button.disabled` -- so the whole
share-to-Nostr flow behind it was unreachable.

The renderer and the publish path were both already correct; only the gate was
missing:

- VideoModal.setShareNostrAuthState() records the state and closes an already
  open share menu when it changes, so a menu opened before login does not keep
  showing the stale disabled item. It is a no-op when nothing changed, to avoid
  slamming the menu shut on every sync.
- syncAuthUiState() computes the gate from isUserLoggedIn() plus a
  signing-capable active signer, mirroring ShareNostrController.handleShare():
  a signer without signEvent would only produce an error toast on click.
- syncAuthUiState() was only ever called at bootstrap, so logging in
  mid-session left the gate closed. It now self-installs a bitvid:auth-changed
  listener on first run (bound once, re-entrancy safe) rather than adding a
  call site in js/app.js, which is at its file-size cap.

Verified in a browser that the rendered item is disabled when logged out or
signer-less and enabled + click-dispatching with both; the new tests fail 5/9
with the gate push removed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-07-28 14:16:18 -04:00
thePR0M3TH3ANandClaude Opus 4.8 793d609d6a fix(video-modal): wire the share popover's Copy URL / Magnet / CDN buttons
The share popover's menu items (Copy URL, Copy Magnet, Copy CDN Link, Share on
Nostr) only set `data-action` — like the ⋯ menu — but unlike the ⋯ menu (which
moreMenuController delegates) nothing wired their clicks, so they did nothing.
Only the bottom "forced-source" test links self-wire. Same dead-button class as
the old embed/creator-link bugs.

Add a delegated click handler on the share panel (bindShareMenuActions) that
routes each action to the event videoModalController already handles:
copy-magnet → video:copy-magnet, copy-cdn → video:copy-cdn, share-nostr →
video:share-nostr, and share (Copy URL) → a new video:copy-url (buildShareUrl
makes the plain `?v=<nevent>` deep link; controller copies it with a toast).
Forced-source links are skipped (they self-wire).

Tests: tests/video-modal-controllers.test.mjs (+5 routing scenarios, 24/24).
Lint + build clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-09 12:46:37 -04:00
thePR0M3TH3ANandClaude Opus 4.8 5844a36a54 Add "Always show creator" overlay button for account-level WoT override
Adds a second entry point (alongside the Safety-tab npub input) for the
per-author moderation override. On blurred/warned video surfaces, an
"Always show creator" button now sits beside "Show anyway". Clicking it
dispatches a `video:trust-author` document CustomEvent; the single app-level
listener in applicationBootstrap.js applies the account-level override and
refreshes affected videos, clearing the web-of-trust warning for every video
from that creator until reset.

Wired into VideoCard, VideoModal (persistent reused button + teardown
cleanup), and SimilarContentCard.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-08 17:01:49 -04:00
thePR0M3TH3ANandClaude Opus 4.8 37edbd18d2 Admin ring + star across avatars (identity, switcher, cards, player, DMs)
Add a reusable decorateAdminAvatar(avatarEl, id) that applies BOTH the gold
ring (box-shadow, not clipped by the avatar's overflow) and the corner star
(hung off a non-clipped .admin-avatar-wrap it ensures around the avatar).
Idempotent; works on attached or freshly-built detached avatars.

Wired onto:
- profile modal "Acting as" identity pill
- account-switcher saved-profile avatars
- video card creator avatars
- video player creator avatar
- DM conversation list + message bubbles (upgraded from star-only to ring+star)

adminBadge.js: split the star decision from its DOM (setAdminStar) so the
ring and star share one isAdminActor check; added ADMIN_RING_CLASS /
ADMIN_WRAP_CLASS. tests: decorateAdminAvatar (wrap/ring/star, idempotency,
non-admin, detached).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-07 14:24:16 -04:00
thePR0M3TH3ANandClaude Opus 4.8 6e2894e3d8 [video-modal] Fix dead like/dislike buttons — dispatch video:reaction (#54)
The real #54 bug (the signer gate was correct but unreachable): the reactions
controller forwards the raw click event to VideoModal.handleReactionClick, which
called this.reactionsController.handleReaction(event) — a method that does NOT
exist on the video-modal reactions controller (it only binds buttons + does
optimistic UI), passing the DOM event as the "reaction". So clicking like/dislike
threw / silently did nothing and never reached the publish path.

Fix: handleReactionClick now derives +/- from the clicked button
(#modalLikeBtn / #modalDislikeBtn, or a bare "+"/"-" for programmatic callers) and
dispatches "video:reaction" — the event ModalManager already routes to
app.handleVideoReaction -> reactionController.handleReaction (signs + publishes the
kind-7, and runs the ensureEncryptionCapableSigner gate from the earlier #54 pass).

Note: #53 (channel avatar/name link) is already fixed in a20388c5
(handleCreatorNavigation now dispatches "creator:navigate"); if it still looks dead
it's a stale build — rebuild dist / redeploy the branch under test.

Tests: tests/video-modal-controllers.test.mjs (+2). Lint + build green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-02 09:40:46 -04:00
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 084faa3543 video-modal: fix copy-magnet button doing nothing (wrong event name)
Same dead-event bug as the embed button: handleCopyRequest dispatched
"action:copy", but ModalManager listens for "video:copy-magnet"
(app.handleCopyMagnet) and #copyMagnetBtn has no popover fallback — so the
button did nothing. Dispatch "video:copy-magnet". Extended the regression
test to cover it.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-23 20:11:38 -04:00
thePR0M3TH3ANandClaude Opus 4.8 a5b284682c video-modal: fix Embed button doing nothing (wrong event name)
handleEmbedRequest dispatched "action:embed", but ModalManager listens for
"video:embed" (which opens EmbedVideoModal) and dispatch() does not remap
names — so the embed button fired an event into the void and the modal
never opened. (Share survives the same mismatch only because shareBtn also
toggles a popover directly.) Dispatch "video:embed". Regression test added.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-23 20:09:27 -04:00
thePR0M3TH3ANandClaude Opus 4.8 4e5bfaa6af [playback] harden WebTorrent streaming + add forced-source test deep links
WebTorrent (handleTorrentStream) hardening:
- Resolve only when playback is actually viable (loadeddata/canplay/playing),
  not the instant streamTo() is called. A dead/too-slow swarm is no longer
  reported as success, so the caller's fallback can run.
- Pre-playback torrent errors reject (caller falls back); post-playback errors
  go to an onPlaybackError hook instead of a dead reject().
- Mid-stream stall watchdog surfaces an onStall hook ("waiting for peers").
- Fix a <video> listener leak: stream listeners are tracked and torn down
  before the next stream and on cleanup() (the modal reuses one element).
- Stream the largest decodable file from a multi-file torrent and deselect the
  rest (wider ext set: mp4/m4v/webm/mkv/mov/ogv/ogg) so the swarm isn't spent
  downloading files we never play.
playbackCoordinator wires onStall/onPlaybackError to user-facing status.

Forced-source deep links (test affordance):
- The main app honors ?v=<nevent>&playback=torrent|url (mirrors the embed
  player) to force a playback path; a missing source shows a clear message.
- The video share menu gains "Copy WebTorrent URL" / "Copy CDN URL" items that
  copy the forced-source deep link (disabled with a reason when unavailable).

Tests: webtorrent-handlers (resolve-on-readiness, pre/post-ready errors, stall
fires/clears, largest-file select/deselect, no listener accumulation),
playback-forced-source (param normalization), videoMenuRenderers (copy items +
availability). All mutation-verified.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-18 12:15:27 -04:00
google-labs-jules[bot]andPR0M3TH3AN f7712f51a9 fix: initialize video modal share popover with correct arguments
- Update `js/ui/components/VideoModal.js` to correctly initialize the modal share popover using the `createPopover(trigger, renderFn, options)` signature instead of a single config object.
- Fix the flaky e2e test `tests/e2e/search-and-filter.spec.ts` by increasing the test timeout from 15s to 30s to allow more time for feed items to be retrieved from the network.
- Update `tests/e2e/video-modal-share-bug.spec.ts` to attach an `#uiOverlay` wrapper element for the popover so the DOM doesn't crash on tests.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-03-01 20:49:41 +00:00
google-labs-jules[bot]andPR0M3TH3AN f255bdd9bc chore(torch): execute daily agent run for ci-health-agent
- Resolve scheduler context and preflight exclusions
- Select `ci-health-agent` from roster using round-robin logic
- Acquire distributed lock for execution window
- Perform necessary repository check fixes (linting and tests)
- Publish successful completion lock event
- Write final `task-logs` event record
- Output execution summary

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-28 19:48:57 +00:00
thePR0M3TH3AN 34b0b03ad0 Merge branch 'unstable' into agents/daily/torch-garbage-collection-agent-2026-02-26-15639715828522871125 2026-02-26 21:42:21 -05:00
thePR0M3TH3AN 8d6e32be27 Merge branch 'unstable' into agents/daily/style-agent-1740615175-12694853261144843326 2026-02-26 21:40:23 -05:00
thePR0M3TH3AN 9448624753 Merge branch 'unstable' into agents/daily/todo-triage-agent-13829754158937187173 2026-02-26 21:38:12 -05:00
google-labs-jules[bot]andPR0M3TH3AN 5c2ba17459 chore: garbage collection and maintenance fixes
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 02:32:53 +00:00
google-labs-jules[bot]andPR0M3TH3AN a649c341e0 I have updated the nostr-tools usage and resolved the UI bugs. Here are the details of the changes:
- Updated `js/nostr/adapters/nsecAdapter.js` to ensure private keys are `Uint8Array` bytes before passing to `getPublicKey`, fixing compatibility with `nostr-tools` v2.
- Updated `tests/nostr/nip46Client.test.js` to use byte arrays for keys in crypto operations.
- Implemented missing `setupModalMorePopover`, `setupModalSharePopover`, and `refreshModalMoreMenuPanel` in `VideoModal.js`.
- Fixed a bug in `VideoModal.js` where `setCommentComposerState` was overriding `CommentsController` send button logic; it now delegates to the controller if available.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 02:14:29 +00:00
google-labs-jules[bot]andPR0M3TH3AN 089556acd1 chore(todo-triage): daily scan and minor fixes
- Ran `todo-triage-agent` scan (0 actionable items found).
- Fixed inline style lint error in `tests/ui/components/DeleteModal.test.mjs`.
- Fixed duplicate import syntax error in `js/ui/components/RevertModal.js`.
- Initialized `modalNavScrollHandler` in `VideoModal` constructor to improve test stability.
- Updated scheduler memory.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 02:14:06 +00:00
google-labs-jules[bot]andPR0M3TH3AN bf076578e9 fix(ci): resolve nostr-tools v2 compatibility and VideoModal regressions
- Fix `nostr-tools` v2 compatibility:
  - Update `js/nostr/adapters/nsecAdapter.js` to convert hex private keys to `Uint8Array` before passing to `getPublicKey`.
  - Update `js/nostr/nip46Client.js` to ensure keys are bytes for `getPublicKey`.
  - Update `tests/nostr/nip46Client.test.js` and `tests/nostr-private-key-signer.test.mjs` to use `Uint8Array` for keys.
- Fix `VideoModal` regressions:
  - Add missing delegation methods (`setCommentsVisibility`, `clearComments`, `resetCommentComposer`, `setCommentStatus`, `setCommentComposerState`, `appendComment`, `renderComments`, `setCommentSectionCallbacks`, `hideCommentsDisabledMessage`, `showCommentsDisabledMessage`, `updateCommentCharCount`, `updateCommentSubmitState`) to `js/ui/components/VideoModal.js`.
  - Expose getters for `commentsList`, `commentsComposer`, etc., in `VideoModal.js` to support tests.
  - Implement `setCallbacks` in `js/ui/components/video-modal/commentsController.js` and ensure robust initialization when DOM elements are missing.
  - Fix `open()` and `updateSourceAvailability()` in `VideoModal.js` to correctly re-enable Share, Embed, and Copy Magnet buttons.
- Fix `DeleteModal` tests to comply with linting rules (avoid direct `.style` assignment).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 02:08:58 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7427961a69 fix(ci): resolve various test failures and nostr-tools v2 compatibility
- Fix duplicate imports/declarations in `js/ui/components/RevertModal.js`
- Update `js/nostr/nip46Client.js` to pass `Uint8Array` keys to `getConversationKey` for compatibility with `nostr-tools` v2
- Fix NIP-46 compliance tests by using correct key types and improved mocks
- Implement missing methods in `js/ui/components/VideoModal.js` (`handleCopyRequest`, `setCommentsVisibility`, etc.) to fix runtime crashes in tests
- Ensure `VideoModal` stores comment composer state locally to support external controller updates in tests
- Update DM integration tests to use `Uint8Array` keys for `nostr-tools` helpers
- Fix linting issue in `tests/ui/components/DeleteModal.test.mjs` using `Object.defineProperty`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 01:52:00 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6a7dbf8c7d fix(ui): restore missing methods in VideoModal.js to prevent initialization crash
- Restore missing handlers (`handleCopyRequest`, `handleShareRequest`, `handleEmbedRequest`, `handleCreatorNavigation`, `handleModalMoreButtonClick`, `handleReactionClick`) and setup methods (`setupModalMorePopover`, `setupModalSharePopover`, `bindVideoEvents`, `detachVideoEvents`, `bindActionButtons`, `updateSourceAvailability`, `updateSourceToggleState`, `attachAmbientGlow`, `teardownAmbientGlow`, `refreshModalMoreMenuPanel`).
- Fixes `TypeError: Cannot read properties of undefined (reading 'bind')` in `VideoModal` constructor which caused E2E test timeouts and unit test failures.
- Implement methods using standard patterns and available imports (`popoverEngine`, `videoMenuRenderers`, `ambientBackground`).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 01:31:28 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5aac1b2d21 fix(ci): address multiple test and build failures
- Fixed duplicate import and variable declaration in `js/ui/components/RevertModal.js` which caused syntax errors.
- Fixed missing method implementations in `js/ui/components/VideoModal.js` which caused `bind` errors during initialization.
- Fixed NIP-46 compliance tests by updating mocks to match `nostr-tools` v2 structure.
- Updated `js/nostr/nip46Client.js` to ensure keys are passed as `Uint8Array` to `nostr-tools` helpers, maintaining compatibility with legacy hex strings.
- Updated `tests/nostr/dm-direct-message-flow.test.mjs` to use `Uint8Array` keys, fixing "expected Uint8Array" errors.
- Maintained the previous lint fix for `tests/ui/components/DeleteModal.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 01:15:53 +00:00
google-labs-jules[bot]andPR0M3TH3AN feb7ad765a Refactor VideoModal to delegate comments to CommentsController
Move comment-related logic and state from VideoModal.js to CommentsController.js.
Split CommentsController into CommentsController (orchestration), CommentsListRenderer (DOM management), and CommentNodeFactory (element creation) to maintain modularity and adhere to file size limits.
Update VideoModal to initialize and destroy CommentsController correctly.
Fix minor lint issues.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-26 17:53:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN f022168c33 [decompose] extract Zap and LinkPreview controllers from VideoModal.js
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 01:39:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN 54be0efcac [decompose] extract helpers from js/ui/components/VideoModal.js
Decomposed js/ui/components/VideoModal.js by extracting "Similar Video" and "Pointer Key" logic into a new helper module js/ui/components/VideoModalSimilarHelpers.js.

- Reduced VideoModal.js line count from 6334 to 6045.
- Added comprehensive unit tests for extracted helpers.
- Updated check-file-size.mjs baseline.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 11:46:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN d2c6f0a32e chore(ai): document js/ui/components/VideoModal.js
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 15:48:06 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2aae4094e7 [constants] refactor duplicate numeric constants
- Add `UI_FEEDBACK_DELAY_MS`, `DEBOUNCE_DELAY_MS`, and `NETWORK_RETRY_DELAY_MS` to `js/constants.js`.
- Replace magic numbers (5000, 2000, 1500) with semantic constants in:
  - `js/ui/notificationController.js`
  - `js/ui/profileModal/ProfileDirectMessageActions.js`
  - `js/ui/urlHealthController.js`
  - `js/app/uiCoordinator.js`
  - `js/ui/components/VideoModal.js`
  - `js/ui/components/UploadModal.js`
  - `js/services/dmNostrService.js`
  - `js/services/hashtagPreferencesService.js`
  - `js/app/feedCoordinator.js`
  - `js/services/moderationService.js`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 03:43:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN a084bb59de refactor: deduplicate HEX64_REGEX to js/utils/hex.js
Moves the repeatedly defined HEX64_REGEX constant to a shared utility
module to improve maintainability and consistency. Updates all consumers
to import from the new location.

Signed-off-by: Jules <[email protected]>

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 21:52:51 +00:00
thePR0M3TH3AN c3e986c9d3 Improve relay hygiene and count status 2026-01-29 09:58:35 -05:00
google-labs-jules[bot]andPR0M3TH3AN bf96a02fec fix(VideoModal): ensure normalized tags retain hash prefix
Fixes a unit test failure in `tests/video-modal-controllers.test.mjs` where tags were expected to be prefixed with `#` but were stripped.

Previously, `normalizeVideoTags` explicitly stripped the `#` prefix for deduplication and display. This caused a mismatch with tests that expected the prefix.

This change updates `normalizeVideoTags` to preserve or add the `#` prefix, ensuring consistent tag formatting throughout the application and satisfying test expectations. This aligns with `tagPillList.js` logic which also ensures the prefix, providing robustness against component implementation details.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 17:46:13 +00:00
google-labs-jules[bot]andPR0M3TH3AN d81643b423 Fix CI failures in popover engine, tag trimming, and canvas mock
- Guard `js/ui/overlay/popoverEngine.js` against missing `window` and detached elements in `updatePosition`.
- Update `js/ui/components/VideoModal.js` `normalizeVideoTags` to strip `#` prefix, aligning with test expectations and display logic.
- Mock `HTMLCanvasElement.prototype.getContext` in `tests/video-modal-accessibility.test.mjs` to silence benign warnings.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 03:46:40 +00:00
google-labs-jules[bot]andPR0M3TH3AN cf1c81e61e fix(tests): resolve JSDOM errors and tag sorting failures
- Update `tests/video-modal-accessibility.test.mjs` to unconditionally stub `HTMLMediaElement` methods (`pause`, `load`), fixing "Not implemented" errors in JSDOM.
- Refactor `VideoModal.normalizeVideoTags` to preserve tag casing while normalizing for deduplication (lowercase + strip #) and ensuring correct display format.
- Update `js/ui/components/tagPillList.js` to conditionally prepend `#` only if missing, preventing double-hashing (e.g., `##tag`).
- Remove unused `normalizeHashtag` import in `VideoModal.js`.
- Verify fixes with `tests/video-modal-tags.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 03:17:15 +00:00
google-labs-jules[bot] b9f7ffd95e fix: eliminate black bars in video modal player
Enforce full-width/height video display and dynamic object-fit logic to prevent letterboxing and layout gaps.

- Add robust CSS overrides to 'css/tailwind.source.css' to ensure video fills the stage.
- Update 'VideoModal.js' to dynamically switch between 'cover' and 'contain' based on aspect ratio match.
- Handle ambient canvas positioning to prevent layout shifts.
2026-01-25 00:29:52 +00:00
thePR0M3TH3AN 1709972f14 Add embed action to video modal 2026-01-23 15:24:09 -05:00
google-labs-jules[bot] 92b95c9576 fix(ci): resolve hardcoded hex color lint errors
- replace hardcoded hex colors with rgb() equivalents in:
  - js/ui/loginModalController.js
  - js/ui/ambientBackground.js
  - js/ui/components/VideoModal.js
  - js/themeController.js
  - index.html
- exclude config/instance-config.js and config/validate-config.js from check-hex.js linting
- ensures CI lint jobs pass by adhering to token/rgb policy or exclusion lists

Signed-off-by: Jules <[email protected]>
2026-01-23 17:25:47 +00:00
google-labs-jules[bot] afa231da3e Fix: Enable video modal share button when source is available
The share button in the video modal was not being enabled correctly because `updateSourceAvailability` returned early if `sourceToggleContainer` was missing, skipping the `setShareEnabled` call.

This change ensures `setShareEnabled` is called based on `hasUrl` or `hasMagnet` before checking for `sourceToggleContainer`.

Added a regression test `tests/e2e/video-modal-share-bug.spec.ts`.
2026-01-23 04:51:14 +00:00
thePR0M3TH3AN b70d263eff Update share menu auth handling 2026-01-22 21:37:25 -05:00
google-labs-jules[bot] 0ec517d689 Refactor video modal Share button to use a popover menu
- Replaced direct copy-to-clipboard action with a Share menu.
- Added "Copy URL", "Share on Nostr", "Copy Magnet", and "Copy CDN Link" options.
- Moved "Copy Magnet" from the main modal interface to the menu.
- Updated `js/app.js` to handle `video:share-nostr` (placeholder), `video:copy-magnet`, and `video:copy-cdn` events.
- Removed deprecated `setCopyMagnetState` logic.
- Cleaned up `components/video-modal.html`.
2026-01-22 15:40:54 +00:00
thePR0M3TH3AN 0eacbd1063 Add cached link previews with privacy toggle 2026-01-19 13:06:50 -05:00
thePR0M3TH3AN 0ac64867da Add shared hashtag normalization helper 2026-01-18 13:35:34 -05:00
google-labs-jules[bot] e6ebbb8343 Fix blurred thumbnail visuals and add moderation buttons to SimilarContentCard
- Adds `blur-xl` class to `SimilarContentCard` thumbnails when blurred, ensuring visual consistency.
- Implements `createModerationOverrideButton`, `createModerationHideButton`, and `createModerationBlockButton` in `SimilarContentCard.js` to provide missing interactivity.
- Updates `VideoModal.js` to wire up moderation callbacks (`onModerationOverride`, `onModerationHide`, `onModerationBlock`) when initializing similar content cards, dispatching global moderation events.
- Ensures moderation actions in the similar content sidebar function identically to the main video player.
2026-01-16 13:34:29 +00:00
google-labs-jules[bot] 7dc60c36ef Add playback source toggle (CDN/P2P) to video modal
- Added toggle buttons and stat counters to `video-modal.html`.
- Updated `VideoModal.js` to manage toggle visibility (show if either source exists, disable unavailable option) and dispatch `playback:switch-source` events.
- Updated `app.js` to handle source switching by restarting playback with a `forcedSource`.
- Updated `playbackService.js` to respect `forcedSource` by bypassing probe logic when a specific source is requested.
2026-01-15 01:06:56 +00:00
google-labs-jules[bot] 6c3ac4d49f Implement video source toggle (CDN vs P2P)
- Added source toggle UI in `components/video-modal.html`.
- Updated `VideoModal.js` to manage toggle visibility (only when both URL and Magnet exist), update peer/server counts, and dispatch `playback:switch-source` events.
- Updated `PlaybackService.js` to support a `forcedSource` option, allowing bypassing of the URL probe when "torrent" is forced.
- Updated `app.js` to listen for the toggle event and re-initialize playback with the forced source preference.
- Updated `tests/ui/helpers/jsdom-test-helpers.mjs` to expose necessary globals for JSDOM testing.
- Verified functionality with targeted updates and existing unit tests.
2026-01-14 21:18:46 +00:00
thePR0M3TH3AN 06c3d9a978 Add breakpoint token helpers for media queries 2026-01-13 21:26:53 -05:00
thePR0M3TH3AN b48edbb055 Refactor inline styles to CSS rules 2026-01-13 21:13:32 -05:00
google-labs-jules[bot] 81e8b2ed40 Refine Video Modal moderation UI styles: blur creator avatar and fix text contrast. 2026-01-13 14:28:42 +00:00
google-labs-jules[bot] 0772d2fa09 Refactor Video Modal moderation UI to a persistent bar above the player. 2026-01-13 14:12:14 +00:00
google-labs-jules[bot] 1f47e161d4 Refactor Video Card and Modal layout to move view counts and use icons.
- Moved view count and comments to a new bottom engagement section in `VideoCard.js`.
- Replaced text labels with Eye and Message SVG icons in `VideoCard.js`.
- Updated `video-modal.html` to include an Eye icon for the view count.
- Refactored `VideoModal.js` to update only the text node for view counts, preserving the icon.
- Removed "views" text suffix in favor of a cleaner numeric display.
2026-01-12 21:01:47 +00:00
google-labs-jules[bot] 41ff140982 feat: enable dynamic comment loading and sorting 2026-01-07 03:03:46 +00:00
google-labs-jules[bot] cced268982 Fix: Ensure comments controller is initialized when opening video modal
This addresses an issue where comments would not display on the first load of the video modal if the DOM elements were not fully bound. The `open()` method now checks if the `commentsList` is missing or disconnected and re-initializes the `CommentsController` if necessary.

Also updated `tests/video-modal-accessibility.test.mjs` to fix a JSDOM environment issue with `navigator` mocking.
2026-01-07 00:59:47 +00:00
thePR0M3TH3AN a8119f5b43 Handle login-required comment visibility 2026-01-02 10:13:45 -05:00