Commit Graph

4447 Commits

Author SHA1 Message Date
Chad Curtis 725f06980c Fix black screens on Vines by using native video poster= attribute
Replace the manual thumbnail <img> overlay with the browser-native
poster= attribute on the <video> element. The browser renders the
poster immediately before any video data is fetched, even on cards
with preload=none, eliminating black frames during fast scrolling.

Also changes the card background from pure black to neutral-900 as
a subtle fallback for vines with no thumbnail.
2026-03-01 14:00:22 -06:00
Alex Gleason e7b2fc2eb6 Merge branch 'main' of gitlab.com:soapbox-pub/ditto 2026-03-01 13:56:48 -06:00
Alex Gleason d0b49e78b6 Add appId/client config, use appName for client tags and zap comments
- Remove defaultZapComment config; derive from appName instead
- Add appId (string) for NIP-78 d-tag prefixes (e.g. ${appId}/metadata)
- Add client (optional NIP-89 addr) as third element of client tags
- Update useNostrPublish and useEncryptedSettings to use config.appName
  and config.client for client tags instead of location.hostname
- Replace hardcoded 'ditto-metadata' d-tag with ${config.appId}/metadata
- Remove Default Zap Comment setting from AdvancedSettings UI
2026-03-01 13:44:31 -06:00
Chad Curtis 4bae1cdf31 fix(layout): remove min-h-screen from main wrapper to prevent outer-page scroll on vines 2026-03-01 13:41:49 -06:00
Chad Curtis e5a7a7c121 fix(vines): remove double-subtraction of tab bar height in loading/empty states 2026-03-01 13:30:23 -06:00
Chad Curtis ede8aa28e0 fix(vines): correct mobile height for safe-area-inset and preload adjacent videos
- Add .vine-slide-height CSS utility that subtracts env(safe-area-inset-top/bottom) so slides don't bleed under the bottom nav on PWA/APK with home indicator
- Replace all hardcoded calc(100dvh-9.5rem) vine heights with the new utility
- Preload active video with 'auto', adjacent (±1) with 'metadata', and far-away cards with 'none' to speed up video playback on swipe without wasting mobile bandwidth
2026-03-01 13:28:01 -06:00
Mary Kate Fain c41405a0ee Show reply context on self-replies in feed
When replying to your own post, the compose box excludes your pubkey
from p tags. This left self-replies with no 'Replying to' context,
making them look like top-level posts. Now falls back to the parent
e-tag author hint or the event author itself so self-replies always
show thread context.

Closes #3
2026-03-01 12:58:14 -06:00
Mary Kate Fain 081d890e41 Fix reply modal overflowing viewport on long posts
Make the embedded parent post scrollable and cap the dialog at 85vh
so the compose area and submit button always remain visible.
2026-03-01 12:56:20 -06:00
Mary Kate Fain 53ae99ab7f Show back-to-settings arrow on Vibe page for all screen sizes 2026-03-01 12:53:25 -06:00
Mary Kate Fain b63bfefd3a Replace Scroll icon with Settings cog icon for settings 2026-03-01 12:51:55 -06:00
Mary Kate Fain ef52de24f4 Update footer link to 'Edit Ditto with Shakespeare' with clone URL 2026-03-01 12:48:35 -06:00
Alex Gleason 5349ed4487 Unify sidebar item registry, removing built-in vs extra-kind distinction
Replace the dual-registry system (BUILTIN_SIDEBAR_ITEMS in useFeedSettings
+ EXTRA_KINDS in extraKinds) with a single SIDEBAR_ITEMS array in
sidebarItems.tsx. Every sidebar-capable item now has a consistent shape:
id, label, path, icon, and optional requiresAuth.

- Delete extraKindIcons.ts; icons now live in the SIDEBAR_ITEMS registry
- Remove BUILTIN_SIDEBAR_ITEMS, isBuiltinItem, getBuiltinItem, EXTRA_KIND_IDS
  from useFeedSettings.ts; validation uses SIDEBAR_ITEM_IDS
- Remove HiddenSidebarItem.builtin field (was never read by consumers)
- Simplify SidebarNavItem.tsx (no more dual icon map lookup)
- All consumers now import sidebarItemIcon from @/lib/sidebarItems
- ExtraKindDef/EXTRA_KINDS unchanged (still used for feed/content settings)
2026-03-01 12:44:02 -06:00
Alex Gleason 0ef228ee1a Make sidebarOrder the sole source of truth for sidebar visibility
Previously, extra-kind items in sidebarOrder were silently dropped
unless their corresponding feedSettings showKey was also enabled.
This made it impossible to add items like 'webxdc' to the sidebar
via build config alone.

Now computeOrderedItems uses sidebarOrder directly — any recognized
item (built-in or extra-kind with a route) present in the array is
shown. addToSidebar/removeFromSidebar no longer toggle feedSettings
showKey values, keeping sidebar config and feed settings independent.
2026-03-01 12:08:43 -06:00
Chad Curtis 00a4ee2976 Vines: taller desktop tabs matching notifications, more top padding on replies sidebar 2026-03-01 05:34:25 -06:00
Chad Curtis 6bceb98b8f Vines: skeleton loading state, hide play button during autoplay, persistent poster overlay to prevent black flash 2026-03-01 05:31:59 -06:00
Chad Curtis 1275361a79 Fix lint errors: remove unused vinesDef and encodeVineId/nip19 2026-03-01 05:27:48 -06:00
Chad Curtis b44ad2c050 Fix mobile comments: fixed overlay below top bar, lock body scroll/touch on open 2026-03-01 05:25:29 -06:00
Chad Curtis 20e3542825 Remove replies header, bake back button into compose on mobile comments 2026-03-01 05:22:20 -06:00
Chad Curtis 5511b10b25 Mobile vines comments: replace Comment button with ComposeBox at top of list 2026-03-01 05:21:32 -06:00
Chad Curtis a1f21bab51 Increase left-right padding on lightning invoice modal 2026-03-01 05:20:25 -06:00
Chad Curtis 7386fbbfd0 Increase lightning QR code size slightly 2026-03-01 05:19:55 -06:00
Chad Curtis 5852036613 Shrink lightning QR code for small screens like iPhone SE 2026-03-01 05:19:24 -06:00
Chad Curtis 789925bc30 Add bottom padding below lightning invoice hint text 2026-03-01 05:18:45 -06:00
Chad Curtis 7352f61ced Mobile comments overlay: match tab bar blur/opacity, fix comment icon strokeWidth 2026-03-01 05:18:06 -06:00
Chad Curtis 6e4561bea3 Mobile vine comments: replace drawer with full-screen overlay panel 2026-03-01 05:16:43 -06:00
Chad Curtis 692b79a66e Vines sidebar: add Replies header, deduplicate comments, fix desktop/mobile comment flow 2026-03-01 05:14:55 -06:00
Chad Curtis 285708f525 Fix reaction button missing background circle on vines page 2026-03-01 05:09:27 -06:00
Chad Curtis 1c21c847e0 Use only kind 1111 NIP-22 comments for vines, fix duplicate comment from dual query 2026-03-01 05:05:54 -06:00
Chad Curtis aef686a0d4 Fix vines: uniform action button counts, fetch kind 1 and kind 1111 comments 2026-03-01 05:04:49 -06:00
Chad Curtis c2ea381275 Fix vines page: deduplicate reaction count, mobile comments sheet, remove sidebar header, ComposeBox for comments 2026-03-01 05:02:22 -06:00
Chad Curtis 71d08aadd1 Show profile card in reply modal and correct title for kind 0 wall posts
ReplyComposeModal now renders ProfilePreview instead of raw JSON content
when the reply target is a kind 0 event, and titles the modal 'Comment on
profile' rather than 'Reply to post'.
2026-03-01 04:05:26 -06:00
Chad Curtis c56bd6f8fd Remove useComments from wall tab, build sub-reply tree from wallComments
The extra useComments(wallReplyTarget, 500) call was fetching up to 500
sub-replies from any author, bypassing the follow-list filter. Instead,
partition the already-fetched wallComments into top-level vs sub-replies
using the NIP-22 lowercase 'a' tag, then build the parent→children map
in-memory — no extra network request needed.
2026-03-01 04:02:54 -06:00
Chad Curtis 99b5df9ec4 Fix sub-replies appearing as top-level wall comments
useWallComments queries #A (uppercase root tag) which returns all depth
levels per NIP-22, not just top-level comments. Filter orderedWallReplies
to only events whose lowercase 'a' tag points directly at the kind-0 root,
matching how useComments.topLevelComments works for other pages.
2026-03-01 04:01:59 -06:00
Chad Curtis 525317fe49 DRY up wall and reply rendering with ThreadedReplyList component
Extract shared ThreadedReplyList component and use it in PostDetailPage,
ExternalContentPage, and ProfilePage wall tab. Wall comments now also fetch
sub-replies via useComments so they render with the same threaded/threadedLast
connector-line pairing as replies.
2026-03-01 04:01:01 -06:00
Chad Curtis bc08f6d7de Query profile user's NIP-65 write relays for their feed
Add useProfileWriteRelays hook that fetches a user's kind 10002 relay list
and extracts their write relays. useProfileFeed now routes feed queries
directly to those relays instead of the default pool, giving a more complete
view of the user's posts from the relays they actually publish to.
2026-03-01 03:45:31 -06:00
Chad Curtis a6d4de7fbe Fix NIP-05 profile not loading on hard refresh
Use isPending instead of isLoading for the NIP-05 resolution loading guard.
In React Query v5, isLoading = isPending && isFetching, which is false on
the very first render before the fetch fires (fetchStatus: 'idle'). This
caused ProfilePage to immediately show 'User not found' on hard refresh
before the NIP-05 lookup even started.
2026-03-01 03:36:25 -06:00
Chad Curtis c1f3cca496 Retry missing kind 0 profiles against loser relays after relay race
After the relay race resolves (first EOSE + 100ms eoseTimeout), any pubkeys
whose kind 0 profile was not found are collected and re-queried in a second
batched request. This gives slower relays—the ones that lost the initial
race—a full chance to return profiles they have stored.
2026-03-01 03:29:30 -06:00
Chad Curtis 4ae1613d58 fix: clear notification dot immediately when marking notifications as read 2026-03-01 02:59:30 -06:00
Chad Curtis 919c57dec0 Batch replaceable queries across pubkeys by grouping on kind-set 2026-03-01 02:56:19 -06:00
Chad Curtis 2672116f27 Batch replaceable-kind queries by pubkey into single REQ in NostrBatcher 2026-03-01 02:51:23 -06:00
Chad Curtis fe7cdc3eff Batch kinds 0, 3, 10000 into single REQ in useFollowList 2026-03-01 02:40:44 -06:00
Chad Curtis cceae7fed3 Fix duplicate notifications REQ caused by cursor in query key 2026-03-01 02:35:58 -06:00
Chad Curtis 6eb2672828 Deduplicate kind 10002 relay list fetch between useInitialSync and NostrSync 2026-03-01 02:31:32 -06:00
Chad Curtis 8ef3b7f635 Batch kind 6/16 repost checks, prefer newest kind 0, don't cache missing profiles 2026-03-01 02:26:40 -06:00
Chad Curtis ea824fb6ca Fix notification toggle disabled on Android: treat native platform as always supported
The settings page checked for the browser Notification API to determine
support, but Android WebView doesn't expose that API. The Java foreground
service handles notifications natively, so the check was wrong — it showed
'not supported' and disabled the toggle on every APK install.
2026-03-01 07:15:03 +00:00
Chad Curtis c389ab98df Add audio to post detail, volume slider, and theme-aware audio visualizer
- Render audio in PostDetailPage (was only rendering in feed NoteCard)
- Add volume slider to VideoPlayer and AudioVisualizer (hover to reveal)
- Move shared volume state and handlers into usePlayerControls
- Replace hardcoded purple canvas colors with hsl(var(--primary))
- Replace bg-black with bg-background on AudioVisualizer container
2026-03-01 00:36:32 -06:00
Chad Curtis 4557326847 Fix ternary used as statement in AudioVisualizer togglePlay 2026-02-28 23:45:26 -06:00
Chad Curtis e1e5bbe696 Render audio uploads as video-style visualizer with avatar and sinewave
- Add AudioVisualizer component: mirrors VideoPlayer chrome exactly (same overlay controls, progress bar, hide-on-idle, scroll-pause) with a canvas sinewave and author avatar in the centre
- Wire audio into NoteCard (kind 1 notes), FileMetadataContent (kind 1063), and ComposeBox preview
- Extract shared utilities: formatTime, usePlayerControls hook, and mediaUrls (regexes + mimeFromExt) to eliminate duplication across VideoPlayer, AudioVisualizer, NoteCard, NoteContent, ComposeBox, and EmbeddedNote
- Fix ComposeBox: audio URLs now get correct imeta MIME tags and are excluded from link-embed detection
2026-02-28 23:35:17 -06:00
Chad Curtis 3c574d4194 Remove section header icons from App Relays, Your Relays, and Blossom Servers 2026-02-28 23:13:03 -06:00
Chad Curtis ca96093b65 Redesign NotificationSettings to match Advanced page style 2026-02-28 23:11:53 -06:00