Commit Graph

11501 Commits

Author SHA1 Message Date
davotoula f15e280862 updated cz,sv,pt,de 2026-04-19 21:31:56 +02:00
Vitor Pamplona fd49ee27ad Merge pull request #2443 from vitorpamplona/l10n_crowdin_translations
New Crowdin Translations
2026-04-19 15:04:49 -04:00
Vitor Pamplona bb1817c67c Merge pull request #2449 from vitorpamplona/claude/add-favorite-dvm-filter-DfveW
Add NIP-90 DVM favorite list support with content discovery
2026-04-19 15:04:42 -04:00
Claude f99fc4c333 refactor: rename FavoriteDvm* -> FavoriteAlgoFeed* throughout amethyst
The wire-level class was renamed to FavoriteAlgoFeedsListEvent in a
prior commit. Finish the rename through the rest of the feature so
the internal vocabulary (packages, classes, properties, routes, DSL
helpers, TopFilter variants, composables) matches what users see.

Packages:
- model.nip51Lists.favoriteDvmLists -> favoriteAlgoFeedsLists
- model.dvms                         -> algoFeeds
- model.topNavFeeds.favoriteDvm      -> favoriteAlgoFeeds
- home.datasource.nip90Dvms          -> nip90AlgoFeeds

Classes/composables renamed (selected):
- FavoriteDvmListState/DecryptionCache -> FavoriteAlgoFeedsListState/DecryptionCache
- FavoriteDvmOrchestrator / FavoriteDvmSnapshot -> FavoriteAlgoFeedsOrchestrator / FavoriteAlgoFeedsSnapshot
- FavoriteDvmTopNavFilter{,PerRelayFilter{,Set}}, FavoriteDvmFeedFlow ->
  FavoriteAlgoFeedTopNavFilter{,PerRelayFilter{,Set}}, FavoriteAlgoFeedFlow
- AllFavoriteDvmsTopNavFilter / AllFavoriteDvmsFeedFlow / AllFavoriteDvmsBanner ->
  AllFavoriteAlgoFeedsTopNavFilter / AllFavoriteAlgoFeedsFlow / AllFavoriteAlgoFeedsBanner
- FavoriteDvmName -> FavoriteAlgoFeedName
- FavoriteDvmToggle -> FavoriteAlgoFeedToggle
- FavoriteDvmListScreen -> FavoriteAlgoFeedsListScreen
- HomeDvmStatusBanner / SingleDvmBanner / DvmStatusBanner ->
  HomeAlgoFeedStatusBanner / SingleAlgoFeedBanner / AlgoFeedStatusBanner
- filterHomePostsByDvmIds -> filterHomePostsByAlgoFeedIds
- TopFilter.FavoriteDvm / TopFilter.AllFavoriteDvms ->
  TopFilter.FavoriteAlgoFeed / TopFilter.AllFavoriteAlgoFeeds
- Route.EditFavoriteDvms -> Route.EditFavoriteAlgoFeeds

Account / AccountSettings / AccountViewModel properties & mutators
renamed consistently: favoriteDvmList -> favoriteAlgoFeedsList,
backupFavoriteDvmList -> backupFavoriteAlgoFeedsList, follow/unfollow/
isFavoriteDvm -> follow/unfollow/isFavoriteAlgoFeed, refreshFavoriteDvm
-> refreshFavoriteAlgoFeed, dvmAddress kwargs -> feedAddress,
dvmNote locals -> feedNote, etc.

Persisted TopFilter.FavoriteAlgoFeed/AllFavoriteAlgoFeeds `code` strings
changed (old "FavoriteDvm/…" / " All Favourite DVMs " values don't
round-trip anymore) — kotlinx-serialization polymorphism keys the
sealed class by class name, so cold-start of pre-existing installs
will fall back to AllFollows for this filter. Acceptable since this
is a new feature only on this branch.

Kept unchanged: ui/screen/loggedIn/dvms/ folder (hosts generic
DvmContentDiscoveryScreen / DvmTopBar / DvmPaymentActions), quartz
nip90Dvms package (NIP-90 wire-protocol naming). XML string resource
keys (favorite_dvms_title, dvm_home_* etc) kept stable; only their
values were updated previously.

Build + tests green on both modules.
2026-04-19 17:56:16 +00:00
Claude 72598026a3 refactor(quartz): rename FavoriteDvmListEvent -> FavoriteAlgoFeedsListEvent
The list event only stores content-discovery feeds (kind-5300 DVMs),
not every DVM, so the old name was misleading. Rename the wire-level
type to reflect what's actually in it.

- Quartz: package nip51Lists.favoriteDvmList -> favoriteAlgoFeedsList;
  class FavoriteDvmListEvent -> FavoriteAlgoFeedsListEvent.
- DSL helpers renamed: favoriteDvm/favoriteDvms builder extensions ->
  favoriteAlgoFeed/favoriteAlgoFeeds; TagArray.favoriteDvmList/Set ->
  favoriteAlgoFeedsList/Set.
- create/add/remove parameter names dvm -> feed, publicDvms/privateDvms
  -> publicFeeds/privateFeeds; public/private accessors
  publicFavoriteDvms/privateFavoriteDvms -> publicFavoriteAlgoFeeds/
  privateFavoriteAlgoFeeds. ALT string updated.
- EventFactory + LocalCache dispatch branches + AccountSettings backup
  field type + FavoriteDvmListState + FavoriteDvmListDecryptionCache all
  import the new type. Internal amethyst-side classes
  (FavoriteDvmListState, FavoriteDvmListDecryptionCache), the top-nav
  filter classes (FavoriteDvm*, AllFavoriteDvms*) and the orchestrator
  keep their names — they still deal with content-discovery DVMs
  specifically, and the narrower rename here is scoped to the Nostr
  wire format the user was asking about.
- Quartz test renamed + rewired. Build + tests green on both modules.
2026-04-19 17:37:55 +00:00
Crowdin Bot 63ef6dae6c New Crowdin translations by GitHub Action 2026-04-19 17:27:09 +00:00
Vitor Pamplona ce6741ce92 Merge pull request #2450 from vitorpamplona/claude/add-pdf-preview-DIUJE
Add PDF viewing support with preview cards and full-page viewer
2026-04-19 13:25:47 -04:00
Claude 496cc9876f fix(pdf): revert RGB_565 — PdfRenderer requires ARGB_8888
PdfRenderer.Page.render() only accepts ARGB_8888 bitmaps; RGB_565 is
silently rejected (the renderer produces no output), which is why the
preview card and viewer both stopped showing anything. Go back to
ARGB_8888 and update the memory estimates in the comments. The other
perf wins from 49e913b (FilterQuality.Medium, 4096 hi-res cap, 1.5x
threshold, remembered ImageBitmap wrapper) are unaffected and stay.
2026-04-19 17:19:36 +00:00
Claude 49e913bec4 perf(pdf): reduce pan/zoom jitter in viewer dialog
The main cost during a live pan/zoom is the GPU re-sampling the page
bitmap every frame under the zoomable modifier's transform. Three
changes bring that cost down substantially:

- Bitmap.Config.RGB_565 instead of ARGB_8888. PDFs are opaque, so the
  alpha channel is unused. Halves texture memory and GPU upload
  bandwidth; visually identical.
- HI_RES_MAX_DIM_PX lowered from 6144 to 4096. 4096 stays within the
  common GPU texture-size limit, keeping rendering hardware-accelerated
  on mid-range devices. Peak bitmap is now ~24 MB (A4, RGB_565) instead
  of ~107 MB (ARGB_8888, 6144).
- FilterQuality.Medium (bilinear) instead of High (bicubic/Mitchell).
  High is recomputed per frame during pan/zoom and is the main source
  of jitter on multi-megapixel sources. At 3072-4096 px base resolution
  bilinear is effectively indistinguishable.
- HI_RES_ZOOM_THRESHOLD raised from 1.2 to 1.5 so we don't trigger a
  costly re-render for marginal zoom levels where the base is fine.
- Cache the ImageBitmap wrapper via remember to avoid per-recomposition
  allocations.
2026-04-19 16:59:23 +00:00
Claude 640848a2f6 fix(pdf): always scale render to target, never keep 72-DPI native size
PdfRenderer.Page.getWidth()/getHeight() return the page size in
PostScript points (1/72"), so for a standard A4 that's 595 x 842
"pixels" passed to cappedRenderSize. The old early-return kept native
dimensions whenever longest <= targetDim (which was always), so the
base bitmap was 595 x 842 regardless of what we asked for — effectively
72 DPI. Zoom-aware re-renders hit the same early return and also
stayed tiny, which is why double-tap produced no visible improvement.

Remove the early return: since PDFs are vector, always rescale the
point dimensions so the longest side equals targetDim. Base renders
now produce ~3072 px bitmaps and the hi-res path actually goes to
6144 px when zoomed.
2026-04-19 16:45:17 +00:00
Claude fc284e3cfe feat(dvm-favorites): rename user-facing to "Favorite Feed Algorithms" + fix cold-start race
- User-facing rename. All user-visible strings switch from "favourite"
  to "favorite" (American spelling) and from "DVM(s)" to "Feed
  Algorithm(s)": settings entry, spinner group label, empty state,
  banner messages, menu accessibility labels. Code identifiers still
  reference NIP-90's "DVM" protocol name since that's the wire spec.
- Cold-start race. When the app relaunches with a persisted
  TopFilter.FavoriteDvm, the AppDefinitionEvent may not be in cache
  yet. mergeInterests was filtering out any favorite whose
  AppDefinitionEvent didn't yet advertise kind 5300, so the spinner
  didn't include a chip matching the persisted selection — it
  showed "Select an option" while the orchestrator quietly fired the
  RPC with no UI to ground it. Always include every favorite; the
  5300 check at add time (in FavoriteDvmToggle) is enough.
2026-04-19 16:43:46 +00:00
Claude 2e4a985b36 feat(images): load full-resolution source in the image dialog
SubcomposeAsyncImage was being called with just the URL (or local
File), so Coil auto-sized the decode target to the composable's
layout bounds. In the feed that's desirable — a small thumbnail
decode — but in the zoomable dialog the composable is fillMaxWidth
(~screen width), and pinch-zooming then GPU-upscales the already
downsampled bitmap, producing the same blurriness the PDF viewer
had before.

Add a fullResolution: Boolean = false flag to UrlImageView and
LocalImageView. When true, swap the model for an ImageRequest with
size(Size.ORIGINAL) so Coil decodes at the image's native
dimensions. Feed call sites keep the default (fast, sampled). Both
dialog call sites in ZoomableContentDialog now pass
fullResolution = true, so pinch-zoom shows native pixels.

The existing blurhash/aspect-ratio placeholder path already covers
the brief high-res load window in the dialog.
2026-04-19 16:32:34 +00:00
Claude 0c88b83c3f feat(pdf): wire double-tap to toggle zoom in viewer
The zoomable library's onDoubleTap callback is not wired by default,
so double-tapping the PDF page did nothing — no scale change, no
hi-res re-render. Pass an onDoubleTap handler that calls
zoomState.toggleScale(2.5x, tapPosition). The scale animation runs
through the same Animatable snapshotFlow already observes, so the
debounced hi-res render kicks in automatically once the animation
settles.
2026-04-19 16:14:43 +00:00
Vitor Pamplona 5aa63c96a6 Merge branch 'main' of https://github.com/vitorpamplona/amethyst 2026-04-19 12:11:12 -04:00
Vitor Pamplona a9fba25acd ignores the state when running marmot tests 2026-04-19 12:09:53 -04:00
Vitor Pamplona e5a87a83ae Adds a quick exit to the address parser 2026-04-19 12:09:35 -04:00
Vitor Pamplona be24dc34e4 Merge pull request #2448 from vitorpamplona/claude/unpin-deleted-posts-gTD4S
Add deleted items banner to bookmarks, pins, and bookmark groups
2026-04-19 11:55:43 -04:00
Claude b0f75d4dd4 fix(home-banner): float DVM status banner over the feed instead of in the top bar
Putting HomeDvmStatusBanner inside the top-bar Column meant the
SecondaryTabRow shifted up/down every time the banner appeared or
disappeared (filter selection, refresh, response arrival). Annoying.

Move the banner into a Box that wraps the HorizontalPager and align
it to TopCenter so it floats over the feed:
- topBar Column is back to just HomeTopBar + SecondaryTabRow; tabs
  no longer reflow when the banner toggles.
- BannerCard takes a Modifier and gets tonalElevation + shadowElevation
  + a slightly stronger surface tint so it reads as a floating overlay
  rather than part of the scaffold chrome.
2026-04-19 15:53:23 +00:00
Claude e244271bd0 feat(pdf): zoom-aware hi-res re-render for crisp pinch-zoom
Base bitmap stays at 3072 px for the initial render. When the user
zooms past 1.2x and scale settles for 200 ms, asynchronously re-render
the current page at (VIEWER_MAX_DIM_PX * scale) capped at 6144 px
(~100 MB peak for an A4 page). Swap the hi-res bitmap in while zoomed;
revert to base when scale drops back under threshold or the page
leaves composition. Only the currently-focused page gets the hi-res
treatment.

Also apply FilterQuality.High to the Image composable in both the
viewer and the preview card so any residual GPU upscaling uses
bicubic-ish sampling instead of bilinear.

Factored the render path into a shared renderPageCatching() helper.
2026-04-19 15:46:25 +00:00
Claude dc41432c5b fix(topnav): long filter names no longer wrap + hide expand icon
Selecting a DVM with a long name (or any long-named filter) made
the Text in the top-nav spinner wrap to two lines, pushing the
ExpandMore icon out of the visible area. The Column holding the
Text had no width constraint and the Text itself had no maxLines.

- Constrain the Column with `Modifier.weight(1f, fill = false)` so
  it reserves space for the icon instead of consuming it.
- Add `maxLines = 1, overflow = TextOverflow.Ellipsis` to every
  text path in the spinner (primary label, geohash city-loading,
  AroundMe location labels). Single-line + ellipsis for all filter
  types, icon always visible.
2026-04-19 15:37:07 +00:00
Claude 013c211e6a fix(pdf): top-align viewer controls and bump render resolution
- Wrap pager + controls Row in a Box(fillMaxSize) and align the Row to
  TopCenter so the back/share buttons sit at the top of the screen,
  matching ZoomableContentDialog's layout. They were previously
  vertically centered.
- Raise VIEWER_MAX_DIM_PX from 2048 to 3072 so pinch-zoomed pages stay
  legible. A4-sized pages now render at ~26 MB each (ARGB_8888).
- Replace the unbounded mutableStateMapOf page cache with a tiny
  LinkedHashMap-based LRU (PAGE_CACHE_SIZE = 3) to keep total bitmap
  memory around 80 MB regardless of PDF length. The cache only feeds
  produceState's initial value, so it doesn't need to be a snapshot
  state.
2026-04-19 15:21:01 +00:00
Claude c2101c16dc fix(pdf): avoid closing renderer via delegated read in DisposableEffect
DisposableEffect(handleState) captured handleState as a property
delegate, so onDispose read the *current* delegated value at dispose
time. When the async load transitioned handleState from null to the
new handle, the previous DisposableEffect(null) was forgotten and its
onDispose fired — reading the freshly-created handle via the delegate
and closing it immediately. That left the dialog stuck on the loading
spinner (page renders bailed out due to the closed flag) and double-
closed the renderer on dismiss.

Capture the handle as a local val before DisposableEffect so the
lambda closes the specific handle that was current at effect creation.
2026-04-19 15:02:46 +00:00
Vitor Pamplona 368928e59f Merge pull request #2445 from nrobi144/feat/desktop-app-drawer
feat(desktop): App Drawer with workspaces, customizable nav bar
2026-04-19 10:57:23 -04:00
Vitor Pamplona 5240f29634 Merge pull request #2447 from vitorpamplona/claude/content-warning-media-overlay-zjdoP
Refactor content warning UI with backdrop support and image preloading
2026-04-19 10:56:56 -04:00
Claude 876513ad58 fix(pdf): capture page count eagerly to survive PagerState teardown
PagerState's saveable reads the pageCount lambda during composition
teardown, which runs *after* DisposableEffect.onDispose has already
closed the PdfRenderer. That triggered
IllegalStateException("Document already closed") the first time the
dialog was dismissed.

Store pageCount as a stored val sampled at handle construction instead
of re-querying the renderer. Also add a @Volatile closed flag so the
PdfPageView render coroutine bails out if it wakes up after close();
existing catch clause still swallows any narrow race.
2026-04-19 14:55:32 +00:00
Claude dcaa6607ea perf(feeds): remember isSensitive and content warning reasons per note
These derivations iterate every tag and parse every iMeta, so running
them on each recomposition churns through feed scrolls. Cache them in
remember(note) alongside the other per-note derivations.
2026-04-19 14:47:20 +00:00
Claude d8b313088d fix(dvm-favorites): star click is a no-op + star missing from DVM detail top bar
Two distinct bugs with the same symptom ("clicking the star doesn't
seem to do anything"):

1. LocalCache didn't know how to route kind 10090. FavoriteDvmListEvent
   was missing from LocalCache's event-type dispatch, so after
   Account.followFavoriteDvm signs and publishes the event, the
   cache silently dropped it — never updated favoriteDvmListNote,
   so account.favoriteDvmList.flow never re-emitted, so the star's
   filled/outlined state (and the spinner chip) never flipped. Add
   `is FavoriteDvmListEvent -> consumeBaseReplaceable(...)`.

2. DvmTopBar's toggle never rendered. The Home feed passes the DVM's
   hex event id via Route.ContentDiscovery, so LoadNote(baseNoteHex)
   returns a plain Note, not the AddressableNote the toggle needs
   (the `is AddressableNote` guard was always false). Derive the
   AddressableNote from the loaded AppDefinitionEvent.address() so
   the toggle shows up with the correct backing object.
2026-04-19 14:34:07 +00:00
nrobi144 cb306b5219 fix(desktop): icon picker shows selected state with background highlight
Replace tint-only selection with Surface background + primaryContainer
color so the selected icon is clearly visible in the workspace editor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 05:55:09 +03:00
nrobi144 486ff2e8cf fix(desktop): UI polish — single-line layout toggle, checkmark margin
- Shorten "Single Pane" to "Single" in SegmentedButton to prevent wrapping
- Add 8dp left margin before checkmark in workspace card

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 05:52:02 +03:00
nrobi144 200c5227fc refactor(desktop): pin/unpin syncs to active workspace
PinnedNavBarState now takes WorkspaceManager reference. Pin/unpin
actions update the active workspace's singlePaneScreens list,
making sidebar customization and workspace editing the same action.

- PinnedNavBarState.syncToWorkspace() updates active workspace on pin/unpin
- PinnedNavBarState.loadFromWorkspace() loads from active workspace
- Remove separate DesktopPreferences.pinnedNavItems persistence
- Workspace is the single source of truth for nav bar screens

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 05:40:28 +03:00
nrobi144 0455d1f8c6 feat(desktop): single-pane workspaces store nav bar screen list
Change Workspace.singlePaneScreen (single string) to
singlePaneScreens (list of typeKey strings). First screen is
the default. On workspace switch, loads the screen list into
PinnedNavBarState and navigates to the first screen.

- Add SinglePaneScreensEditor to workspace editor dialog
- Add PinnedNavBarState.loadFromList() for workspace-driven nav
- Backward compat: load old "singlePaneScreen" format as single-item list
- Cmd+Shift+S captures current deck columns as singlePaneScreens

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 05:21:12 +03:00
Claude 9ba2d2f5cc feat(dvm-favorites): timeout, tests, and merged "All favourite DVMs" chip
1. DVM response timeout. FavoriteDvmOrchestrator now times out after
   20s if neither a 6300 response nor any 7000 status arrives, and
   sets errorMessage = "timeout" on the snapshot so the home banner
   switches from the "Asking…" spinner to a Retry button instead of
   hanging forever.

2. Tests. FavoriteDvmListEventTest covers create/add/remove round
   trips and the fixed-empty d-tag invariant; FavoriteDvmTopNavFilter
   match by id and by `a` address; FilterHomePostsByDvmIdsTest covers
   the two-relay-set split (content fetch on user relays, listen on
   DVM relays) and the multi-requestId merge case.

   Also registered kind 10090 in EventFactory so Quartz can deserialise
   FavoriteDvmListEvent (required for the round-trip tests and for
   reading the list back from relays).

3. Merged "All favourite DVMs" chip. New TopFilter.AllFavoriteDvms
   that unions every favourite's latest 6300 response into one feed.
   AllFavoriteDvmsFeedFlow uses flatMapLatest over the favourite-list
   flow so subscriptions rewire when the user adds/removes a DVM.
   FavoriteDvmTopNavPerRelayFilterSet now carries Set<HexKey>
   requestIds (was a single nullable) so the filter can subscribe to
   N kind 6300/7000 streams in one REQ per DVM relay. Banner renders
   "Asking your favourite DVMs for feeds…" while all are pending and
   a single Retry-all on collective error; pull-to-refresh re-issues
   every DVM's kind-5300.
2026-04-19 00:12:26 +00:00
Claude 9fbe8eba78 refactor(pdf): share Coil disk cache, gate on showImages, cap bitmap size
- PdfFetcher now reuses Amethyst.instance.diskCache (Coil) via
  openSnapshot/openEditor instead of a custom cacheDir folder. PDFs share
  the same LRU budget as images and benefit from automatic eviction.
- PdfPreviewCard now respects accountViewModel.settings.showImages():
  when disabled, shows a lightweight "Tap to load PDF" placeholder and
  only downloads+renders after the user opts in.
- Both the card thumbnail (1600px) and viewer page (2048px) bitmaps are
  capped to a maximum longest-side dimension, preventing OOM on very
  large or unusually tall PDF pages.
- PdfViewerDialog holds the cache snapshot for the dialog's lifetime so
  the underlying file can't be evicted mid-view, and closes it in
  DisposableEffect alongside the renderer and ParcelFileDescriptor.
2026-04-18 23:59:50 +00:00
Claude 60a56440d1 refactor(feeds): unify content warning behind ContentWarningGate
Collapse the per-media, per-blurhash and grid-of-blurhash variants into a
single ContentWarningGate that takes a backdrop slot and a sizing
modifier. Callers choose the backdrop (single blurhash, grid of
blurhashes, or none).

Remove the isSensitive field from MediaUrl{Image,Video}; it was a
rendering concern leaked into a media model. Sensitivity is now only
expressed to the gate. Picture/Video feeds and their display variants
compute isSensitive + reasons themselves and wrap with the gate.

ZoomableContentView keeps a default internal gate (fires when
content.contentWarning != null) so the 14 callers that don't need
grid-level handling still get the blurhash overlay automatically.

Also rename collectPictureReasons to collectContentWarningReasons.
2026-04-18 23:58:36 +00:00
Claude ecdbc80fc1 feat: preview PDF links inline with first-page thumbnail and full pager
Adds MediaUrlPdf / PdfSegment to the rich-text pipeline so PDF URLs
(detected by .pdf extension, NIP-92 imeta m tag, or application/pdf
Content-Type) render a card showing the first page, filename, and page
count. Tapping opens a full-screen HorizontalPager over every page
rendered on demand with PdfRenderer. Long-press surfaces the existing
share menu. Uses only the built-in Android PdfRenderer; no new
dependencies. Desktop continues to fall back to a clickable link.
2026-04-18 23:06:49 +00:00
Claude 309e474a3d fix(dvm-card): star top-right + move reactions to bottom row
Putting the star back where the user actually sees DVMs first — the
Discover Content card. Two changes that together stop the layout
from breaking:

- FavoriteDvmToggle now uses ClickableBox + small Icon (no IconButton
  padding) so it occupies the same compact footprint as LikeReaction.
  Adding it to LeftPictureLayout's title row no longer inflates the
  row height.
- DVMCard's title row now holds only the name (weight 1) plus the
  star toggle on the right. LikeReaction and ZapReaction move down
  to the bottom row, pushed to the far right with a Spacer(weight 1)
  so the amount/personalised chips stay on the left.
2026-04-18 23:02:53 +00:00
Claude d34b5702a5 feat(feeds): single grid-level content warning with distinct reasons
Multi-image picture posts now show one warning covering the whole grid
instead of one per image (which required tapping each individually). The
warning backdrop is a grid of the images' blurhashes, and the overlay
lists any distinct reasons collected from both the event's content-warning
tag and per-imeta content-warning fragments as chips. Preloads every
image in the grid while the warning is visible.
2026-04-18 22:59:39 +00:00
Claude 85fcf50df9 feat: warn and offer cleanup for deleted items in pin and bookmark lists
Adds a dismissible top-of-screen banner to the Pinned Notes, Bookmarks,
Old Bookmarks, and Bookmark Set (detail) screens that appears when one
or more listed items have been deleted by their author (kind-5 deletion,
pubkey-matched via DeletionIndex). Tapping "Remove from list" rewrites
the underlying list event (NIP-51 kind 10001/10003/30001/30003) with
the deleted entries stripped out and broadcasts it once.

The scan is scoped to each screen's loaded list (typically <20 items)
and runs only while composed, so it avoids the performance hit of
hooking Account.deletedEventBundles, which fires for every kind-5
deletion in the firehose. Public and private (NIP-44 encrypted)
bookmarks are both cleaned in a single resign() call per list.
2026-04-18 22:58:54 +00:00
Claude 8555074c3f feat(dvm-favorites): settings page + revert DVM card regression
- Remove FavoriteDvmToggle from DVMCard's title row; the extra
  IconButton was expanding the row and pushing the title down so
  the whole Discover→DVMs card layout looked broken. The toggle
  stays on the DvmContentDiscoveryScreen top bar, which was the
  user's expected place to follow/unfollow.
- Add a "Favourite DVMs" page under Settings (Route.EditFavoriteDvms,
  modelled after the Blossom servers settings) listing each
  favourited content-discovery DVM with its avatar/name/description
  and a delete button. Tapping a row opens the DVM detail screen.
  Empty state points users to Discover for adding more.
2026-04-18 22:48:55 +00:00
Claude 00ab199e32 fix(feeds): clip + preload content warning on cropped grid cells
- Pass contentScale through to ContentWarningOverBlurhash so grid cells
  (ContentScale.Crop) use fillMaxSize instead of forcing the image's
  native aspect ratio, keeping the blurhash and overlay within the cell.
- Clip the overlay to its bounds to stop the icon/button from drawing
  over neighboring cells or other components.
- Preload the image through Coil while the warning is visible so the
  image is cached by the time the user taps "Show anyway".
2026-04-18 22:36:04 +00:00
Vitor Pamplona aca37b80db Merge pull request #2444 from vitorpamplona/claude/optimize-okhttp-images-N3KJA
Optimize media loading with improved HTTP connection pooling
2026-04-18 18:13:54 -04:00
Claude ee94dba570 fix(home): route DVM listen subscription to DVM relays + wire pull-to-refresh
Two issues from the first pass:

1. Response routing. The kind-5300 request goes to the DVM's own
   inbox/used relays, but `filterHomePostsByDvmIds` was subscribing
   for kind 6300/7000 on the user's outbox/proxy relays. Most DVMs
   only publish their replies on their own relays, so the listen
   subscription would silently miss every response.

   Fix: `Account.requestDVMContentDiscovery` now exposes the relay
   set the request was sent to, the orchestrator stores it on the
   snapshot as `responseRelays`, and `FavoriteDvmTopNavPerRelayFilterSet`
   carries two distinct relay sets — `contentFetches` (user's outbox,
   for the actual notes) and `listenRelays` (DVM's relays, for the
   6300/7000 reply subscription). `filterHomePostsByDvmIds` issues
   each on the right relay.

2. Pull-to-refresh. Swiping down on Home only re-rendered the cached
   feed. When a `TopFilter.FavoriteDvm` is active it now also calls
   `orchestrator.refresh(addr)` so a fresh kind-5300 request is
   published to the DVM.
2026-04-18 21:57:56 +00:00
Claude 843da0b383 fix(home): restrict favourite DVM list to content-discovery DVMs
Only NIP-90 content discovery (kind 5300) DVMs can produce a feed.
Other DVM types (image generation, translation, search, etc.) would
silently hang the home banner waiting for a 6300 reply that will
never come.

Defence in depth:
- FavoriteDvmToggle hides itself when the AppDefinitionEvent doesn't
  advertise kind 5300, so users can't favourite the wrong type.
- TopNavFilterState.mergeInterests filters out any list entry whose
  AppDefinitionEvent doesn't include kind 5300, so a stale or
  cross-client entry won't surface as a Home chip.
2026-04-18 21:27:13 +00:00
Claude 6dc723ae2c feat: auto-unpin deleted posts from NIP-51 pin list
When a kind-5 deletion event arrives for a note that is currently pinned,
rewrite the user's PinListEvent to drop the deleted entries and broadcast
the new list. Mirrors the existing deletedNotes() pattern used by
peopleLists, followLists, and labeledBookmarkLists in Account.

Previously the Pinned Notes screen silently hid deleted posts via the
FeedContentState deletion filter, leaving orphan entries in the pin list
that the user had no way to clean up.
2026-04-18 21:07:16 +00:00
Claude 79cb480ea4 perf(media-http): log phase timings and dispatcher queuing
Adds MediaCallEventListener on the images/videos OkHttpClient. For each
call it records DNS, TCP, TLS, TTFB, total time, connection reuse, and
the dispatcher queue depth at call start.

Release builds log only when a call is slow (>= 1.5s), was queued by
the dispatcher (saturation of maxRequests / maxRequestsPerHost), or
failed. Debug builds log every call.

Purpose: give us signal on whether the new 16/host + 128/total limits
are still the ceiling, and whether remaining latency is DNS, TLS, or
server-side.

https://claude.ai/code/session_01PUbqGyUc6oq6V1MdmLi8sw
2026-04-18 20:46:53 +00:00
Claude 9cca64f6ac perf: tune image/video OkHttp dispatcher and connection pool
OkHttp's default dispatcher caps inflight requests per host at 5 and
total inflight at 64. Amethyst feeds typically pull most media from a
single host (e.g. a primary Blossom/imgproxy server), so that per-host
cap serialized feed loading — the browser-feels-faster effect.

- Give the images/videos factory a dedicated Dispatcher (16 per host,
  128 total on device; 5/64 on emulator).
- Give it a larger ConnectionPool (32 idle, 5 min keep-alive) so HTTP/2
  connections to the common media host stay warm across scrolls and
  avoid repeated TLS handshakes.
- Extract isEmulator() to a shared helper used by both the relay and
  image/video factories.

The relay factory is untouched (already tuned for websockets).

https://claude.ai/code/session_01PUbqGyUc6oq6V1MdmLi8sw
2026-04-18 19:34:12 +00:00
Claude 25ecd94487 feat(home): add favourite-DVM top-nav filter
Lets users mark NIP-90 content-discovery DVMs (kind 31990 with k=5300)
as favourite and surface each as a chip in the Home top-nav alongside
hashtags/communities. Selecting a chip publishes the 5300 request,
listens for 6300/7000 responses, and renders the curated feed in
place. A banner above the feed reports processing / payment-required
/ error status and reuses the NWC pay flow extracted from
DvmContentDiscoveryScreen.

- quartz: FavoriteDvmListEvent (NIP-51-style replaceable, kind 10090)
- model: FavoriteDvmListState + backup-on-save + Account mutators
- model: FavoriteDvmOrchestrator for the 5300 request/6300 response
  lifecycle, exposing a per-address StateFlow<Snapshot>
- topNavFeeds/favoriteDvm: TopFilter.FavoriteDvm variant + filter
  classes + FeedFlow wired into FeedTopNavFilterState
- home: FilterHomePostsByDvmIds dispatched by HomeOutboxEventsEoseManager
- UI: FavoriteDvmToggle (star icon on DVM cards + DvmTopBar),
  HomeDvmStatusBanner, new DVMS group and icon in FeedFilterSpinner
2026-04-18 19:12:47 +00:00
Claude 1166654149 refactor(feeds): push content warning into ZoomableContentView per media
Move the blurhash-aware sensitivity warning from feed card wrappers into
ZoomableContentView so every media item shows its own warning sized to
its own aspect ratio over its own blurhash. Grid posts now warn per
image instead of once over the whole grid.

- Add isSensitive to MediaUrl{Image,Video} (defaults to contentWarning != null)
- Populate isSensitive and contentWarning when building media in the
  picture, video, and file-header feeds plus their display variants
- Drop the outer SensitivityWarning wrappers now handled inside
  ZoomableContentView via SensitivityWarningOverBlurhash
2026-04-18 18:51:17 +00:00
Claude 75c96115cb feat(feeds): overlay content warning on blurhash at media size
In the picture and video feeds, render the sensitivity warning over the
media's blurhash placeholder using the media's aspect ratio, instead of
a fixed-size dialog that hides the context entirely. Falls back to the
existing dialog when no blurhash is available.
2026-04-18 15:53:41 +00:00
Vitor Pamplona 8c71d490a7 Merge pull request #2441 from vitorpamplona/claude/marmot-protocol-tests-YZPul
Add Marmot interop test harness for Amethyst ↔ whitenoise-rs
2026-04-18 10:47:47 -04:00