**Motivations:**
- User requested spinner during cache update and page reload after completion
- Better UX: visual feedback during update and automatic refresh to show updated data
**Root causes:**
- No visual spinner during cache update operation
- Page was not reloaded after cache update, requiring manual refresh
**Correctifs:**
- Added Spinner component with CSS animation
- Modified button to show spinner during update
- Added page reload using router.reload() after successful cache update
- Wait 1 second after success message before reloading to show feedback
**Evolutions:**
- Better user experience with visual feedback during cache update
- Automatic page reload ensures updated data is displayed immediately
- Spinner provides clear indication that operation is in progress
**Pages affectées:**
- components/CacheUpdateManager.tsx
**Motivations:**
- total_sponsoring should be calculated from cache, not stored in tags
- Author searches should use cache first, not query Nostr directly
- All elements should be read/written from/to database
- Background sync should scan all notes with service='zapwall.fr' tag and update cache
- Sync should run at startup and resume on each page navigation
**Root causes:**
- total_sponsoring was stored in tags which required updates on every sponsoring payment
- Author queries were querying Nostr directly instead of using cache
- No background sync service to keep cache up to date with new notes
**Correctifs:**
- Removed totalSponsoring from AuthorTags interface and buildAuthorTags
- Modified getAuthorSponsoring to calculate from cache (sponsoring queries) instead of tags
- Modified parsePresentationEvent to set totalSponsoring to 0 (calculated on demand from cache)
- Modified fetchAuthorByHashId and fetchAuthorPresentationFromPool to use cache first and calculate totalSponsoring from cache
- Created platformSyncService that scans all notes with service='zapwall.fr' tag and caches them
- Modified _app.tsx to start continuous sync on mount and resume on page navigation
- All author presentations now calculate totalSponsoring from cache when loaded
**Evolutions:**
- Cache-first architecture: all queries check cache before querying Nostr
- Background sync service keeps cache up to date automatically
- totalSponsoring is always calculated from actual sponsoring data in cache
- Better performance: cache queries are faster than Nostr queries
- Non-blocking sync: background sync doesn't block UI
**Pages affectées:**
- lib/nostrTagSystemTypes.ts
- lib/nostrTagSystemBuild.ts
- lib/articlePublisherHelpersPresentation.ts
- lib/sponsoring.ts
- lib/authorQueries.ts
- lib/platformSync.ts (new)
- pages/_app.tsx
**Motivations:**
- Allow users to set their preferred language (fr/en) in the settings page
- Load language preference from localStorage at startup to configure the application locale
**Root causes:**
- Language preference was only available in the header via LanguageSelector component
- Language preference was stored in IndexedDB instead of localStorage
- No centralized language settings management in the settings page
**Correctifs:**
- Created LanguageSettingsManager component for settings page
- Migrated language storage from IndexedDB to localStorage for consistency
- Updated _app.tsx to load locale from localStorage synchronously at startup
- Updated useI18n hook to use localStorage instead of IndexedDB
- Updated LanguageSelector component to use localStorage instead of IndexedDB
**Evolutions:**
- Added language preference section in settings page (displayed first)
- Language preference is now loaded at application startup from localStorage
- Added translations for language settings (settings.language.*)
**Pages affectées:**
- components/LanguageSettingsManager.tsx (new)
- pages/settings.tsx
- pages/_app.tsx
- hooks/useI18n.ts
- components/LanguageSelector.tsx
- locales/fr.txt
- locales/en.txt
**Motivations:**
- Translate settings page and all its components to French and English
- Provide consistent multilingual experience
**Root causes:**
- Settings page and components were hardcoded in English
- No translation support for key management and NIP-95 configuration
**Correctifs:**
- None (new feature)
**Evolutions:**
- Added translations for settings page title
- Added translations for KeyManagementManager component:
- Public keys display (npub and hex)
- Import form and validation messages
- Recovery phrase display
- All buttons and warnings
- Added translations for Nip95ConfigManager component:
- Endpoint list and management
- Add/edit/remove actions
- Error messages
- Updated both fr.txt and en.txt translation files
- All text now uses t() function for i18n support
**Pages affectées:**
- pages/settings.tsx
- components/KeyManagementManager.tsx
- components/Nip95ConfigManager.tsx
- public/locales/fr.txt
- public/locales/en.txt
- locales/fr.txt
- locales/en.txt
**Motivations:**
- Fix import error when importing nsec private keys
- Support both string and Uint8Array formats from nip19.decode
**Root causes:**
- nip19.decode returns decoded.data as Uint8Array, not string
- Validation in KeyManagementManager only checked for string type
- importPrivateKey in keyManagement.ts only handled string type
**Correctifs:**
- Updated KeyManagementManager validation to accept Uint8Array
- Updated importPrivateKey to convert Uint8Array to hex using bytesToHex
- Improved error messages to show actual validation errors
**Evolutions:**
- None
**Pages affectées:**
- components/KeyManagementManager.tsx
- lib/keyManagement.ts