Commit Graph

822 Commits

Author SHA1 Message Date
Chad Curtis e2f94de1a2 Fix adaptive icon: use committed launcher PNG instead of broken foreground vector 2026-02-24 10:10:55 -06:00
Chad Curtis 4abe62962d Commit launcher PNGs directly, remove from CI generation 2026-02-24 06:11:54 -06:00
Chad Curtis f18a64cb08 Use inkscape instead of rsvg-convert for SVG rendering 2026-02-24 05:05:54 -06:00
Chad Curtis 4f31b57d12 Fix icon branding: white SVG recolor, new logo notification icon, splash uses vector 2026-02-24 04:11:45 -06:00
Chad Curtis bcc04c0777 Add GitLab release job with APK download link 2026-02-24 03:54:02 -06:00
Chad Curtis b184de5ae1 Remove unsupported destkeypass from PKCS12 keystore migration 2026-02-24 03:42:36 -06:00
Chad Curtis 0c50d7a09f Migrate keystore JKS->PKCS12 at build time for Gradle compatibility 2026-02-24 03:34:02 -06:00
Chad Curtis 56205eb13b Add keystore debug output to CI 2026-02-24 03:30:34 -06:00
Chad Curtis 018aac2637 Fix sdkmanager license acceptance hanging with yes pipe 2026-02-24 02:36:06 -06:00
Chad Curtis 6512f9d3fd Skip test job on tag pipelines, run build-apk independently with needs: [] 2026-02-24 01:54:40 -06:00
Chad Curtis c8e92644d8 Fix spurious JSONException catch in EOSE handler 2026-02-24 01:49:26 -06:00
Chad Curtis 00a7c38efb Fix generate-icons.sh to support ImageMagick 6 (convert) and 7 (magick) 2026-02-24 01:40:25 -06:00
Chad Curtis 6ef88e1165 Cache node_modules in CI and increase job timeouts to 5 minutes 2026-02-24 01:29:01 -06:00
Chad Curtis 49d6166b99 Rewrite notification service: connect-fetch-disconnect per cycle, limit 5 events, adaptive interval 2026-02-24 01:18:11 -06:00
Chad Curtis ba999beb9c Add release script for calver+sha tagging 2026-02-24 01:06:05 -06:00
Chad Curtis 16de0195c2 Remove dead scripts. 2026-02-24 01:05:23 -06:00
Chad Curtis 0d7e384431 Move engines field above dependencies in package.json 2026-02-24 01:04:58 -06:00
Chad Curtis e3a62acbd3 Pin npm 10.9.4 and Node 22.x engine requirements to prevent lockfile churn 2026-02-24 01:04:15 -06:00
Chad Curtis b02b2a9e56 Rebrand Android app icons to Ditto logo with purple background 2026-02-24 01:03:53 -06:00
Chad Curtis 1af6a45a77 Fix preloader flash and green logo on light/pink themes
Defer body inline style removal until CSS variables are injected by
useApplyTheme, preventing a one-frame flash of unstyled background.

Replace preloader logo <img> with CSS mask technique matching the React
DittoLogo component, so the logo uses the theme's primary color instead
of filter:invert() which turned purple into green.
2026-02-24 00:39:27 -06:00
Alex Gleason b61f315a59 Generate ephemeral Nostr keypair for logged-out webxdc sessions
When no user is logged in, generate a random keypair once per hook instance
and use it to sign webxdc events (kind 4932 state updates and kind 20932
realtime). selfAddr/selfName are now derived from the ephemeral key instead
of returning empty strings.
2026-02-24 00:01:49 -06:00
Alex Gleason 805a35fea5 Add dim and blurhash to imeta tags for uploaded images
After a file uploads, decode it on a small canvas (64px wide) to
compute the natural dimensions (dim) and a 4x3 blurhash. Both are
injected into the NIP-94 tag array before storing in uploadedFileGroups,
so the published imeta tag includes them automatically.
2026-02-23 23:13:17 -06:00
Alex Gleason eabaaa3fd5 Fix VideoPlayer letterboxing when dim is known
When the container has an aspect-ratio from the dim tag, switch the
video to absolute inset-0 h-full to fill it cleanly. Fall back to
max-h-[70vh] object-cover for videos without dim data.
2026-02-23 23:08:32 -06:00
Alex Gleason fa7c141382 Add blurhash placeholders to profile Media widget
- Extract blurhash from imeta tags for all event kinds (non-kind-1
  via the first imeta tag; kind-1 by matching the URL against imeta)
- New MediaTile component renders Blurhash canvas before the image/video
  loads, falling back to a Skeleton when no blurhash is available
- Tile uses absolute positioning so the placeholder fills the square cell
2026-02-23 23:07:18 -06:00
Alex Gleason 15ae7c4735 Fix GridImage dim/blurhash placeholder sizing
- Move aspect-ratio and height constraints onto the button container so
  both placeholder and image can fill it with absolute inset-0
- Pass integer decode resolution to Blurhash and size the canvas via
  CSS width/height 100% instead of relying on string props
- Remove stale per-element skeletonStyle/heightStyle juggling
2026-02-23 23:02:41 -06:00
Alex Gleason 8febb405e5 Use imeta dim/blurhash for media placeholders before load
- Parse NIP-94 dim and blurhash fields in parseImetaMap (NoteCard + PostDetailPage)
- ImageGallery/GridImage: use dim for correct aspect-ratio skeleton sizing; render Blurhash canvas placeholder when available
- VideoPlayer: set aspect-ratio container from dim; show Blurhash canvas before first frame/poster loads
- Install react-blurhash (+ blurhash) for canvas rendering
2026-02-23 22:58:56 -06:00
Alex Gleason 2ffbf3f430 fix: return null instead of undefined from NIP-85 query functions 2026-02-23 22:46:03 -06:00
Alex Gleason 8b596302a1 Parse OEmbed response with Zod schema in fetchLinkPreview 2026-02-23 22:06:45 -06:00
Alex Gleason b2416fabdb fix: access trends.tags array from TrendingTagsResult in SearchPage 2026-02-23 22:01:03 -06:00
Alex Gleason 3a8903f8e0 Pass labelCreatedAt from useTrendingTags to useTagSparklines to avoid duplicate REQ 2026-02-23 21:51:20 -06:00
Alex Gleason c85225127f Use requestIdleCallback in trends 2026-02-23 21:47:44 -06:00
Alex Gleason b8f8556515 Batch all sparkline filters into a single REQ for speed 2026-02-23 21:41:27 -06:00
Alex Gleason 148034eb26 Make sparkline queries sequential to avoid relay REQ limit 2026-02-23 21:37:49 -06:00
Alex Gleason 50ff3de053 Replace polyline sparkline with smooth cubic-bezier curve
Port the dataToPoints + SparklinesCurve algorithm from react-sparklines
inline, without adding the dependency. Key improvements:
- Smooth cubic bezier (C commands, divisor=0.25) instead of jagged polyline
- Full vertical range utilised: min/max scaling fills the chart height
- Thinner stroke (1.5px vs 2px) for a more delicate look
- Smaller viewBox (50x28) matching the legacy app dimensions
2026-02-23 21:12:29 -06:00
Alex Gleason b977b12f46 Fix sparkline day boundaries and per-tag query filtering
Mirror the server's getTrendingTags logic exactly:
- Use UTC-midnight-aligned calendar day boundaries derived from the
  most-recent label event's created_at, not rolling 24h windows from now
- Filter each per-day query with '#t': [tag] so only label events that
  mention the specific hashtag are returned, rather than any label event
  for that day
2026-02-23 21:04:07 -06:00
Alex Gleason 7285c7a986 Fix trends sidebar: filter by trusted pubkey and show real accounts/uses data
- Add TRENDS_PUBKEY author filter to all kind 1985 queries (useTrendingTags,
  useTrendingPosts, useTagSparklines) to only trust events from the known
  Ditto trends publisher
- Replace synthetic count with real accounts/uses values parsed from t tag
  indices 3 and 4 respectively
- Show '{accounts} people talking' in the Trends widget instead of '{count} posts'
- Sparklines continue to use the 'uses' field from per-day label events
2026-02-23 21:02:16 -06:00
Alex Gleason 439ab94ea3 Merge branch 'main' of gitlab.com:soapbox-pub/ditto-mew 2026-02-23 20:19:22 -06:00
Alex Gleason a76032bd89 Show NIP-05 loading skeleton in NoteCard while verification is pending 2026-02-23 20:17:42 -06:00
Alex Gleason eef20bd57a Show loading skeleton in Nip05Badge while verification is pending 2026-02-23 20:15:03 -06:00
Alex Gleason a9bd59bbc6 Fix Profile nav link in LeftSidebar not updating after NIP-05 verification
navItems useMemo was missing userProfileUrl from its dependency array, so
the Profile link kept the npub URL computed at first render. Adding
userProfileUrl as a dependency causes the nav to recompute once
useNip05Resolve returns and useProfileUrl switches to the NIP-05 URL.
2026-02-23 20:07:10 -06:00
Alex Gleason 263a9d1e76 NIP-05: don't fallback to CORS proxy, shorter timeout 2026-02-23 20:03:26 -06:00
Alex Gleason 929ea87067 Deduplicate NIP-05 hooks: useNip05Verify now delegates to useNip05Resolve
Both hooks were making separate fetches to the same endpoint. Rewrite
useNip05Verify as a thin wrapper that calls useNip05Resolve and compares
the resolved pubkey — they now share the same query key and a single
network request serves both verification and resolution.
2026-02-23 19:49:11 -06:00
Alex Gleason e86034d7da Fix NIP-05 resolution lowercasing the name portion of the identifier
The name portion of a NIP-05 identifier is case-sensitive per the spec.
useNip05Resolve was calling .toLowerCase() on it before building the URL
query param, causing lookups like Hyperhidrosis@shitposter-world.mostr.pub
to request ?name=hyperhidrosis and fail. Preserve the original casing for
both the URL request and the primary key lookup; keep the case-insensitive
fallback but compare both sides lowercased.
2026-02-23 19:46:11 -06:00
Alex Gleason 5cbae842e0 Fix /domain.com routes 404ing for _@domain.com NIP-05 users
isNip05Like in NIP19Page only checked for '@', so bare domain identifiers
like 'fiatjaf.com' fell through to NIP-19 decoding and returned NotFound.
Extend the check to match the same dot-based heuristic already used in
ProfilePage.
2026-02-23 19:43:34 -06:00
Alex Gleason bc9fd431b8 Fix _@domain.com profile URLs linking to npub instead of /domain.com
The _@ prefix denotes the root/default user for a domain. These users
should link to /domain.com (which the profile page resolves as a NIP-05
identifier), not the npub. The domain feed lives at /timeline/domain.com,
not /domain.com.
2026-02-23 19:42:43 -06:00
Alex Gleason 64cf10f381 Fix useProfileUrl to call useNip05Verify directly instead of peeking cache
The cache-peek approach always returned npub because the cache was empty
at render time. Replace it with a proper hook that calls useNip05Verify,
relying on TanStack Query's deduplication to avoid redundant requests.

Also fix the dot separator in NoteCard to hide when NIP-05 is unverified,
and refactor ProfileSearchDropdown to pass the verified URL through
onClick rather than recomputing it in an event handler.
2026-02-23 19:39:13 -06:00
Alex Gleason d3d44689d6 Verify NIP-05 identifiers before displaying them
Add useNip05Verify hook that uses Nostrify's NIP05.lookup() to verify
that a claimed NIP-05 identifier resolves to the correct pubkey via
.well-known/nostr.json. Update Nip05Badge and all raw nip05 display
sites to suppress display when verification fails or is pending.
2026-02-23 19:14:34 -06:00
Alex Gleason 2edbdf06cf Merge branch 'fix/repost-link-overflow' into 'main'
Fix horizontal overflow on posts with unrenderable links when reposting

Closes #5

See merge request soapbox-pub/ditto-mew!12
2026-02-24 01:04:02 +00:00
Alex Gleason f260b6192f fix: remove invalidateQueries after settings write to prevent theme revert
After updating encrypted settings, the onSuccess handler was calling
invalidateQueries which triggered a relay refetch. The relay would often
return the old event (before the new one propagated), causing NostrSync
to see a new lastSync timestamp and overwrite the locally-set theme
with the old value from Nostr.

The setQueryData call already keeps the cache up to date in-place,
so the invalidateQueries was purely counterproductive.
2026-02-23 18:04:27 -06:00
Alex Gleason cd29071f6b Make the icon purple by default 2026-02-23 18:00:46 -06:00