SkateSpots/src/hooks
shakespeare.diy b910141699 fix(amber): stop passive decryption from storming Amber on navigation (1.2.16)
With Amber as signer, every nip44 decrypt is a foreground intent (visible
popup). Several hooks decrypt inside auto-running queries, so Amber flashed on
navigation/focus and (worst case) storms — one popup per encrypted event, and
polling queries re-fired every few seconds.

New helper isInteractiveSigner() (signerCapabilities.ts) detects the Amber
(x-amber) signer, where each crypto op prompts the user. Hooks now gate passive
decryption for interactive signers only; extension/nsec/bunker keep their
silent, live-polling behaviour.

Fixes:
- useCrewDismissals (GLOBAL via header NotificationBell — the main offender):
  Amber users now use the instant localStorage mirror only, never passively
  decrypt the synced list; disabled refetchOnWindowFocus + Infinity staleTime.
  Dismissals still sync OUT on the write path.
- useDirectMessages (all 4 DM query hooks): added amberSafeQueryOptions() —
  no background polling and no focus refetch for Amber (these decrypt up to
  ~200 gift wraps × 2 each); silent signers keep the 60s poll.
- useStash / usePrivateContacts: disabled focus refetch + Infinity staleTime
  for Amber so the single decrypt runs once, not on every focus.
- useCordnChat: dropped the 5s live poll for Amber (was a popup every 5s);
  silent signers keep it.

Scanned every signEvent call site: all are inside mutations/user callbacks
(zaps, invites, DMs, chat, follows, purchases, NIP-98 auth) — no passive
auto-signing anywhere. Deliberate user actions still prompt Amber as intended.

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-09-07 14:57:35 +07:00
..
wallet Gate built-in Cashu mint wallet to native-only (browser CORS reality) 2026-07-24 17:32:40 +07:00
useActivityNotifications.ts Give admins moderator control over events + fix a spoofing hole 2026-09-03 14:40:17 +07:00
useAdminModeration.ts Make admin delete non-blocking + polish notification bell 2026-09-03 22:59:16 +07:00
useAppContext.ts New project created with Shakespeare 2026-06-15 19:49:07 +07:00
useAuthor.ts Fix generic npub names: query profile aggregators in parallel in useAuthor 2026-07-25 14:01:55 +07:00
useBatchTrustScores.ts #2 Silence expected 'no follow list' warn in useBatchTrustScores 2026-08-27 10:19:23 +07:00
useBTCMap.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useBtcMapPlaces.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useCoaches.ts #2 Reduce console noise: strip debug logs from relay queries, publish, trust score, weather, coaches, NostrSync 2026-08-27 10:17:01 +07:00
useCollectiveJoinRequests.ts Collective join-requests: one-tap approve from the bell 2026-09-03 15:49:49 +07:00
useCollectiveMembers.ts Crews: opt-in member visibility + Lab vouch/web-of-trust anti-fraud + CrewDetail redesign 2026-08-10 21:01:57 +07:00
useCommentCounts.ts Fix 78 pre-existing TypeScript errors surfaced by npm test 2026-09-03 21:18:02 +07:00
useComments.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useCordnChat.ts fix(amber): stop passive decryption from storming Amber on navigation (1.2.16) 2026-09-07 14:57:35 +07:00
useCrewActivity.ts Crews: proximity discovery, activity/rep signals, treasury, hiring pipeline, crew-hosted events + reverse links; add Contacts page 2026-07-25 12:38:45 +07:00
useCrewAgentChat.ts Make Crew Agent genuinely crew-aware; swap bee emoji for Sasquatch avatar 2026-09-03 18:55:54 +07:00
useCrewChatRead.ts Crew chat: subtle "New" divider for messages since last visit 2026-09-03 15:58:54 +07:00
useCrewChatUnread.ts Crew chat: unread dot on the Chat tab (cheap, honest, no bell spam) 2026-09-03 18:21:38 +07:00
useCrewDismissals.ts fix(amber): stop passive decryption from storming Amber on navigation (1.2.16) 2026-09-07 14:57:35 +07:00
useCrewEvents.ts Crews: proximity discovery, activity/rep signals, treasury, hiring pipeline, crew-hosted events + reverse links; add Contacts page 2026-07-25 12:38:45 +07:00
useCrewFeed.ts Step 3: Crews — map-anchored collective feature (kind 35006) 2026-07-24 13:59:50 +07:00
useCrewGoal.ts security: verify invoice amounts + require provider-issued zap receipts (1.2.14) 2026-09-07 11:45:21 +07:00
useCrewInvites.ts fix(amber): drive native signing/encryption via OS Intent + deep-link callback 2026-09-04 21:03:52 +07:00
useCrewmates.ts Crews: proximity discovery, activity/rep signals, treasury, hiring pipeline, crew-hosted events + reverse links; add Contacts page 2026-07-25 12:38:45 +07:00
useCrewModeration.ts Add crew admin moderation + invite actions 2026-07-24 17:01:28 +07:00
useCrewNip05.ts Add soft NIP-05 verification for skaters (open directory + "Verified" filter) 2026-09-02 21:51:11 +07:00
useCrewNotifications.ts Lab collective join-requests → notification bell 2026-09-03 15:41:03 +07:00
useCrewRole.ts Add crew NIP-05 (any-domain, founder-verified) + founder/delegated-admin governance 2026-07-24 16:46:20 +07:00
useCrews.ts Admins can delete/take down any listing (spot, crew, tour, event, shop) 2026-08-18 17:51:34 +07:00
useCrewsForSpot.ts Crews: proximity discovery, activity/rep signals, treasury, hiring pipeline, crew-hosted events + reverse links; add Contacts page 2026-07-25 12:38:45 +07:00
useCrewZap.ts security: verify invoice amounts + require provider-issued zap receipts (1.2.14) 2026-09-07 11:45:21 +07:00
useCurrentUser.ts Fix Amber native login in APK: reliable Capacitor detection (v1.1.7) 2026-08-27 14:00:39 +07:00
useCVMClient.ts Sasquatch: full public-data coverage (all Lab crafts + shops + tours) 2026-08-27 16:14:20 +07:00
useCVMServerHealth.ts Add owner-only ContextVM server health check (Settings > Advanced) 2026-07-29 22:27:22 +07:00
useDeleteEntity.ts fix(amber): Amethyst-style foreground-intent signer to end the GrapheneOS sign hang 2026-09-07 12:39:00 +07:00
useDirectMessages.ts fix(amber): stop passive decryption from storming Amber on navigation (1.2.16) 2026-09-07 14:57:35 +07:00
useDMRead.ts DM inbox: real unread indicators (was hardcoded to 0) 2026-09-03 18:35:13 +07:00
useEventRsvps.ts Events discovery polish + real bug/perf fixes across the grid 2026-09-03 14:47:02 +07:00
useEventUpdates.ts Give admins moderator control over events + fix a spoofing hole 2026-09-03 14:40:17 +07:00
useExchangeRate.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useFeaturedVerification.ts security: verify invoice amounts + require provider-issued zap receipts (1.2.14) 2026-09-07 11:45:21 +07:00
useFollowing.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useFollowList.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useFoodSpots.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useGeolocation.ts Crews: proximity discovery, activity/rep signals, treasury, hiring pipeline, crew-hosted events + reverse links; add Contacts page 2026-07-25 12:38:45 +07:00
useGigs.ts Interconnect Music ↔ Events: featured musician on events + gig list on musician profiles; count new Lab crafts in growth stats; document visibility/vouch/gig conventions in NIP.md 2026-08-10 22:02:22 +07:00
useGrowthStats.ts Make community stat cards clickable to view full lists 2026-08-27 15:17:45 +07:00
useIsMobile.tsx fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useLabProfiles.ts Add Judges tab to The Lab 2026-08-27 15:30:43 +07:00
useLightningAddress.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useListingReports.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useListingRestrictions.ts Fix 78 pre-existing TypeScript errors surfaced by npm test 2026-09-03 21:18:02 +07:00
useLocalStorage.ts New project created with Shakespeare 2026-06-15 19:49:07 +07:00
useLoggedInAccounts.ts Fix 78 pre-existing TypeScript errors surfaced by npm test 2026-09-03 21:18:02 +07:00
useLoginActions.ts Fix amber login type: use x-amber instead of amber 2026-07-09 14:57:20 +07:00
useMarketplace.ts Rename "The Quiver" to "Stash" for brand consistency 2026-09-02 19:41:45 +07:00
useMembershipAttestation.ts Crews: opt-in member visibility + Lab vouch/web-of-trust anti-fraud + CrewDetail redesign 2026-08-10 21:01:57 +07:00
useNavPreferences.ts Add desktop top-nav customization (Settings > Appearance > Navigation) 2026-07-29 22:09:20 +07:00
useNewsletterIssues.ts Add Nostr-native newsletter: subscribe, mailbox & notifications 2026-09-03 19:16:49 +07:00
useNewsletterRead.ts Add Nostr-native newsletter: subscribe, mailbox & notifications 2026-09-03 19:16:49 +07:00
useNewsletterSubscriberCount.ts Newsletter: subscriber count + admin archive backfill to Nostr 2026-09-03 19:21:09 +07:00
useNewsletterSubscription.ts Add Nostr-native newsletter: subscribe, mailbox & notifications 2026-09-03 19:16:49 +07:00
useNostr.ts New project created with Shakespeare 2026-06-15 19:49:07 +07:00
useNostrPublish.ts #2 Reduce console noise: strip debug logs from relay queries, publish, trust score, weather, coaches, NostrSync 2026-08-27 10:17:01 +07:00
useNotificationsRead.ts Fix notification badge sticking after "Mark read" 2026-09-03 23:46:39 +07:00
useNutzap.ts Nutzap safety gate + crew↔Lab cross-linking 2026-07-24 14:27:51 +07:00
useNWC.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useNWCContext.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useOfflineCache.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
usePersonalContext.ts Sasquatch Pro Phase 1: read-only personal assistant tools 2026-07-29 23:21:37 +07:00
usePlatformFee.ts Add duration tiers + layered NIP-57 zap verification, extend featured/Pro to tours 2026-07-24 16:18:15 +07:00
usePostComment.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
usePrivateContacts.ts fix(amber): stop passive decryption from storming Amber on navigation (1.2.16) 2026-09-07 14:57:35 +07:00
usePurchasePro.ts Fix zap request construction for newer nostr-tools types 2026-09-03 22:14:46 +07:00
useQRCodeScanner.ts Add optional CLINK (noffer) self-custodial payments to Lab profiles + shops 2026-07-24 12:34:50 +07:00
useRelatrScore.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useRiderStats.ts feat: SkateSpots Rider Cards — 3 card types, 6 themes, holographic shimmer, print-ready 2026-06-16 14:29:54 +07:00
useSasquatchActions.ts Sasquatch Pro Phase 2: action drafting (draft → you confirm) 2026-07-29 23:41:11 +07:00
useSasquatchGuide.ts Fix Sasquatch "Learn More" landing on home instead of /onboarding 2026-08-27 11:20:53 +07:00
useSasquatchPro.ts security: verify invoice amounts + require provider-issued zap receipts (1.2.14) 2026-09-07 11:45:21 +07:00
useSellerInfo.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useSellerSales.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useShakespeare.ts chore: clean up console noise - remove debug logs from NostrProvider, NostrSync, useShakespeare 2026-06-16 22:23:00 +07:00
useShops.ts perf: lazy loading, faster timeouts, better caching, chunk splitting 2026-06-18 11:32:24 +07:00
useSkateEvents.ts Admins can delete/take down any listing (spot, crew, tour, event, shop) 2026-08-18 17:51:34 +07:00
useSkateRelays.ts Make community stat cards clickable to view full lists 2026-08-27 15:17:45 +07:00
useSkaters.ts Add Skater profiles (kind 35000) + /skaters directory 2026-09-02 20:58:51 +07:00
useSkaterVerifications.ts Add soft NIP-05 verification for skaters (open directory + "Verified" filter) 2026-09-02 21:51:11 +07:00
useSkateShops.ts Admins can delete/take down any listing (spot, crew, tour, event, shop) 2026-08-18 17:51:34 +07:00
useSkateSpots.ts Admins can delete/take down any listing (spot, crew, tour, event, shop) 2026-08-18 17:51:34 +07:00
useSpotChat.ts Add Spot Chat: ephemeral geohash-anchored local chat channels 2026-07-24 14:52:48 +07:00
useSpotCollections.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useSpotContributions.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useSpotServices.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useSpotStatus.ts Add community Spot Status Reports (kind 2259) 2026-07-24 23:06:10 +07:00
useSpotWeather.ts #2 Reduce console noise: strip debug logs from relay queries, publish, trust score, weather, coaches, NostrSync 2026-08-27 10:17:01 +07:00
useStash.ts fix(amber): stop passive decryption from storming Amber on navigation (1.2.16) 2026-09-07 14:57:35 +07:00
useStashShowcase.ts Rename "The Quiver" to "Stash" for brand consistency 2026-09-02 19:41:45 +07:00
useTheme.ts New project created with Shakespeare 2026-06-15 19:49:07 +07:00
useToast.ts New project created with Shakespeare 2026-06-15 19:49:07 +07:00
useTours.ts Admins can delete/take down any listing (spot, crew, tour, event, shop) 2026-08-18 17:51:34 +07:00
useTrustScore.ts #2 Reduce console noise: strip debug logs from relay queries, publish, trust score, weather, coaches, NostrSync 2026-08-27 10:17:01 +07:00
useUploadFile.ts Audit fixes: harden Amber signEvent response handling, fix web AmberSigner signEvent naming, add Blossom upload fallbacks, sanitize untrusted URLs in FoodPage/CreateTourPage 2026-09-03 20:20:08 +07:00
useUserStatus.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useVouches.ts Crews: opt-in member visibility + Lab vouch/web-of-trust anti-fraud + CrewDetail redesign 2026-08-10 21:01:57 +07:00
useWallet.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
useZaps.ts security: verify invoice amounts + require provider-issued zap receipts (1.2.14) 2026-09-07 11:45:21 +07:00