Commit Graph
3324 Commits
Author SHA1 Message Date
thePR0M3TH3AN 2215e0254d Merge pull request #1205 from PR0M3TH3AN/codex/refactor-inline-styles-to-class-names
Replace inline styles with semantic classes
2026-01-13 20:31:18 -05:00
thePR0M3TH3AN 4c4f57c6e5 Replace inline styles with classes 2026-01-13 20:29:38 -05:00
thePR0M3TH3AN 472738ee19 Merge pull request #1204 from PR0M3TH3AN/codex/fix-remaining-linting-and-test-issues
Fix watch history payload limits, encryption, and storage persistence
2026-01-13 20:22:35 -05:00
thePR0M3TH3AN 5ba24a4cb6 Fix watch history storage persistence 2026-01-13 18:34:26 -05:00
thePR0M3TH3AN 602207fbee Merge pull request #1203 from PR0M3TH3AN/fix-ci-env-lint-tests-7993553949094506329
Fix CI, Env, and Unit Tests
2026-01-13 15:35:05 -05:00
google-labs-jules[bot] d6882fb5bb Fix CI, environment, linting, and unit test issues
- Fix circular dependency in `js/adminListStore.js` by importing from `js/nostrClientRegistry.js`.
- Update `js/services/hashtagPreferencesService.js` to include legacy kind 30005 in filters.
- Fix JSDOM mocking in `tests/modal-accessibility.test.mjs` (navigator getter) and `UploadModal` selectors.
- Add `getRoot()` to `js/ui/components/UploadModal.js` for API consistency.
- Update `tests/magnet-utils.test.mjs` expectations to reflect removed default tracker.
- Mock `ensureActiveSignerForPubkey` in `tests/moderation/submit-report.test.mjs`.
- Fix mock loader path in `tests/moderation/trust-seeds.test.mjs` to target `trustBootstrap.js`.
- Fix duplicate pointer tags in `js/nostrEventSchemas.js`'s `buildCommentEvent`.
- Update `tests/nostr/comment-events.test.mjs` and `tests/comment-event-builder.test.mjs` to match current code behavior (legacy kinds, unique tags).
2026-01-13 20:32:06 +00:00
thePR0M3TH3AN 03bdc7a695 Merge pull request #1202 from PR0M3TH3AN/fix-subscriptions-loading-and-sidebar-visibility-15759455493228740300
Fix subscriptions loading and sidebar visibility
2026-01-13 12:06:21 -05:00
google-labs-jules[bot] d3008d0bbe Fix: Sidebar 'Subscriptions' link remains hidden for logged-in users
The `resolveSubscriptionsLink` method in `js/app.js` cached the sidebar DOM element (`this.subscriptionsLink`) during initialization. However, the sidebar is re-rendered dynamically, causing the cached reference to point to a detached DOM node. Consequently, `applyAuthenticatedUiState` would update the visibility of the detached element, leaving the visible sidebar unchanged.

This fix updates `resolveSubscriptionsLink` to check `this.subscriptionsLink.isConnected`. If the cached element is detached, it re-queries the DOM to retrieve the current live element, ensuring visibility updates apply correctly.

Additionally, `js/index.js` now awaits `applicationReadyPromise` before hydrating the sidebar, preventing race conditions during startup. `js/nostr/toolkit.js` was updated to support function-based subscription closers, fixing potential leaks.
2026-01-13 16:58:45 +00:00
google-labs-jules[bot] eb8b3c70dd Fix subscriptions loading issues and sidebar link visibility race condition.
- Updated `shimLegacySimplePoolMethods` in `js/nostr/toolkit.js` to correctly handle `nostr-tools` v2 subscription closers (which are functions) in `unsub`. This prevents subscription leaks that were causing relays to reject new requests, leading to empty subscription lists.
- Updated `bootstrapInterface` in `js/index.js` to await `applicationReadyPromise` before attempting to hydrate the sidebar navigation. This fixes a race condition where the sidebar "Subscriptions" link would remain hidden because the application auth state wasn't fully initialized when the sidebar was rendered.
2026-01-13 15:25:03 +00:00
thePR0M3TH3AN 778b35874d Merge pull request #1201 from PR0M3TH3AN/fix-slow-loading-video-grid-7505675586453320961
Unblock video grid loading by backgrounding access control checks
2026-01-13 09:50:29 -05:00
google-labs-jules[bot] bdc86aaef6 Fix future timestamp bug and improve loading spinner UX 2026-01-13 14:48:56 +00:00
thePR0M3TH3AN 6ea31c9895 Merge pull request #1200 from PR0M3TH3AN/refactor-video-moderation-ui-3991318459890332527
Refactor Video Modal Moderation UI
2026-01-13 09:31:40 -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] 14d7423e29 Remove blocking access control checks to fix slow initial video loading 2026-01-13 14:25:22 +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
thePR0M3TH3AN efb42e93db Merge pull request #1198 from PR0M3TH3AN/stale-while-revalidate-moderation-13578942910948659410
feat: implement stale-while-revalidate for moderation lists
2026-01-13 08:53:18 -05:00
google-labs-jules[bot] ef34d3cf02 Optimize startup by non-blocking moderation and relay init 2026-01-13 13:36:49 +00:00
thePR0M3TH3AN 8755ad64cd Merge pull request #1199 from PR0M3TH3AN/video-card-moderation-badge-overlay-5905417972080224775
Overlay moderation badge on blurred thumbnails
2026-01-12 23:32:16 -05:00
google-labs-jules[bot] e77418f0a8 feat: overlay moderation badge on blurred video thumbnails
Moves the moderation warning badge ("Content blocked...") to overlay the blurred thumbnail image instead of sitting below it or increasing card height. This logic is applied to both the main `VideoCard` and the `SimilarContentCard` to ensure layout consistency.

Changes:
- VideoCard.js: Refactor `updateModerationBadge` to append the badge container as a child of the `anchorEl` (thumbnail wrapper) with absolute positioning.
- SimilarContentCard.js: Implement `refreshModerationUi` logic to generate and overlay a simplified moderation badge on the thumbnail when `trustedMuted` context is present.
- Fix tests/moderation/video-card.test.mjs: Patch test environment to mock `globalThis.navigator`.
2026-01-13 04:29:36 +00:00
google-labs-jules[bot] 29857dc36c Optimize application startup speed by parallelizing initialization 2026-01-13 04:21:13 +00:00
google-labs-jules[bot] e1d43708c5 feat: implement stale-while-revalidate for moderation lists to speed up initial load
This change optimizes the application startup by allowing the moderation system (AccessControl) to initialize immediately using cached data from localStorage if available. It triggers a background network refresh to update the lists asynchronously, preventing the UI from blocking on slow relay responses.

Key changes:
- Modified `js/accessControl.js` to make `ensureReady()` return immediately if hydrated from cache.
- Updated `js/app.js` to use `ensureReady()` instead of the blocking `refresh()` during init.
- Updated `js/ui/profileModalController.js` to conditionally show the "Fetching moderation filters…" status message only when waiting for network data.
2026-01-13 03:59:54 +00:00
thePR0M3TH3AN 0d57316037 Merge pull request #1196 from PR0M3TH3AN/r2-docs-update-1588879282634368057
Update R2 setup documentation to use manual Public Access and CORS flow
2026-01-12 22:09:11 -05:00
google-labs-jules[bot] c21bffb0c1 Update R2 documentation for manual public access setup
Updates `content/upload-content.md` and `docs/storage-r2.md` to reflect the current manual configuration workflow for Cloudflare R2 storage.

Key changes:
- Removes deprecated instructions for generating "Admin Read & Write" or "Workers R2 Storage" automation tokens.
- Documents the new requirement to manually create a bucket and enable "Public Access" (r2.dev subdomain) in the Cloudflare Dashboard.
- Adds explicit instructions for manually configuring CORS policy via the Cloudflare Dashboard, providing the required JSON configuration.
- Aligns the "Configure bitvid" steps with the application's current UI, which requires the "Public Bucket URL" as an explicit input.
- Clarifies that "Object Read & Write" permissions are sufficient and recommended for security.
2026-01-13 03:04:29 +00:00
thePR0M3TH3AN 023c97340b Merge pull request #1195 from PR0M3TH3AN/reduce-similar-content-sidebar-11771111956314504323
Reduce Similar Content sidebar width
2026-01-12 20:33:12 -05:00
google-labs-jules[bot] 2912b5abbb Reduce width of Similar Content sidebar and improve layout
- Reduced width of "Similar Content" sidebar in the video modal (further reduced from 40rem to 35rem).
- Adjusted responsive widths for the sidebar:
  - LG: 30vw (was 36vw)
  - XL: 28vw (was 32vw)
- Added bottom padding to the primary video column (`.video-modal__primary`) to ensure the comments box does not touch the bottom of the scroll container.
- Updated `css/tokens.css` and `css/tailwind.source.css`.
- Regenerated `css/tailwind.generated.css`.
2026-01-13 01:26:51 +00:00
google-labs-jules[bot] 9dcd8e636b Reduce width of Similar Content sidebar in video modal
Reduced the width of the "Similar Content" sidebar by approximately 10% to provide more space for the video player.

- Updated `css/tokens.css` to reduce `--video-modal-secondary-max` from 44rem to 40rem.
- Updated `css/tailwind.source.css` to reduce the viewport width percentage clamp values:
  - LG breakpoint: 40vw -> 36vw
  - XL breakpoint: 36vw -> 32vw
- Regenerated `css/tailwind.generated.css`.
2026-01-13 01:05:01 +00:00
thePR0M3TH3AN df5a493969 Merge pull request #1194 from PR0M3TH3AN/feature/video-card-layout-update-14744375313479485048
Update Video Card layout with dedicated engagement section
2026-01-12 16:54:36 -05:00
google-labs-jules[bot] fb15ff3eb0 Update Similar Content Card to match Video Card layout.
- Remove view count and separator from the metadata row in `SimilarContentCard.js`.
- Add new `buildEngagementSection` method to render view count and discussion count in a dedicated footer.
- Use Eye and Message SVG icons for engagement metrics.
- Ensure visual consistency with the main Video Card component.
- Fix import and definition of `SVG_NAMESPACE` to support icon creation.
2026-01-12 21:21:11 +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] 868639cbf2 Refactor VideoCard layout to move view/discussion counts to bottom
- Moved view count from author metadata section to a new bottom "Engagement Section".
- Replaced "views" and "notes" text with SVG icons (Eye and Message Circle).
- Grouped views and comments side-by-side in the new section.
- Preserved existing data attributes for view/discussion counters.
- Cleaned up author metadata to only show Time and Edited status.
2026-01-12 20:32:22 +00:00
thePR0M3TH3AN 3e200876da Merge pull request #1193 from PR0M3TH3AN/feature/r2-wizard-setup-4403533772192504014
R2 Configuration Wizard & Verification
2026-01-12 15:18:59 -05:00
google-labs-jules[bot] a0ef54434a Implement 2-step wizard for R2 credentials with public access verification
- Added `deleteObject` to `js/storage/r2-s3.js` for cleanup.
- Added `verifyPublicAccess` to `js/services/r2Service.js` to test bucket configuration.
- Refactored `components/upload-modal.html` to support wizard steps.
- Updated `js/ui/components/UploadModal.js` to manage wizard state and trigger verification.
2026-01-12 20:16:30 +00:00
thePR0M3TH3AN 31c2d8fae2 Merge pull request #1192 from PR0M3TH3AN/update-r2-upload-minimal-permissions-9294161573510174314
Update R2 upload to use minimal permissions and client-side hashing
2026-01-12 14:53:23 -05:00
google-labs-jules[bot] 4345c8c7dd Fix export error in R2 storage module and refine upload workflow
- Exported `ensureBucketExists` from `js/storage/r2-s3.js` to resolve a module import error in `js/services/r2Service.js`.
- Verified the fix via code read.
- Confirmed syntax correctness of `r2-s3.js` modifications.
2026-01-12 19:49:48 +00:00
google-labs-jules[bot] f45f027a56 Refine R2 upload UX with bucket auto-creation attempt and clearer guidance
- Updated `R2Service` to attempt bucket creation via S3 API (`ensureBucketExists`) before upload. This improves the UX for users with Admin keys or custom domains while gracefully failing (with a warning) for users with minimal permissions.
- Modified `UploadModal` helper text to explicitly instruct users about enabling "Public Access" in the Cloudflare dashboard for new buckets.
- Updated `js/r2.js` to ensure the "Public Bucket URL" is always sanitized to include the `https://` protocol, fixing potential webseed generation issues.
2026-01-12 19:40:07 +00:00
google-labs-jules[bot] 7dc2977cf2 Update Cloudflare R2 upload to use minimal permissions and add progress bar
- Removed requirement for Cloudflare API Token, Zone ID, and Worker Token from Upload Modal and R2Service.
- Simplified R2 configuration to require only Account ID, S3 Access Keys, and a user-provided Public Bucket URL.
- Added a read-only field in Upload Modal displaying the derived target bucket name (npub-based) for user reference.
- Implemented client-side torrent info hash calculation using `WebTorrent` (via `js/utils/torrentHash.js`) to generate magnet links before upload.
- Added a visual upload progress bar to the Upload Modal.
- Updated `js/r2.js` to ensure the Public Bucket URL always includes the `https://` protocol.
2026-01-12 18:53:22 +00:00
thePR0M3TH3AN 01d4335fda Merge pull request #1191 from PR0M3TH3AN/fix-edited-video-date-reset-3684025320852324602
Fix published date reset on video edit and add edited indicators
2026-01-12 13:32:25 -05:00
google-labs-jules[bot] ad0a9113f6 Improve edited video indicators and preserve publish date
- Update `VideoCard.js` to display "• Edited" instead of "(edited)" for better visual consistency.
- Update `app.js` to format the modal's "Last Edited" timestamp as "Last edited: [Absolute] ([Relative])".
- Ensure `EditModal.js` correctly backfills and preserves `published_at` to prevent date resets.
- Verify edit logic with existing tests.
2026-01-12 18:13:57 +00:00
google-labs-jules[bot] 782b5fe0b7 Fix: prevent published date reset when editing videos and show edited status
Prioritize `published_at` metadata over event `created_at` timestamp.
Backfill `published_at` during edit if missing to preserve original date.
Add "(edited)" label to video cards for modified content.
Display "Last Edited: [Date]" on video player modal.
2026-01-12 15:52:24 +00:00
google-labs-jules[bot] 1d3c827f62 Fix: prevent published date reset when editing videos and show edited status
Prioritize `published_at` metadata over event `created_at` timestamp.
Backfill `published_at` during edit if missing to preserve original date.
Add "(edited)" label to video cards for modified content.
Display "Last Edited: [Date]" on video player modal.
2026-01-12 15:35:23 +00:00
thePR0M3TH3AN 1ef8459fd6 Merge pull request #1190 from PR0M3TH3AN/fix/subscriptions-spinner-loop-7605323922858832929
Fix infinite spinner loop on Subscriptions tab updates
2026-01-12 09:00:15 -05:00
google-labs-jules[bot] fa23ffb53c fix(subscriptions): prevent spinner loop on background refresh 2026-01-12 13:52:14 +00:00
thePR0M3TH3AN 0bcee151cb Merge pull request #1189 from PR0M3TH3AN/fix-subscription-spinner-hang-134888602482071504
Fix infinite subscription loading spinner
2026-01-11 19:11:39 -05:00
google-labs-jules[bot] 8a61acb09c Add debug logging to trace subscription loading hang 2026-01-12 00:10:04 +00:00
google-labs-jules[bot] fdf8815792 Fix subscriptions loading hang by removing undefined constant and cleaning up debug logs 2026-01-11 23:42:16 +00:00
google-labs-jules[bot] e63ca6eee3 Fix infinite spinner in Subscriptions tab by correcting method context in NostrService and improving error resilience. 2026-01-11 22:13:36 +00:00
thePR0M3TH3AN 0fc78fefb8 Merge pull request #1187 from PR0M3TH3AN/fix-anon-moderation-threshold-5216028150136921299
Fix anonymous users being blocked by a single trusted mute
2026-01-11 16:44:28 -05:00
google-labs-jules[bot] c1779fba78 fix(moderation): enforce mute threshold for anonymous users 2026-01-11 21:43:02 +00:00
thePR0M3TH3AN c4618c307b Merge pull request #1186 from PR0M3TH3AN/update-trusted-mute-hide-threshold-default-3010307860608800344
Increase default trusted mute hide threshold to 20
2026-01-11 16:31:27 -05:00
google-labs-jules[bot] 85883aa5c6 feat: increase default trusted mute hide threshold to 20
- Updated `DEFAULT_TRUSTED_MUTE_HIDE_THRESHOLD` in `config/instance-config.js` from 1 to 20.
- Updated `tests/moderation/trusted-mute-lists.test.mjs` to explicitly override the threshold to 1 for tests verifying the hide mechanism.
- Updated documentation (`docs/moderation/*.md`, `docs/instance-config.md`, `content/community-guidelines.md`) to reflect the new default and upstream examples.
- Verified that existing blurring logic in `js/feedEngine/stages.js` and `js/ui/components/VideoCard.js` handles the intermediate state (1-19 mutes) correctly.
2026-01-11 21:30:23 +00:00