SkateSpots/src/lib
shakespeare.diy a984084464 Instant cold-start: query persistence, optimistic geolocation, skeleton pins
Three UX wins so the app feels "already loaded" the moment it opens:

1. IndexedDB React Query persistence (lib/queryPersister.ts)
   - PersistQueryClientProvider rehydrates the last-seen spots, shops,
     events, tours, crews, coaches, listings and author profiles from
     IndexedDB on cold start, so returning users land on a populated map
     instead of a blank one; fresh data refetches quietly in the
     background.
   - Strict allow-list / deny-list: only public, JSON-serializable,
     cold-start-relevant queries are persisted. Private/encrypted data
     (stash, DMs, contacts, wallet/nwc/cashu/bitcoin, signer) is NEVER
     written to disk. 24h maxAge + version buster keep it fresh & safe.
   - Pinned @tanstack/react-query + query-core + persist-client to a
     single 5.102.8 to avoid a query-core mismatch (partialMatchKey).

2. Optimistic geolocation (lib/lastLocation.ts)
   - getCurrentPosition now caches every successful fix.
   - The map opens ALREADY centered on the user's last-known area
     (city zoom) instead of the world view; "you are here" + proximity
     sort seed from the cache instantly.
   - "Near Me" flies to the cached location immediately on tap, then
     refines to the fresh GPS fix. Silent background warm-up on web map
     mount so a later tap resolves instantly.

3. Cold-start skeleton (components/MapSkeletonPins.tsx)
   - When the map is genuinely empty + loading, show elegant pulsing
     ghost pins + a "Finding spots" pill instead of a blank map; they
     vanish the instant real (or cached) spots render. Splash now
     signals content-ready when spots actually resolve.

Respects prefers-reduced-motion throughout. Build + runtime verified
clean (no console errors).

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-09-09 21:58:22 +07:00
..
cordn Cordn crew chat: ephemeral envelopes (coordinator can't see the sender) 2026-09-03 18:14:58 +07:00
stubs feat: map as homepage, 3D globe, camera fix, Sasquatch upgrades, UI/UX polish 2026-07-22 22:47:39 +07:00
wallet fix: remove orphaned canvas code from RiderCardPage causing ctx/Printer is not defined crash 2026-06-16 17:02:59 +07:00
admins.ts Spot detail: make mapper clickable + add Message Mapper button 2026-08-15 10:03:58 +07:00
amber.ts Harden all Amber signing paths against empty-id / bare-signature responses 2026-09-03 22:05:25 +07:00
bolt11.ts Add dependency-free BOLT11 amount decoder; drop removed nip57 helper 2026-09-03 22:20:27 +07:00
capacitorAmberSigner.ts fix(amber): Amethyst-style foreground-intent signer to end the GrapheneOS sign hang 2026-09-07 12:39:00 +07:00
citrine.ts Citrine audit: endpoint fallback, a11y, reduced-motion, UX polish (1.3.6) 2026-09-09 10:54:22 +07:00
crewAgent.ts Update Sasquatch avatar to the correct mascot image 2026-09-03 18:59:05 +07:00
crewHelpers.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
exchangeRateService.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
genUserName.test.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
genUserName.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
geolocation.ts Instant cold-start: query persistence, optimistic geolocation, skeleton pins 2026-09-09 21:58:22 +07:00
glossary.ts Glossary: drop difficulty levels, expand & correct tricks 2026-07-29 23:08:37 +07:00
lastLocation.ts Instant cold-start: query persistence, optimistic geolocation, skeleton pins 2026-09-09 21:58:22 +07:00
lightningAddress.ts Add duration tiers + layered NIP-57 zap verification, extend featured/Pro to tours 2026-07-24 16:18:15 +07:00
localModeration.ts Make admin delete non-blocking + polish notification bell 2026-09-03 22:59:16 +07:00
mintReachability.ts Platform-aware wallet mints (Option C: native + browser scoping) 2026-07-24 17:22:41 +07:00
newsletterArticle.ts Newsletter: subscriber count + admin archive backfill to Nostr 2026-09-03 19:21:09 +07:00
nip05.ts Add soft NIP-05 verification for skaters (open directory + "Verified" filter) 2026-09-02 21:51:11 +07:00
nip06.test.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
nip06.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
offlineCache.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
platform.ts Platform-aware wallet mints (Option C: native + browser scoping) 2026-07-24 17:22:41 +07:00
polyfills.ts New project created with Shakespeare 2026-06-15 19:49:07 +07:00
queryPersister.ts Instant cold-start: query persistence, optimistic geolocation, skeleton pins 2026-09-09 21:58:22 +07:00
quickCapture.ts Fix Quick Snap opening gallery instead of camera on native (v1.0.70) 2026-07-24 19:47:36 +07:00
relatr.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
relayAdmin.ts Add real relay-level takedown (NIP-86 banevent) for admin deletes 2026-09-03 23:07:14 +07:00
routing.ts Add in-app routing (foot/bike/moto/car) via OSRM — no external maps handoff 2026-09-03 10:17:06 +07:00
sanitizeUrl.ts Hardening: https-only URLs, route-level crash resilience, cleaner errors (1.4.3) 2026-09-09 12:40:43 +07:00
sasquatchBrain.ts Security: remove hardcoded OpenRouter key (C1) + escape weather HTML (H1) 2026-08-18 17:04:53 +07:00
sasquatchPro.ts Sasquatch Pro Phase 3: npub-bound Lightning paywall + gating 2026-07-29 23:33:39 +07:00
signerCapabilities.ts fix(amber): stop passive decryption from storming Amber on navigation (1.2.16) 2026-09-07 14:57:35 +07:00
skateboardRating.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
skateTags.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00
spotStatus.ts Add community Spot Status Reports (kind 2259) 2026-07-24 23:06:10 +07:00
tripPlanner.ts feat(sasquatch): add Trip Planner + tougher free-tier fallback + new joke book 2026-07-30 00:04:28 +07:00
types.ts Add Nostr-native newsletter: subscribe, mailbox & notifications 2026-09-03 19:16:49 +07:00
utils.ts New project created with Shakespeare 2026-06-15 19:49:07 +07:00
verifyInvoice.ts security: verify invoice amounts + require provider-issued zap receipts (1.2.14) 2026-09-07 11:45:21 +07:00
videoEmbed.ts Add "The Part" — crew video/montage (YouTube + Instagram) 2026-09-02 23:59:50 +07:00
weather.ts fix: restore full skate-spots source tree from misplaced src/src/ copy 2026-06-15 22:18:28 +07:00