mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-09 06:57:07 +02:00
dbcbcf6181c6b811efb6ed02b336da4100c4a3f6
* feat: improve zap wallet payment flow UX Improvements to the zap window to better communicate wallet payment status: - Add clear "Paying with wallet..." message during NWC payment attempts - Show QR code immediately on payment timeout or failure - Improve error messages with actionable guidance - Always display "Open in External Wallet" option in QR view - Rename "Retry with Wallet" to "Retry with NWC Wallet" for clarity - Generate QR code upfront to enable instant display on errors This provides better feedback when wallet payments fail or timeout, giving users clear fallback options without confusion. * feat: add LNURL address caching for instant zap UI Implements LNURL address caching similar to NIP-05 caching pattern: **Database Changes** (v16): - Add `lnurlCache` table with 24-hour TTL - Stores LNURL-pay response data for Lightning addresses - Indexed by address and fetchedAt for efficient queries **New Hook** (`useLnurlCache`): - Reactive hook using Dexie + useLiveQuery pattern - Auto-fetches and caches LNURL data on first use - Returns cached data instantly on subsequent calls - Re-fetches when cache is stale (>24 hours) **ZapWindow Optimization**: - Uses cached LNURL data instead of network calls - Eliminates 10-second delay on repeat zaps - Shows zap amounts/limits instantly from cache - Graceful error handling when cache is warming up **Testing**: - 11 comprehensive tests for LNURL validation - Validates zap support, pubkey format, field requirements - Tests edge cases (uppercase hex, missing fields, etc.) **Benefits**: - Instant zap UI for frequently zapped users - Reduced load on LNURL servers - Offline capability (show cached limits/amounts) - Better UX with sub-100ms response time Verification: All 950 tests pass, build succeeds * fix: match comment input styling to amount input in zap window Update MentionEditor styling to match Input component: - Change padding from py-2 to py-1 - Add responsive text sizing (text-base md:text-sm) - Add min-h-9 to match Input height This creates visual consistency between the amount and comment fields. * feat: add amount preview above invoice in zap QR view Display the zap amount prominently above the invoice when showing the QR code. This provides clear visual confirmation of what the user is paying before they scan or copy the invoice. Format: - Large bold amount with k/m notation (e.g., "420", "2.1k", "100m") - Smaller "sats" label underneath - Positioned between QR code and invoice field --------- Co-authored-by: Claude <noreply@anthropic.com>
Grimoire
A Nostr protocol explorer and developer tool with a tiling window manager interface.
Features
- Tiling Windows - Each window is a Nostr "app" (profile viewer, event feed, NIP docs, etc.)
- Command Palette - Unix-style commands via
Cmd+Kto open apps and navigate - Multi-workspace - Virtual desktops with independent layouts
- Real-time - Reactive event subscriptions with automatic updates
Stack
React 19, TypeScript, Vite, TailwindCSS, Jotai, Dexie, Applesauce
Getting Started
npm install
npm run dev
Scripts
| Command | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Build for production |
npm test |
Run tests in watch mode |
npm run lint |
Lint code |
npm run format |
Format code |
License
MIT
Languages
TypeScript
98.9%
CSS
0.8%
JavaScript
0.3%