Commit Graph
1183 Commits
Author SHA1 Message Date
Barry Deen ea80c46d2c feat: broadcast notes to inbox relays of all mentioned pubkeys
When publishing a kind-1 note (root or reply) that mentions pubkeys via
nostr: references, also deliver the event to each mentioned pubkey's
read (inbox) relays per NIP-65. Inbox URLs are deduplicated across
targets and against our own write relays, so shared inboxes only
receive the event once.
2026-04-21 09:18:19 -04:00
Barry DeenandGitHub 38c8323eca Merge pull request #480 from barrydeen/docs/readme-rewrite-v1
docs: rewrite README for v1.0.0 feature set
2026-04-19 14:26:29 -04:00
Barry Deen 6b7515804b docs: rewrite README for v1.0.0 feature set 2026-04-19 14:26:05 -04:00
Barry DeenandGitHub 58e4b5c14e Merge pull request #479 from barrydeen/chore/bump-version-1.0.0
chore: bump version to 1.0.0
2026-04-19 14:21:14 -04:00
Barry Deen b0851706a2 chore: bump version to 1.0.0 2026-04-19 14:20:54 -04:00
Barry DeenandGitHub 8740154b01 Merge pull request #478 from barrydeen/fix/group-join-auth-race
fix: wait for NIP-42 AUTH before group 9021/9007/9009 and surface admin failures
2026-04-19 14:18:48 -04:00
Barry Deen c20a2c6d20 fix: wait for NIP-42 AUTH before group 9021/9007/9009 and surface admin failures
Group joins and admin actions (create group / invite / edit metadata / put user /
remove user / leave / delete) previously fired their events as soon as the signer
returned, racing the relay's NIP-42 AUTH challenge. On an auth-gated relay the
unauthenticated event hits first and the relay either responds "auth-required:"
or silently downgrades the request — a 9021 with a valid invite code returns
"restricted: group is closed, you need an invite code", a 9007 can fail silently,
a 9009 then fires against a ghost group and gets "blocked: group doesn't exist",
and the admin never sees any of it because the publishes were fire-and-forget.

attemptJoin now waits up to 5s for authCompleted before sending the 9021, and
still retries once on an auth-required rejection as a safety net. A new
publishAdminEvent helper wraps the admin kinds with the same auth-wait, awaits
the relay's OK, and emits an AdminError on rejection or timeout. createGroup
additionally rolls back its local placeholder if the relay rejects 9007 so we
don't keep trying to issue invites for a group the relay doesn't know about.

A new adminErrors SharedFlow on GroupListViewModel is collected by DmListScreen
and rendered as an AlertDialog showing the step (e.g. "createGroup/9007") and
the relay's message, so silent admin failures become visible.
2026-04-19 14:15:58 -04:00
Barry DeenandGitHub 242b809916 Merge pull request #477 from barrydeen/fix/account-switch-social-graph-notifications
fix: preserve social graph and notifications across account switches
2026-04-19 12:43:35 -04:00
Barry Deen 7d5b988005 fix: preserve social graph and notifications across account switches
The social graph (ExtendedNetworkRepository + SocialGraphDb) was wiped
on every account switch because clear() deleted both the SharedPreferences
cache and SQLite tables, and SocialGraphDb used a single shared DB file.
Now SocialGraphDb uses per-account files with a one-time legacy migration,
and clear() no longer touches persistent state (only in-memory). Notification
events from account A were leaking into account B because the ObjectBox
seeding coroutine fired after the switch and NotificationRepository had no
reload(). Adds reload() to NotificationRepository/SafetyPreferences
with a stale-pubkey rejection guard and proper job cancellation.
2026-04-19 12:42:29 -04:00
Barry DeenandGitHub 3e27713078 Merge pull request #476 from barrydeen/fix/group-metadata-preserve-permissions
fix: preserve group permission flags on metadata edit
2026-04-19 11:57:26 -04:00
Barry Deen 2e0c193f04 fix: preserve group permission flags on metadata edit 2026-04-19 11:36:29 -04:00
Barry DeenandGitHub 92f99593d8 Merge pull request #473 from barrydeen/feat/increase-onboarding-timeout
feat: increase onboarding EOSE timeout to 8s and add relays
2026-04-19 10:42:10 -04:00
Barry Deen 91ac6d8f20 feat: increase onboarding EOSE timeout to 8s and add relay.wisp.talk, pyramid.fiatjaf.com
Bump collectUntilEose timeout from 3000ms to 8000ms across all suggestion
queries (active now, news, profile fetches) to handle slow connections.

Add relay.wisp.talk and pyramid.fiatjaf.com to ACTIVE_RELAYS so more
users appear in the 'Active right now' onboarding section.
2026-04-19 10:41:03 -04:00
Barry DeenandGitHub a5ae58d3f6 Merge pull request #472 from barrydeen/fix/persist-deletes-drafts-hashtag-sets
delete hashtags, drafts, thread drops
2026-04-18 15:22:32 -04:00
Barry Deen b802c124d9 delete hashtags, drafts, thread drops 2026-04-18 15:20:31 -04:00
Barry DeenandGitHub 5f6eb0ca7d Merge pull request #471 from barrydeen/feat/nip29-group-config
feat: NIP-29 group config — flags, invites, roles, AUTH prompts
2026-04-18 13:20:38 -04:00
Barry Deen c4900142b3 feat: NIP-29 group config — flags, invites, roles, AUTH prompts
Expands group support beyond open/unrestricted creation:

- Create dialog exposes the 4 NIP-29 config flags (private, closed,
  restricted, hidden) as plain-English toggles; the follow-up kind:9002
  is only sent when the user actually customizes posture, with a 1.5s
  delay after the 9007 so the relay can mark us admin first.
- Group Detail shows per-flag icon + label + description rows plus a
  header badge chip (defaults to "Public" when fully open), so every
  room's posture is legible at a glance.
- Admin-only invite code section generates kind:9009 events and
  surfaces copy-code / copy-invite-link actions; Join dialog parses
  `relay'groupId?code=...` and plumbs the code through kind:9021.
- Per-member "Assign role" action sends kind:9000 with free-form role
  tags; admins list parses role strings without breaking call sites.
- Join flow waits on the relay's OK response before adding the room
  locally — rejections surface as a dialog instead of a broken
  chat screen with no messages.
- Joined chat relays now get tier-2 AUTH prompts (prompt-and-remember)
  instead of silently discarding challenges; after AUTH completes we
  re-fire group REQs and clear stale "auth-required" banners.
- Raw 39000/39001/39002 events logged so relay-side behavior can be
  inspected directly from logcat.
- Default group relay switched from groups.0xchat.com to
  chat.wisp.talk.

Known: chat.wisp.talk omits non-admin pubkeys from kind:39002 on
closed groups, so the local member list stays sparse until the relay
behavior is fixed. To be addressed server-side.
2026-04-18 13:19:21 -04:00
Barry DeenandGitHub d3f511b7e2 Merge pull request #470 from barrydeen/feat/nspam-v2.2-lightgbm
feat: upgrade nspam model to v2.2 LightGBM
2026-04-18 11:32:33 -04:00
Barry Deen 799c52cd5b tune: raise nspam hide threshold from 0.5 to 0.7
Reduces false positives against real users that still show up with
the v2.2 model, at the cost of letting through some borderline
spam. Applied to both reply notifications and thread rendering.
2026-04-18 11:28:13 -04:00
Barry Deen c1a1c8dab1 feat: upgrade nspam model to v2.2 LightGBM
Replaces the v0.9 logistic-regression reply-spam classifier with
the v2.2 gradient-boosted tree model (500 trees, 63 leaves). Ships
model.txt + calibration.npz and adds a pure-Kotlin LightGBM tree
walker. Feature extraction is unchanged; tree-walk output matches
LightGBM's C++ predict bit-exactly against the published parity
fixtures.
2026-04-18 11:18:35 -04:00
Barry DeenandGitHub cf672a80c5 Merge pull request #469 from barrydeen/feat/for-you-feed
feat: add For You feed (extended/follows + trending + hashtags)
2026-04-16 22:55:28 -04:00
Barry Deen 764aac6322 feat: add For You feed blending extended/follows with trending and hashtags
New default feed type that combines three streams into one sorted list:
- Main author subscription (extended network if cached, follow feed otherwise)
- Top-reactions and top-replies trending notes (today timeframe)
- Notes for all followed hashtags, batched 10 at a time against the search
  relay over a 24h window

Supplementary fetches are one-shot per feed-generation and self-close on
EOSE + drain; events flow through EventRepository.addEvent() for dedup and
in-order insertion alongside the main feed. Pagination paginates only the
author subscription; trending and hashtag batches are initial-load only.
2026-04-16 22:06:53 -04:00
Barry DeenandGitHub 4c0e6b952b Merge pull request #468 from barrydeen/fix/zap-count-zero-display
fix: always show zap count on post cards, including 0
2026-04-16 21:35:54 -04:00
Barry Deen 4da5a087eb fix: always show zap count on post cards, including 0 2026-04-16 21:33:52 -04:00
Barry DeenandGitHub 7849c04965 Merge pull request #467 from barrydeen/fix/back-minimizes-app
fix: allow back button to minimize app from FEED
2026-04-16 21:29:24 -04:00
Barry Deen 221275e29d fix: allow back button to minimize app from FEED
Users expect pressing back from the home screen to minimize the app.
The BackHandler was swallowing the press on FEED; disable it there
so Android's default behavior handles it.
2026-04-16 21:28:59 -04:00
Barry DeenandGitHub 1b51a4b1fe Merge pull request #466 from barrydeen/fix/video-replay-autoplay-disabled
fix: replay inline video after it ends when autoplay is off
2026-04-16 21:24:40 -04:00
Barry Deen 8f90324c7a fix: seek to 0 when replaying ended video with autoplay off
ExoPlayer in STATE_ENDED stays at the end position, so calling play()
on the overlay tap had no effect after the video finished once. Seek
back to 0 before playing if the player has ended.
2026-04-16 21:23:33 -04:00
Barry DeenandGitHub 4b927b335a Merge pull request #465 from barrydeen/feat/media-compression-and-formats
feat: render HLS/HEIC inline + compress uploads + transcode GIFs
2026-04-16 21:19:00 -04:00
Barry Deen 17c17a6648 feat: compress images and transcode GIFs before Blossom upload
Every upload path (profile picture, compose attachment, DM attachment)
now runs through a shared preprocessing pipeline:

- image/gif -> transcoded to H.264 MP4 via MediaCodec + MediaMuxer
  through an EGL input surface (typical 5-20x size reduction)
- other image/* -> decoded with ImageDecoder (handles HEIC on API 28+),
  EXIF-rotated when needed, proportionally scaled, JPEG re-encoded
- videos and other types -> passed through unchanged

Profile pictures cap at 400px wide / JPEG quality 75. Compose and DM
uploads cap at 1920px / quality 82. imeta dim and Kind 15 size/dim
tags are recomputed from post-pipeline bytes so clients see accurate
metadata. Gallery-mode video/image mixing check treats GIFs as video
since they become MP4s.
2026-04-16 21:16:56 -04:00
Barry Deen 93d658c98e feat: render .m3u8 (HLS) and .heic/.heif URLs inline in notes
Extends the content parser's extension and MIME sets so HLS streams and
Apple HEIF images route to the existing video/image renderers instead of
falling through to plain links. HLS plays via the media3-exoplayer-hls
module that's already on the classpath; HEIC decodes via Coil3 ->
ImageDecoder on API 28+.
2026-04-16 21:16:45 -04:00
Barry DeenandGitHub 973eadf312 Merge pull request #464 from barrydeen/feat/onboarding-overhaul
feat: onboarding overhaul — topics screen + first-post coach
2026-04-16 20:48:15 -04:00
Barry Deen 0446301917 fix: bulk-publish onboarding topics as one event, match post-now UX
Two onboarding polish fixes:

- Topic selections were racing: createInterestSet launched a coroutine
  to publish an empty kind 30015, then a for-loop called followHashtag
  for each tag. Each followHashtag read the repo synchronously before
  the prior coroutines landed, so each call produced its own event
  with just one tag, and the later events with equal created_at did
  not overwrite the first one in the repo. Add a bulk followHashtags
  that takes a Set and publishes a single event with a proper title.
- First-post bottom bar now matches ComposeScreen: during the send
  countdown, an Undo button cancels and a 'Post now (Ns)' button
  publishes immediately, instead of a single button that only canceled.
2026-04-16 20:44:56 -04:00
Barry Deen ee1eb546c4 fix: treat new onboarding routes as non-app routes
The nonAppRoutes set is used to decide whether the post-process-death
redirect-to-LOADING effect should fire. With ONBOARDING_TOPICS and
ONBOARDING_FIRST_POST missing from the set, that effect treated them
as regular app screens and kicked users from the topic/first-post
screens to LOADING mid-flow.
2026-04-16 20:35:28 -04:00
Barry Deen 8240c1e5ee feat: extend onboarding with topic follows and first-post coach
New flow after profile: People suggestions → Topics → First post → Feed.

- Topic screen fetches a curated 'trending' set and an 'all' set from
  feeds.nostrarchives.com (kind 30015) so users can pick hashtags via
  autocomplete or tap popular chips. Selections are saved through the
  existing InterestRepository / followHashtag path (kind 30015 interest
  set named 'Interests').
- First-post screen pre-fills #introductions and reuses the existing
  ComposeViewModel.publish flow. The feed subscription kicks off on
  screen entry so the feed is ready by the time the user finishes.
- Skip handler on the People screen now calls finishOnboarding with an
  empty selection, so skippers still get a kind 3 event that at least
  self-follows — their own posts will show up in their feed.
2026-04-16 20:30:16 -04:00
Barry DeenandGitHub 2bb95fe282 Merge pull request #463 from barrydeen/fix/fresh-signup-feed-empty
fix: resubscribe feed when fresh signup returns empty
2026-04-16 20:18:18 -04:00
Barry Deen f9d0971bc3 fix: resubscribe feed when fresh signup returns empty
On fresh signup the feed subscription fires before author NIP-65 relay
lists have fully propagated, so outbox routing defaults to pinned relays
that may not carry the followed authors' posts. The existing late-
arrival safety net only covered the opposite case (follows arriving
after initial subscribe). Add a symmetric retry: if the initial subscribe
had a non-empty follow list but the feed is still empty after 5s, resub
once so routing uses the now-known per-author relays.
2026-04-16 20:17:19 -04:00
Barry DeenandGitHub 71a2c72ef0 Merge pull request #462 from barrydeen/feat/fiat-mode
Normie Mode (fiat)
2026-04-16 20:10:14 -04:00
Barry Deen 150a267b7f feat: add Fiat Mode
Opt-in display mode that renders zap and wallet amounts in a fiat currency
(default USD) instead of satoshis. Rates are fetched once at startup from
CoinGecko and cached in SharedPreferences as a fallback.

- FiatPreferences + ExchangeRateRepository for the toggle, currency
  selection, and cached rates across 26 fiat currencies
- AmountFormatter centralizes sat→fiat display across feed zap pills,
  wallet balance / transactions / invoice confirm + receive screens,
  zap dialog, DM bubbles, notifications stats, and lightning invoice cards
- Fiat Mode section lives inside the Interface settings screen
- Fiat Mode forces the bolt (voltage) icon everywhere so the ₿ symbol is
  never shown while fiat amounts are displayed
- Receive screen accepts fiat amounts with a decimal key and a dedicated
  "Generate invoice" button; converts fiat→sats before creating the invoice
- Zap dialog preset chips keep their sat values internally and relabel as
  fiat; "Send Zap" copy flips to "Send Money"
- Wallet balance-unit selector (SATS / BITCOIN / LIGHTNING) is hidden in
  Fiat Mode since it only applies to sat rendering
- New npub signups default to Fiat Mode + USD; nsec / npub / signer logins
  never touch the preference, so returning users keep their choice
2026-04-16 20:09:01 -04:00
Barry DeenandGitHub b4a40ac3e6 Merge pull request #461 from barrydeen/chore/bump-version-0.18.0
chore: bump version to 0.18.0
2026-04-16 01:06:25 -04:00
Barry Deen a04eac0874 chore: bump version to 0.18.0 2026-04-16 01:05:59 -04:00
Barry DeenandGitHub 3bba8f7d0b Merge pull request #460 from barrydeen/fix/strip-nostr-prefix-search
fix: strip nostr: prefix from search queries
2026-04-16 01:03:53 -04:00
Barry Deen 2e9d3261ea fix: strip nostr: prefix from search queries 2026-04-16 01:01:16 -04:00
Barry DeenandGitHub c5af40c2cc Merge pull request #459 from barrydeen/fix/subcompose-intrinsic-crash
fix: replace SubcomposeAsyncImage to prevent intrinsic measurement crash
2026-04-16 00:57:36 -04:00
Barry Deen efb07902e6 fix: replace SubcomposeAsyncImage to prevent intrinsic measurement crash
SubcomposeAsyncImage (SubcomposeLayout) crashes when rendered inside
chat bubble columns that use IntrinsicSize.Max for shrink-wrap sizing.
Switch to AsyncImage with loading state overlay instead.
2026-04-16 00:56:38 -04:00
Barry DeenandGitHub 0bc46e50ec Merge pull request #458 from barrydeen/fix/show-more-media-sizing
Fix show-more truncation distorting media sizing
2026-04-16 00:46:35 -04:00
Barry Deen eceda19ec0 fix: skip collapsible show-more for posts with media
The heightIn constraint used for "show more" truncation propagated
down to video/image players, causing them to resize and shift position
when toggling show more/less. Posts with media now render at full
height; only text-heavy posts get the collapsible behavior.
2026-04-16 00:45:54 -04:00
Barry DeenandGitHub d1e78dc806 Merge pull request #457 from barrydeen/feat/remember-last-feed
feat: persist last-viewed feed across app sessions
2026-04-16 00:26:38 -04:00
Barry DeenandClaude Opus 4.6 c65b995af3 feat: persist last-viewed feed across app sessions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 00:25:47 -04:00
Barry DeenandGitHub 14abc621d0 Merge pull request #456 from barrydeen/feat/wot-filter
feat: Web of Trust global content filter
2026-04-16 00:02:58 -04:00