Commit Graph

4447 Commits

Author SHA1 Message Date
Alex Gleason 6180bbf0c3 Fix 30 ESLint errors: remove unused imports/variables, replace any types, use const 2026-02-19 20:14:01 -06:00
Alex Gleason be7cfbab67 Render NIP-30 custom emoji in display names, post text, and bios
Add emojify/EmojifiedText utilities that replace :shortcode: patterns with
inline images using emoji tags from kind 0 and kind 1 events. Applied to
display names across NoteCard, PostDetailPage, ProfilePage, ProfileHoverCard,
InteractionsModal, NotificationsPage, and NoteContent @mentions. Also
emojifies about/bio text in ProfilePage and ProfileHoverCard.

Remove string-level truncation from getDisplayName to avoid breaking
shortcodes mid-pattern (CSS truncate handles visual overflow). Use
em-relative sizing and align-text-bottom for proper inline alignment.
2026-02-19 19:06:14 -06:00
Alex Gleason 7e3f104ace Fix NIP-30 custom emoji reactions rendering as raw :shortcode: text
Custom emoji reactions from kind 7 events with emoji tags were displaying
the raw shortcode text (e.g., ':soapbox:') instead of rendering the image.
Add custom emoji resolution throughout the reaction pipeline: data hooks
now extract emoji URLs from event tags, and all rendering locations
(ReactionButton, PostDetailPage stats, InteractionsModal, Notifications)
now display custom emojis as inline images.
2026-02-19 18:39:43 -06:00
Chad Curtis d58f4bb632 Resolve raw hex identifiers as event ID or pubkey in search and routing
Detect 64-char hex strings in the search bar and NIP19Page route.
Query relays to check if the hex is an event ID first, then fall back
to treating it as a pubkey if a kind-0 profile is found.
2026-02-19 18:17:56 -06:00
Chad Curtis 8fe07e65cc Add Nostr identifier detection in search and profile search, improve DomainFeedPage header
Detect NIP-19 and NIP-05 identifiers in the search bar and profile
search dropdown, navigating directly to the appropriate route instead
of performing a text search. Refactor DomainFeedPage header to use
back navigation, show user count inline, and match border styling.
2026-02-19 18:13:17 -06:00
Chad Curtis 223d8822a4 Fix NIP-05 resolution for leading @ prefix and case-insensitive name lookup 2026-02-19 18:08:01 -06:00
Chad Curtis 3e7ba143f9 Add user-configurable settings for Blossom servers, zap comment, favicon provider, CORS proxy, and NIP-46 relays
- Add blossomServers (array), defaultZapComment, faviconProvider, corsProxy to AppConfig
- Blossom servers: multi-server support with add/remove UI matching relay list pattern
- Default zap comment changed from 'Zapped with MKStack!' to 'Zapped with Mew!'
- NIP-46 nostrconnect now uses the user's write relay list instead of hardcoded relay
- CORS proxy and favicon provider use {href} URI template pattern
- New 'System' section in Advanced Settings for zap comment, favicon provider, CORS proxy
- Fix ghost button hover text color on light/pink themes across settings panels
- Fix pre-existing TSC errors: appRelays array typing, muteHelpers dead code, ProfilePage FeedItem type, EditProfileForm useFieldArray, FeedSettingsForm/ContentSettings feedKey narrowing, LeftSidebar icon type
2026-02-19 17:51:51 -06:00
Chad Curtis 325e1b9be1 Remove verified badge, use brain icon for difficulty, put terrain next to difficulty 2026-02-19 17:11:38 -06:00
Chad Curtis a8b8243868 Use NoteContent for rich text rendering in polls and fix word-break overflow 2026-02-19 17:10:23 -06:00
Chad Curtis 4fd50d545f Remove sticky positioning from extra kind page headers 2026-02-19 17:06:32 -06:00
Chad Curtis 54b27e4c09 Include extra kinds in profile media grid, extract vine URLs from imeta tags 2026-02-19 17:05:05 -06:00
Chad Curtis 448c051e33 Include media-native kinds like vines in profile media tab filter 2026-02-19 17:02:28 -06:00
Chad Curtis 09d722ddd2 Add object-cover to VideoPlayer to fill container without borders 2026-02-19 17:00:36 -06:00
Chad Curtis 95c3a5accc Fix desktop compose to open modal, cache right sidebar data, render vine videos on detail page 2026-02-19 16:54:16 -06:00
Chad Curtis f125abeef8 Restore avatar in compact ComposeBox feed view 2026-02-19 16:42:25 -06:00
Chad Curtis 9f6022e5e9 Render link previews for end-of-line URLs, skeleton load notifications, use ImageGallery, match mobile tab heights
- Show link preview cards for URLs that end a line, not just standalone
  URLs; only suppress previews for URLs followed by more text on the
  same line
- Show skeleton placeholders on notifications page until the query has
  completed at least once instead of flashing 'No notifications yet'
- Add skeleton loading for author rows in notification cards while
  profile data loads
- Replace inline image <a> tags with ImageGallery component so clicking
  images opens the lightbox with navigation
- Match notification tab height/weight to feed tabs on mobile while
  preserving original desktop styling
2026-02-19 16:39:13 -06:00
Chad Curtis a484c8b95c Delay stats invalidation after publish to preserve optimistic updates
The relay needs time to index newly published events. Immediate
invalidation caused a refetch that returned stale counts, overwriting
the optimistic +1 and making the count briefly appear then vanish.
2026-02-19 16:21:14 -06:00
Chad Curtis 35422ec6bb Fix optimistic updates, show user reaction emoji, compact embeds, and unify repost menu
- Add true optimistic updates for reactions and reposts via setQueryData
  instead of only invalidating queries after publish
- Track user's own reaction per event and display their emoji in place of
  the Heart icon across feed, post details, and notifications
- Strip whitespace around block embeds and skipped media URLs to eliminate
  blank lines caused by whitespace-pre-wrap
- Only render link preview cards for standalone URLs; inline URLs in
  sentences render as plain clickable links
- Remove border-b separators and use fixed-height object-cover on preview
  images to eliminate gaps
- Tighten padding on EmbeddedNote and EmbeddedNaddr cards
- Use fixed-height object-cover for ImageGallery grid images
- Unify RepostMenu to use Popover on all screen sizes instead of Drawer
  on mobile
2026-02-19 16:19:19 -06:00
Chad Curtis 7aad043734 Replace Repeat2 with custom RepostIcon, style repost/treasure action headers 2026-02-19 16:04:16 -06:00
Chad Curtis ec8e71cb70 Fix action header height — use w-11 instead of size-11 for icon container 2026-02-19 15:48:29 -06:00
Chad Curtis b0ac1180dd Align repost/treasure action text with username column, icon in avatar column 2026-02-19 15:46:57 -06:00
Chad Curtis 1bc069a7bd Fix sticky page titles on mobile for bookmarks and kind feed pages 2026-02-19 15:43:05 -06:00
Chad Curtis aa231797af Add NIP-05 domain feeds, profile hover cards, gallery lightbox, and NIP-05 profile URLs
- Domain feed page at /timeline/:domain fetches .well-known/nostr.json and queries events from domain users
- NIP-05 domains are clickable in usernames throughout the app (Nip05Badge, NoteCard, PostDetailPage, etc.)
- @_@domain.com renders as @domain.com (underscore prefix hidden)
- Profile hover cards on avatars, usernames, and mentions across all components
- Clicking avatar/banner on profile page opens image in gallery lightbox with safe-area support
- NIP-05 verified users get clean profile URLs (e.g. /user@domain.com) instead of /npub1...
- NIP19Page unified dispatcher handles NIP-19, NIP-05, and profile routing at /:param
- Removed /u/:npub and /d/:domain routes in favor of root-level routing
- CORS proxy fallback for NIP-05 resolution on non-CORS-compliant servers
- Mobile top bar logo links to home
- Safe area fixes for gallery lightbox, mobile drawer, and sheet close button
2026-02-19 15:37:53 -06:00
Chad Curtis e9331a4a6c Move notification polling to native Java with AlarmManager
Replace JS WebView-based polling with pure native implementation:
- NostrPoller: Java WebSocket client that queries Nostr relays directly via OkHttp
- PollAlarmReceiver: AlarmManager fires every 60s, acquires WakeLock, runs native poll
- NotificationService: foreground service keeps process alive, schedules alarms
- MewNotificationPlugin: Capacitor plugin passes pubkey/relays from JS to SharedPreferences
- Remove notificationService.ts (all polling logic now in Java)
- Simplify useNativeNotifications to only configure native service + handle permissions
2026-02-19 12:10:13 -06:00
Chad Curtis 64726d2cf7 Add local WebSocket notification polling and Mew splash/notification icons
- Implement Signal-like local-only notifications via direct WebSocket relay polling
- Poll every 60s foreground, 15min background, no external push server
- Resolve NIP-05 display names for notification body (e.g. 'alice@nostr.com reacted to your post')
- Add Capacitor LocalNotifications plugin with POST_NOTIFICATIONS permission
- Replace default Capacitor splash with Mew logo PNG on dark background using Android 12 Theme.SplashScreen
- Add ic_stat_mew vector drawable for notification small icon
- Regenerate splash PNGs with #14161f background
2026-02-19 10:40:38 -06:00
Chad Curtis 9d6cfdd4ef Fix Search and Settings page sticky behavior and transparency
SearchPage:
- Change tabs background from bg-background/95 to bg-background/80 (matches Feed/Notifications)
- Remove autoFocus from search inputs to prevent page jump on click
- Change z-index from z-20 to z-10 (consistent with other pages)

SettingsPage:
- Remove sticky from Settings header (title and description)
- Keep only tabs sticky
- Change tabs background from bg-background/95 to bg-background/80
- Header now scrolls out of view naturally, tabs remain sticky
2026-02-19 08:07:40 -06:00
Chad Curtis 780271f3c1 Fix sticky headers to use top-mobile-bar pattern
- Change STICKY_HEADER_CLASS to use 'top-mobile-bar sidebar:top-0'
- Matches the pattern used in Feed and NotificationsPage
- On mobile: sticky tabs position below the MobileTopBar (accounting for safe area)
- On desktop: sticky tabs position at top-0 (no top bar on desktop)
- Fixes issue where safe-area-top created unwanted space above tabs
2026-02-19 08:03:08 -06:00
Chad Curtis 40b1c1c182 Add safe-area-top to sticky headers
- Update STICKY_HEADER_CLASS constant to include safe-area-top
- Fixes sticky tabs in Search and Settings pages on mobile
- Ensures sticky headers respect device notches and status bars
- Feed and NotificationsPage already use top-mobile-bar which includes safe area
2026-02-19 07:58:45 -06:00
Chad Curtis 7ccac3d311 Fix NIP-85 default key overflow in advanced settings
- Add break-all utility to default pubkey text
- Prevents long hex string from overflowing on mobile screens
2026-02-19 07:55:22 -06:00
Chad Curtis 49c493d2fa Fix safe area padding in mobile drawer
- Add safe area top padding to Sheet close button (X icon)
- Add safe area bottom padding to theme toggle section
- Ensures UI elements don't overlap with device notches/navigation bars
2026-02-19 07:54:34 -06:00
Chad Curtis 8fc7dff792 Fix mobile APK issues: sticky headers and video playback
- Make headers sticky on all screen sizes (not just desktop)
- Add sticky positioning to settings tabs
- Add webkit-playsinline and x-webkit-airplay attributes for better mobile video support
2026-02-19 07:52:59 -06:00
shakespeare.diy 77993c4f74 Add safe area padding to mobile drawer menu
- Added safe-area-top to user profile header in mobile drawer
- Prevents content from being clipped behind status bar in APK
- Only applies to logged-in state header

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:47:07 -06:00
shakespeare.diy 725894b590 Fix sticky tabs going behind mobile top bar in APK
- Created top-mobile-bar utility class for sticky elements below mobile top bar
- Accounts for 48px bar height + safe-area-inset-top
- Updated Feed component tabs to use top-mobile-bar on mobile
- Updated NotificationsPage tabs to use top-mobile-bar on mobile
- Tabs now stick below the top bar instead of behind it

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:46:27 -06:00
shakespeare.diy 97eb13379b Fix mobile top bar safe area padding structure
- Wrapped content in inner div to separate safe area padding from content height
- safe-area-top now adds padding to outer header
- Inner flex container maintains h-12 for actual content
- Prevents content from being pushed into status bar area

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:40:12 -06:00
shakespeare.diy 08c117efd6 Mobile nav fix
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:35:36 -06:00
shakespeare.diy f27af5e525 Keep original stats size on desktop, compact on mobile
- Use responsive classes: text-xs sidebar:text-sm
- Use responsive padding: py-2 sidebar:py-2.5
- Use responsive margin: mt-2 sidebar:mt-3
- Mobile gets compact view, desktop keeps original size

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:31:08 -06:00
shakespeare.diy 619694b927 Make post detail stats section more compact on mobile
- Reduced text size from text-sm to text-xs
- Reduced padding from py-2.5 to py-2
- Reduced margin from mt-3 to mt-2
- Makes stats row take up less vertical space

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:30:18 -06:00
shakespeare.diy 3bd9a36e3b Use NoteCard's NIP-05 rendering pattern in PostDetailPage
- Removed Nip05Badge component usage in PostDetailPage
- Replaced with direct inline rendering like NoteCard does
- Ensures consistent truncation behavior across all views
- All NIP-05 displays now use the same DRY pattern

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:29:27 -06:00
shakespeare.diy b1dd7a2b58 Fix NIP-05 truncation in post details
- Added min-w-0 and overflow-hidden to parent container
- Fixed Nip05Badge component to properly support truncation
- Made favicon shrink-0 to prevent it from being truncated
- Wrapped Nip05Badge in min-w-0 container in PostDetailPage

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:28:28 -06:00
shakespeare.diy d248e46139 Fix username truncation and safe area issues
- Created getDisplayName utility to DRY up display name logic with automatic truncation
- Updated NoteCard and PostDetailPage to use getDisplayName utility
- Fixed top bar positioning in Capacitor APK with proper safe area insets
- Fixed FAB positioning to sit above bottom nav with safe area compensation
- Added safe-area-inset utilities for better mobile positioning control

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:27:04 -06:00
shakespeare.diy e085fd22e1 Match bottom mobile nav transparency to top bar (bg-background/80)
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:10:53 -06:00
shakespeare.diy 250e595425 Add right padding to NIP-05 line for consistent margins
- Added pr-2 to make truncation happen earlier
- Creates better visual balance with left padding

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:09:51 -06:00
shakespeare.diy 829be50214 Match Ditto's NIP-05 layout exactly
- NIP-05 text, favicon, dot, and timestamp all on same line
- Only NIP-05 text truncates, favicon and timestamp never cut off
- Added whitespace-nowrap to timestamp
- Removed Nip05Badge component, using inline layout instead

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:08:32 -06:00
shakespeare.diy a0696dc3f9 Restore favicon in NIP-05 badge
- Brought back Nip05Badge component with favicon
- NIP-05 still truncates properly with overflow-hidden on parent

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:05:51 -06:00
shakespeare.diy 83d7c810ec Fix NIP-05 truncation in NoteCard
- Display name and NIP-05 on separate lines (matching Ditto)
- NIP-05 now truncates properly with overflow-hidden
- Added truncate to repost and treasure headers
- Removed favicon from inline NIP-05 display

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:04:33 -06:00
shakespeare.diy 940d25f8e4 Fix overflow from long unbroken strings in NoteCard
- Added break-words and overflow-hidden to content containers
- Long URLs, mentions, and unbroken strings now wrap properly
- Applied fix to both regular note content and vine titles
- Prevents horizontal overflow breaking card layout

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 07:00:46 -06:00
shakespeare.diy a25cbf54c7 Fix reaction hover behavior and limit FAB to feed page
- Added timeout-based hover management for reaction quick menu
- Menu now closes smoothly when mouse leaves both button and menu
- 150ms delay allows user to move from button to menu seamlessly
- FAB now only appears on the feed page (Index)
- Added showFAB prop to MainLayout for conditional rendering

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 06:58:41 -06:00
shakespeare.diy 5357e13029 Move Edit/Preview toggle to top of inline ComposeBox
- Preview toggle now appears at top-right when in feed view
- Removed toggle from bottom toolbar
- Cleaner layout with toggle positioned above compose area
- Only shown when content has previewable elements

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 06:56:39 -06:00
shakespeare.diy 1edf3f119e Hide avatar in compact ComposeBox mode
- Avatar now hidden when compact=true (mobile feed view)
- Removes leading space on mobile compose area
- Avatar still shows in expanded/modal views

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 06:54:27 -06:00
shakespeare.diy f43132b656 Remove border between modal title and content
- Removed border-b from modal header for cleaner look

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-19 06:53:14 -06:00