Commit Graph

1317 Commits

Author SHA1 Message Date
Alex Gleason f58a0ceed4 Use avatar with emoji badge overlay for reaction cards in threads
Replace the standalone emoji bubble with the user's normal avatar plus a
small reaction emoji badge at the bottom-right corner. This keeps the
avatar column aligned with other threaded posts while still making the
reaction visually distinct.
2026-03-01 20:18:10 -06:00
Alex Gleason e6c971827b Flatten reaction card to a single-line layout for better vertical alignment
Move timestamp inline with name and remove the second row, so the emoji
bubble, avatar, name, 'reacted' label, and timestamp all sit on one line.
2026-03-01 20:14:25 -06:00
Alex Gleason aaae6b5893 Fix reaction emoji bubble alignment to match ancestor thread avatar column
Use size-10 in PostDetailContent to align with the threaded ancestor's
size-10 avatar, preventing a 4px horizontal offset of the thread line.
2026-03-01 20:12:34 -06:00
Alex Gleason 07a25874ae Render kind 7 reaction events as compact activity cards instead of posts
Reaction events now display with a prominent emoji bubble, small inline
avatar, author name, and 'reacted' label — making them visually distinct
from regular posts in both thread ancestors and standalone detail views.
2026-03-01 20:08:46 -06:00
Alex Gleason 616c2db094 Fix ditto-mew gitlab links 2026-03-01 20:03:26 -06:00
Alex Gleason 6033ed673d Add undo button to theme applied toast and allow clicking own themes 2026-03-01 18:30:51 -06:00
Alex Gleason c6ccdd3e31 Make theme mockup click-to-apply instead of copy button with redirect 2026-03-01 18:26:52 -06:00
Alex Gleason 817a0077cf Add AI Chat as a sidebar item
Registers 'ai-chat' in SIDEBAR_ITEMS with the Bot icon, linking to
/ai-chat. Requires authentication since the Shakespeare API needs a
logged-in Nostr account.
2026-03-01 18:18:08 -06:00
Alex Gleason d109e63740 Expand set_theme tool to support full ThemeConfig (colors, font, background)
The tool now accepts the complete theme configuration:
- Colors (required): background, text, primary as HSL strings
- Font (optional): any of the 17 bundled font families
- Background image (optional): URL with cover/tile mode

The system prompt, tool executor, and badge UI are all updated to
reflect the richer theme capabilities.
2026-03-01 18:15:19 -06:00
Alex Gleason db6d0ec721 Change set_theme tool to apply custom themes via CoreThemeColors
The tool now accepts background, text, and primary as HSL color strings
and calls applyCustomTheme to set a fully custom theme, rather than
just switching between light/dark/system presets.
2026-03-01 18:08:12 -06:00
Alex Gleason b6256ed03d Add AI chat page with theme-setting tool
Adds /ai-chat route with a Shakespeare AI chat interface that supports
OpenAI-compatible tool calling. Includes a set_theme tool that lets the
AI switch between light, dark, and system themes on the user's behalf.
2026-03-01 18:03:06 -06:00
Alex Gleason 3cb0ea7368 Add sort:hot to hashtag feed via Ditto relay NIP-50 search 2026-03-01 17:55:27 -06:00
Alex Gleason 477257325c mew -> ditto 2026-03-01 17:50:50 -06:00
Alex Gleason d531bf0ec0 Add README with project overview, setup, and deployment instructions 2026-03-01 17:45:30 -06:00
Alex Gleason 0107998856 Replace hardcoded TRENDS_PUBKEY with config.nip85StatsPubkey in useTrending hooks 2026-03-01 17:37:35 -06:00
Chad Curtis 060f2c4628 Merge branch 'feat/nip-a0-voice-messages' into 'main'
Add NIP-A0 voice message support (kind 1222/1244)

See merge request soapbox-pub/ditto!19
2026-03-01 22:48:19 +00:00
Derek Ross b9301d4ad6 Include voice message kinds in reply, comment, and notification queries
Kind 1222 (voice reply to kind 1) was missing from useReplies, and
kind 1244 (NIP-22 voice reply) was missing from useComments. Voice
messages were published correctly but never appeared because query
filters didn't include their kinds.

- useReplies: [1] -> [1, 1222]
- useComments: [1111] -> [1111, 1244]
- useWallComments: [1111] -> [1111, 1244]
- VinesFeedPage: [1111] -> [1111, 1244]
- useNotifications: added 1222, 1244
- useHasUnreadNotifications: added 1222, 1244
- useNativeNotifications: added 1222, 1244 with 'New voice message' title
2026-03-01 17:38:01 -05:00
Derek Ross c14241832d Replace avatar play button with dedicated play/pause button in VoiceMessagePlayer
The avatar was confusing as a dual-purpose element. Now uses a clean
circular play/pause button with primary color theming, separate from
the author info already shown by NoteCard's header.
2026-03-01 17:32:33 -05:00
Chad Curtis 41807e677e Remove NIP-65 write relay lookup from profile feed
Simplifies useProfileFeed by removing the useProfileWriteRelays hook
and always querying the default pool instead of the user's write relays.
2026-03-01 21:46:29 +00:00
Derek Ross 239d958e1f Add NIP-A0 voice message support (kind 1222/1244)
Implement recording, publishing, and rendering of NIP-A0 voice messages:

- VoiceMessagePlayer: compact waveform bar player when imeta waveform
  data is available, falls back to existing AudioVisualizer sinewave
- useVoiceRecorder: MediaRecorder hook with real-time amplitude capture,
  60s max duration, and waveform sampling for NIP-A0 imeta tags
- ComposeBox: mic button in toolbar with recording UI (live waveform,
  timer, cancel/send controls), publishes kind 1222 (root) or 1244
  (NIP-22 reply) with imeta waveform and duration fields
- NoteCard + PostDetailPage: render kind 1222/1244 via VoiceMessagePlayer
- Feed settings: voice messages registered in Other Stuff > Media with
  feed toggle (feedIncludeVoiceMessages), defaults to off
2026-03-01 16:36:14 -05:00
Mary Kate Fain f729b07202 Fix NoteMoreMenu dialog overflowing viewport on long posts
Cap the dialog at 85dvh with overflow-y-auto so it scrolls when
content is tall. Also add a hard max-h on the post preview text
to prevent line-clamp-3 failures with nested block elements from
NoteContent.
2026-03-01 14:05:34 -06:00
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