Commit Graph

4880 Commits

Author SHA1 Message Date
lemon f2fa16c3bb Add 'Verify campaigns' as a third onboarding role
Extend OnboardingRole and StartSignupOptions to include 'verifier', add a
third RoleCard to the role picker, and wire the pick handler to branch on
the new role. For now the verifier pick routes to the public /organizations
onboarding tool; a later commit replaces this with a captive sub-flow.
2026-06-14 10:29:34 -07:00
Alex Gleason 0d334e89e7 Merge branch 'tor-arti-android' into 'main'
Add optional Tor (arti) routing on Android

Closes #28

See merge request soapbox-pub/agora!42
2026-06-13 19:25:39 +00:00
Barrett O. 886d3ece18 Add optional Tor (arti) routing on Android
Adds an opt-in Tor mode that routes all app traffic through a local
SOCKS5 proxy backed by arti (Tor in Rust), bundled via the
org.torproject:arti-mobile:1.7.0.1 AAR.

- TorController starts/stops arti and installs a fail-closed WebView
  proxy override (no direct fallback) so traffic can't leak while Tor is
  connecting or down. Connectivity is verified against
  check.torproject.org (IsTor) and re-checked continuously; the exit IP
  is surfaced for verification, and the status isn't latched so a dropped
  circuit downgrades honestly.
- TorPlugin bridges enable/disable/status to the Capacitor/JS layer.
  Toggling applies live, in place, with no app restart.
- UI: a slim fail-closed status banner (replacing the old full-screen
  gate), the Tor toggle in Advanced settings reachable while logged out,
  and Settings/Search/About added to the logged-out menu.
- R8 keep rules for org.torproject.arti.** so the JNI native-method
  classes aren't stripped/renamed; androidx.webkit on the compile
  classpath for the WebView proxy APIs.
2026-06-13 16:26:58 +00:00
Alex Gleason 7ffaccb304 Fix Agora meta description to reflect crowdfunding focus
The meta description still framed Agora as a generic Nostr social
client. Update it to describe the actual product: peer-to-peer
crowdfunding with an integrated non-custodial on-chain Bitcoin wallet.
2026-06-12 17:13:37 -05:00
Alex Gleason e196227a23 Add animated verify-campaign tutorial after publishing statement
Once an organization publishes its verifier statement on /organizations,
show an interactive walkthrough demonstrating how to verify a campaign:
a looping three-step animation on a mock campaign card where a cursor opens
the three-dots menu and selects 'Verify this campaign'. Step list is
clickable to scrub; motion is gated behind prefers-reduced-motion.
2026-06-12 16:00:35 -05:00
Alex Gleason 818afe9bbf Fix campaign card navigation when clicking inside verify dialog
The campaign card wraps its contents in a react-router <Link>. The
moderation menu's VerificationDialog and CampaignListMembershipDialog
portal their DOM out of the card, but React synthetic events still
bubble through the component tree to the Link — so clicking anywhere
in either dialog navigated to the campaign page. Wrap both dialogs in
a span that stops click/pointerdown propagation, mirroring the guards
already on the dropdown trigger and content.
2026-06-12 15:41:41 -05:00
Alex Gleason c2179fef2b Let verifiers reach the campaign verify action
The 'Verify this campaign' control was gated on the hardcoded moderator
pack. Extend eligibility to self-declared verifiers (accounts with a
kind 14672 verifier statement): useCampaignVerifications now exposes
canVerify (moderator OR verifier) and its verify mutation accepts
verifiers.

The campaign moderation kebab (ModerationMenu / ModerationOverlay) now
renders for verifiers too, but shows only the verify row — the
moderator-only items (Hide, Add to list) and the Hidden badge stay
gated on moderator status. Pledge and group surfaces are unchanged.
2026-06-12 15:35:56 -05:00
Alex Gleason d0d315a9b2 Add 'Verified' tab to verifier profiles, defaulting to it
Verifier profiles (accounts with a kind 14672 statement) now get a
'Verified' tab listing the campaigns they have vouched for, resolved
from the account's own agora.verified (kind 1985) labels via the new
useVerifiedCampaigns hook. The tab is surfaced first and becomes the
default on initial load (without overriding a manual tab selection),
on both desktop and mobile. Non-verifiers never see the tab.

Adds ProfileVerifiedTab, the useVerifiedCampaigns hook, and profile.tabs
/ profile.verified i18n keys across all locales.
2026-06-12 15:19:33 -05:00
Alex Gleason debeaddba2 Move verifier statement back into the left identity rail
Restore ProfileVerifierSection to its original spot as the first item in
ProfileOverviewSections (left sidebar on desktop, overview tab on mobile),
reverting the full-width-above-tabs placement. Keeps the 'How We Verify'
heading inside the box and no shield icon.
2026-06-12 15:02:15 -05:00
Alex Gleason 1324506b20 Move 'How We Verify' heading inside the verifier statement box 2026-06-12 14:54:27 -05:00
Alex Gleason 34556ceed2 Move verifier statement full-width above profile tabs
Surface a verifier's kind 14672 statement as a full-width band above the
profile tabs (below the header) on both desktop and mobile, instead of
tucked into the left identity rail / overview tab.

Drop the shield-check icon and rename the heading to 'How We Verify' —
the statement is a self-authored claim, not a platform endorsement, so
the heading stays neutral with no trust-implying badge. Rename the
verifier.profileSectionTitle key to verifier.howWeVerifyTitle across all
locales.
2026-06-12 14:50:49 -05:00
Alex Gleason 706a3ef2eb Remove 'Why it matters' section from /organizations
Drop the benefit-cards section between the steps and the editor, along
with the now-unused BenefitCard component, Users/Eye/cn imports, and the
organizations.why.* i18n keys across all locales.
2026-06-12 14:32:57 -05:00
Alex Gleason 43fecb6e6f Add WYSIWYG markdown editor for verification statements
Restore the deleted Milkdown WYSIWYG editor (its deps and CSS were still
installed) as a reusable component under src/components/markdown/:
MilkdownEditor, a formatting toolbar (bold/italic/headings/lists/links/
quote/code/hr + markdown help popover), and an insert-link dialog. All
strings are now i18n-driven via a new mdEditor locale block, translated
across every locale.

Wire it into the /organizations verifier-statement editor, replacing the
raw textarea + separate live preview with rich-text editing that emits
markdown. Fix the editor placeholder so it only shows while empty by
toggling a has-content class on the ProseMirror DOM.
2026-06-12 14:29:08 -05:00
Alex Gleason 33852f60fb Redesign /organizations as a marketing + onboarding landing page
Rework the /organizations page to match the /about landing style so it
doubles as marketing and a functional tool: a dark world-map hero with a
scroll-to CTA, a three-step onboarding section, benefit cards, and a
'get started' section housing the verifier-statement editor. Logged out
shows the org-profile login gate; logged in shows the full publish /
update / withdraw editor.

Move the route to the wide FundraiserLayout so section backgrounds span
the viewport, and expand the organizations i18n block (hero, steps, why,
getStarted) across all locales.
2026-06-12 14:16:03 -05:00
Alex Gleason 2e5d160a9e Add /organizations onboarding page, move verifier form off settings
Replace the /settings/verifier route with a public /organizations help
page that onboards organizations onto Agora. Logged-out visitors are
prompted to log in with — or create — their organization's Nostr
profile; once signed in they get the full verifier-statement editor
that previously lived under settings.

Remove the Verifier entry from the settings list, delete
VerifierSettingsPage, and link /organizations from the site footer
instead. The old /settings/verifier path now redirects to
/organizations.
2026-06-12 14:06:24 -05:00
Alex Gleason 21465ebc5f Remove verifier header subtitle from settings page
The Verifier page was the last settings page still rendering an in-header
subtitle. Drop it from both the logged-in and login-gate headers (the
verifier.subtitle string is still used as the SEO meta description).
2026-06-12 13:49:44 -05:00
Alex Gleason 8f0a215d54 Fix settings header/body width mismatch and tighten back-arrow gap
Move the header's horizontal padding onto the inner content row so the
constrained column matches the body's max-w column exactly (previously the
header column was 32px wider than the body content under the narrow
max-w-3xl layout). Reduce the back-arrow-to-title gap from gap-4 to gap-1.5.
Migrate EventDashboard's header layout classes from className to
contentClassName to match the new model.
2026-06-12 13:48:32 -05:00
Alex Gleason 8bd8fe7d05 Remove Bot account toggle from profile settings
The bot value stays in the form schema and is preserved on save; only the
toggle UI is removed. Drops the now-unused Switch and Form sub-component
imports.
2026-06-12 13:40:08 -05:00
Alex Gleason 8f750a222f Remove profile field editing UI from edit-profile view
Delete the Website, Lightning address, sortable custom-fields list, and
add-field preset pills (the entire Profile Fields block) from the profile
settings form. Existing values are still loaded into form state, so they
are preserved on save and continue to render in the profile card and the
live sidebar preview — only the editing controls are gone.

Also removes the now-dead helpers, handlers, presets, SortableFieldRow
component, and unused imports.
2026-06-12 13:36:50 -05:00
Alex Gleason 0c4465bed3 Move Profile Fields into the Advanced section on profile settings 2026-06-12 13:27:47 -05:00
Alex Gleason e67c5dba75 Fix Settings header alignment and trim verbose copy
- Add an opt-in contentClassName to PageHeader so a page can constrain the
  header row to the same centered column as its body. Settings sub-pages now
  pass max-w-2xl/max-w-xl so the title and back arrow line up with the cards
  instead of floating against the viewport edge.
- Drop the entire header from the Settings hub (no title/back arrow); the
  grouped card list now reads the same on mobile and desktop.
- Remove redundant subtitles and intro blurbs from Appearance, Language,
  Network, Advanced, Profile, and Notifications.
- Delete the now-orphaned i18n keys across all locales.
2026-06-12 13:24:49 -05:00
Alex Gleason e8a9f679f9 Redesign Settings with Apple-inspired grouped UI
Rework the Settings hub and sub-pages into iOS-style grouped inset cards:
- Hub groups rows into Account / App / System sections, each row gets a
  colored gradient icon tile, with a rounded bg-card container and hairline
  dividers instead of the flat full-width list.
- Appearance and Language pickers use the same inset-card list rather than
  bordered selectable buttons.
- Network and Advanced replace the heavy accent-bar section headers with
  uppercase group labels above clean bg-card panels.
- Add settings.groups.{account,app,system} strings across all locales.
2026-06-12 13:00:13 -05:00
Alex Gleason 59c0d25fa6 Change verifier statement kind to 14672 2026-06-12 12:55:00 -05:00
Alex Gleason b271c4e889 Add verifier statements (kind 15063)
Anyone can become a verifier by publishing a kind 15063 replaceable
event whose Markdown content describes how they vet campaigns. The
statement is surfaced prominently in the profile overview so donors
can judge whether to trust the account's judgement.

- Document kind 15063 in NIP.md
- useVerifierStatement / useSetVerifierStatement hooks (read-modify-write)
- /settings/verifier form page with live preview, publish/withdraw
- ProfileVerifierSection rendered first in the profile overview
- Localize all strings across every locale
2026-06-12 12:42:50 -05:00
Alex Gleason f5398acb22 Correct AGENTS.md to reflect on-chain Bitcoin crowdfunding
Agora is a P2P crowdfunding client using on-chain Bitcoin with a
non-custodial HD wallet (BIP-86 Taproot, BIP-352 silent payments),
not a Lightning project. Update the overview, document the on-chain
wallet and crowdfunding hooks, and demote Lightning to secondary
tipping. Drop the stale useShakespeare hook reference.
2026-06-12 11:02:21 -05:00
Alex Gleason 4db37f9217 Merge branch 'main' of gitlab.com:soapbox-pub/agora 2026-06-11 17:06:49 -05:00
Alex Gleason 10a1c53e6a fix: don't advance SP scan cursor over unscanned gaps
A forward-jumping scan range (e.g. "Scan recent" on a wallet whose
cursor was far behind) recorded the skipped gap as scanned: runScan set
scanHeight = max(scanHeight, highestContiguousScanned) where contiguity
was measured only from the range's own fromHeight. The auto-scanner then
resumed from the new cursor, so payments received in the gap were
silently never discovered.

The cursor now only advances when the scan range is contiguous with the
effective persisted cursor (relay scanHeight or local checkpoint).
Non-contiguous scans still merge any UTXOs they find — only the cursor
is held back, so a later auto-scan pass walks the gap. Never-scanned
wallets (cursor 0) keep the documented bootstrap jump to a recent
window.
2026-06-11 16:37:52 -05:00
lemon b20e49bf20 Localize campaign list category headers 2026-06-10 22:45:36 -07:00
Alex Gleason c9d77d06a1 Rename "activist" to "recipient" in donation copy
The people receiving donations are not necessarily activists — they are
often simply people in need (e.g. in Venezuela and Gaza). Rename the
user-facing term from "activist" to "recipient" across all copy and the
underlying code.

- Rename ActivistGuidePage -> RecipientGuidePage and the /about/activists
  route -> /about/recipients (legacy URL kept as a redirect).
- Rename guide structure/helpers, the paymentComparison audience literal,
  and the related i18n key namespaces (activistGuide -> recipientGuide,
  about.guides.activist -> .recipient, guides.activist -> guides.recipient,
  activistRows/activistHeader -> recipientRows/recipientHeader,
  ctaActivist -> ctaRecipient).
- Translate the term in all 16 locales, plus fix stale "activists" hero
  taglines left over from 0233a75d in id/hi/sw/tr/zh-Hant.
2026-06-10 15:43:08 -05:00
Alex Gleason ab1a4ba0e8 Show scan progress bar on private wallet tab
The Private wallet tab only showed a spinner plus 'Scanning… block X / Y'
text while the silent-payment scanner ran, which gave no sense of how far
along the scan was. Render a Progress bar (matching the Scan options
dialog) above the block-count text so completeness is visible at a glance.
2026-06-10 15:17:04 -05:00
Alex Gleason 101926e961 fix: restore AudioPlayerProvider so audio/music/podcast pages don't crash
Profile and detail pages that render music tracks, podcast episodes, or
audio kinds call useAudioPlayer(), but the AudioPlayerProvider and its
companion floating-bar / navigation-guard components were deleted as
"orphaned" in 256560cf — they were never wired into App.tsx, so the hook
always threw "useAudioPlayer must be used within AudioPlayerProvider".

Restore the provider, MinimizedAudioBar, and AudioNavigationGuard, re-export
AudioPlayerContext from the context def, wrap AppRouter in the provider, and
render the two router-dependent components inside BrowserRouter.

Regression-of: 256560cf
2026-06-10 14:57:38 -05:00
Alex Gleason 9351d3e243 Speed up silent-payment scanning
Three changes target the scan pipeline's two bottlenecks (HTTP latency
and main-thread ECDH):

- Cache per-block tweak + UTXO data in IndexedDB (blockCache.ts) and
  route fetches through it. Mined blocks below the indexer tip are
  immutable, so a repeat or overlapping scan now costs zero round-trips
  for blocks already seen. Keyed by (indexerUrl, height); degrades
  gracefully when IndexedDB is unavailable.

- Move the secp256k1 ECDH + per-output Pk derivation into a dedicated
  Web Worker (scan.worker.ts + scanWorkerClient.ts). The scan loop no
  longer has to setTimeout(0) every 64 entries to keep the UI
  responsive, and fetching now overlaps with ECDH. The client falls back
  to a main-thread scan if the worker can't be constructed or errors on
  a block. bscan stays on-device — a same-origin Worker is not the
  remote scan-helper pattern BIP-352 contemplates.

- Make fetch concurrency tunable via AppConfig.bip352ScanConcurrency
  (clamped to [1, 32], default 8) so a fast self-hosted indexer can run
  hotter than the polite public-host default.
2026-06-10 14:29:02 -05:00
Alex Gleason 0233a75d5c Update hero tagline from 'activists' to 'the world' 2026-06-10 10:43:43 -05:00
Alex Gleason 450989f6ca feat: add moderation menu to campaign detail page hero
Moderators had no way to hide/verify/add-to-list a campaign from its
detail page — the hero toolbar only showed creator (edit/delete) controls.

Follow the same pattern as ActionDetailPage (pledge detail): place a
ModerationMenu in both the mobile and desktop toolbars of CampaignHero.
It returns null for non-moderators so no conditional wrapping is needed.

- Add coord and entityTitle props to CampaignHeroProps; thread them from
  CampaignDetailContent (campaign.aTag, campaign.title)
- Mobile: ModerationMenu sits in the right-side controls group, before
  the creator edit/delete buttons
- Desktop: ModerationMenu appears at the far right of the top overlay bar
  (after creator controls when present), styled with the same
  bg-black/30 backdrop-blur chip as ActionDetailPage
2026-06-10 09:22:46 -05:00
Alex Gleason cf0caa8c85 fix: merge moderation actions into list-member kebab to prevent overlay collision
On /campaigns/lists/:slug, ListMemberCard rendered its own reorder/remove
kebab at top-3 right-3 z-20, directly on top of CampaignCard's ModerationOverlay
(also top-3 right-3 z-10). The ListMemberCard kebab always won stacking order,
blocking moderators from accessing moderation actions on list-page cards.

- Add showModerationMenu prop to CampaignCard (default true); when false,
  ModerationOverlay renders only the Hidden badge (no menu trigger), keeping
  hide-state visibility without adding a second kebab in the same corner.
- ListMemberCard now passes showModerationMenu={false} to CampaignCard and
  embeds ModerationMenuItems directly into its own dropdown (below a separator
  after the reorder/remove items), giving moderators a single combined menu
  with both list-management and moderation actions.
- Dialog state (CampaignListMembershipDialog, VerificationDialog) is hoisted
  to ListMemberCard so the dropdown-unmount lifecycle doesn't tear them down.
2026-06-09 19:58:04 -05:00
Alex Gleason 2242692794 Checkpoint silent-payment scan progress locally every 5s
Scan progress was only persisted to the relay on a match or at end-of-scan,
so refreshing mid-scan re-scanned every block since the last completed scan.
Add a free, synchronous localStorage checkpoint of the advancing scanHeight
(throttled to 5s, plus a final write on finish) scoped per pubkey+indexer.
The auto-scanner now resumes from max(relay scanHeight, local checkpoint),
bounding mid-scan-refresh re-scan to ~5s of blocks without adding any
encrypt/sign/broadcast traffic. Relay publishing stays gated to matches and
end-of-scan for cross-device sync; manual scans still honor the exact
fromHeight the user picks.
2026-06-08 18:15:33 -05:00
Alex Gleason 8473a4990f Scan for silent payments automatically in the background
Lift the silent-payment orchestrator into an HdWalletSpProvider mounted at
the app root so a single shared scan instance keeps running across page
navigation. Add a background auto-scanner that resumes from the last
persisted scanHeight and keeps up with the chain tip without any user
action, bounding the first pass on a never-scanned wallet to ~7 days of
blocks. Surface live scan state on the Private wallet tab and add an
auto-scan toggle to the scan dialog.
2026-06-08 16:11:54 -05:00
Alex Gleason e5277f004e Show verification badge on campaign detail page
Add an inline variant of CampaignVerificationBadge that reads on a light
page surface (bordered chip with a 'Verified' label) and render it next to
the author byline in the campaign detail heading. The overlay variant (dark
pill) is unchanged for cards over banners.

New i18n key campaignVerification.verifiedLabel across all locales.
2026-06-06 19:24:27 -05:00
Alex Gleason 93bcf04ae9 Confirm campaign verification through a dialog
Clicking 'Verify this campaign' now opens a VerificationDialog instead of
publishing immediately. The dialog previews the moderator's own avatar
with the verification checkmark (as it appears on verified campaign cards)
and shows the attestation the moderator is making before confirming.

- New VerificationDialog component (avatar + checkmark preview + attestation
  text + Cancel / Verify actions).
- ModerationMenu owns the dialog state and the verify mutation, hoisted out
  of the dropdown content (which unmounts on select) like the existing
  add-to-list dialog; passes onRequestVerify down to CampaignVerifyItem.
- Removing a verification stays inline (no confirmation).
- New i18n keys dialogTitle + attestation across all locales.
2026-06-06 19:18:39 -05:00
Alex Gleason f95ab1b422 Treat campaign verification as a moderator action
Verification is gated by the existing campaign moderator pack
(useCampaignModerators / CAMPAIGN_MODERATORS), not a separate allowlist.

- Remove the config.labelers field (AppContext interface, Zod schema,
  App.tsx and TestApp defaults) and delete useCampaignLabelers.
- useCampaignVerifications now reads/writes agora.verified labels gated
  on the moderator pack (isModerator), same authors filter as the other
  label streams.
- Move the verify / remove-verification row INSIDE the moderation kebab's
  'Moderator actions' section (leadingExtra slot of ModerationItemsShell),
  no longer a top-level item above the section label.
- Revert the isMod || isLabeler widening in ModerationMenu/Overlay back to
  plain isMod.
- Remove the trailing 'Verified' checkmark text from 'Remove my
  verification'.
- Rename labeler->moderator in agoraVerification, the badge component, and
  all locale strings; drop now-unused notVerified / verifiedState keys.
- Update NIP.md to document verification as a moderator action.
2026-06-06 19:11:48 -05:00
Alex Gleason a4be9d9fbb Put verify row at top of campaign moderation menu
The verify / remove-verification row now renders above the moderator
rows. The moderator section's own 'Moderator actions' label provides the
visual separator, so no extra divider is needed between them.
2026-06-06 18:56:20 -05:00
Alex Gleason 1557e2fff9 Move campaign verify action into moderation kebab menu
The verify / remove-verification controls now live as rows in the
campaign 'Moderator actions' 3-dots menu instead of inside the
verification badge popover. The badge over the card is now display-only
(stacked verifier avatars + a popover listing them, linking to profiles).

Because labelers are a distinct allowlist from the moderator pack, the
campaign moderation menu/overlay now mounts for a user who is a mod OR a
labeler; the verify row itself is gated on labeler membership, while the
hide/add-to-list rows stay moderator-only.
2026-06-06 18:50:00 -05:00
Alex Gleason ba4a7f4e35 Add Me and MK as default campaign labelers 2026-06-06 18:46:02 -05:00
Alex Gleason b8c1bc7409 Add agora.verified campaign verification labels
Trusted labelers (AppConfig.labelers) can vouch for campaigns via NIP-32
kind 1985 labels in the new agora.verified namespace. Verifier avatars
render as a stacked badge on campaign cards; hovering/clicking opens a
popover listing verifiers (linking to their profiles). Logged-in labelers
get verify / remove-verification controls — verify publishes a label,
unverify issues a kind 5 deletion of their own label.

The read query filters by authors: labelers so verifications from outside
the allowlist are never honored. Kind 1985 label reqs are routed to the
search relays (relay.ditto.pub, relay.dreamith.to) in NostrProvider.
2026-06-06 18:06:36 -05:00
Alex Gleason 15718a575f Add Bitcoin backend config to Advanced settings
Expose the Esplora API endpoints, Blockbook URL, and BIP-352 silent
payment indexer (already wired through AppConfig) in a new Bitcoin
section on the Advanced settings page. Each field validates input,
normalizes trailing slashes, and offers a reset-to-default button;
clearing the indexer URL disables silent-payment scanning.
2026-06-05 18:34:25 -05:00
Alex Gleason 7775c0477f Merge branch 'main' of gitlab.com:soapbox-pub/agora 2026-06-05 17:15:50 -05:00
mkfain 07f77b8a99 Show all featured campaigns on home page instead of capping at 6
The home hero row sliced the Featured Campaigns list to the first 6
members (FEATURED_HERO_CAP). Drop the cap so the row renders every
campaign the curator has added — the existing hero layout (two
column-spanning cards + 4-up tail) already scales to any count. The
skeleton placeholder count stays bounded by FEATURED_SKELETON_CAP for
the loading state only.
2026-06-05 17:04:55 -05:00
mkfain 872e8428d2 Source home hero row from Featured Campaigns list
Switch the home-page hero row from the World Liberty Congress curated
list (d=world-liberty-congress) to the Featured Campaigns list
(d=featured-campaigns), both curator-published kind-30003 NIP-51
bookmark sets.

Replace the WLC org-branded heading (avatar, name, npub profile link
pulled via useAuthor) with a plain 'Featured Campaigns' heading that
links to /campaigns/lists/featured-campaigns. Drop the now-unused
Avatar / useAuthor / genUserName imports and the WLC pubkey/npub
constants.

Rename the WLC_* constants to FEATURED_* and replace the wlcDesc
locale key with featuredTitle + featuredDesc across all 16 locales.
2026-06-05 17:04:55 -05:00
Alex Gleason a8b2fe5ddf Stop /campaigns from hammering Esplora until every backend rate-limits
The campaigns grid renders up to 200 CampaignCards at once with no
virtualization, and each card eagerly ran useCampaignDonations: an
Esplora /address lookup per card (polling every 30s via refetchInterval)
plus a /tx verification call per kind-8333 donation receipt. On first
paint that's hundreds of /address calls and potentially thousands of
/tx calls in one burst, then 200 more /address calls every 30s forever.
Once mempool.space starts returning 429, the failover client retries
each call across every configured endpoint, cascading the rate-limit to
all of them.

Gate the donation lookup behind an IntersectionObserver so only on-screen
cards talk to Esplora, and drop the per-card 30s polling. The detail page
(a single instance, not a grid) opts back into the 30s live refresh via a
new refetchInterval option.

- Add useInView hook (once-only, rootMargin pre-arm, IO-less fallback).
- useCampaignDonations gains enabled + refetchInterval options; default
  no polling, longer staleTime; treat 'not enabled yet' as loading so
  off-screen cards show a skeleton instead of flashing '0 raised'.
- Gate CampaignCard and CampaignInlinePreview on visibility.
- CampaignDetailPage opts into refetchInterval: 30_000.
2026-06-05 16:54:22 -05:00
Alex Gleason a2dd16fc94 Merge branch 'main' of gitlab.com:soapbox-pub/agora 2026-06-05 16:46:39 -05:00