205 Commits

Author SHA1 Message Date
ce63c08ac9 Fix deployment script blocking at Git repository check
**Motivations:**
- Deployment script was blocking at step 5 (Git repository verification)
- Command substitution with SSH could hang indefinitely
- Need to avoid blocking on SSH connection failures

**Root causes:**
- Command substitution \ with ssh_exec could block if SSH connection hangs
- Complex logic with grep on command output was fragile
- No proper timeout handling in the verification step

**Correctifs:**
- Simplified Git repository verification logic
- Removed command substitution that could block
- Use direct exit code checking instead of parsing output
- Improved error handling with explicit SSH exit code checking
- Added cleanup and retry mechanism for connection failures

**Evolutions:**
- More robust Git repository verification that doesn't block

**Pages affectées:**
- deploy.sh: Simplified Git repository verification step
2026-01-06 14:26:30 +01:00
a219d1ad42 lint fix wip2 2026-01-06 14:24:35 +01:00
8813498de4 Fix SSH connection errors during deployment
**Motivations:**
- SSH ControlMaster connection errors were causing deployment failures
- Connection reset errors were not handled properly
- No retry mechanism for failed SSH connections

**Root causes:**
- SSH ControlMaster socket could become stale or be closed prematurely
- No validation of connection before use
- No cleanup of dead connections
- Silent failures in conditional checks

**Correctifs:**
- Added connection validation before each SSH command
- Implemented automatic cleanup of dead SSH connections
- Added retry mechanism (up to 3 attempts) with connection cleanup
- Enhanced SSH options for better connection stability (ConnectTimeout, ServerAliveInterval, ServerAliveCountMax)
- Improved error handling in Git repository verification step with explicit error detection and recovery

**Evolutions:**
- Enhanced SSH connection management with robust error handling
- Better error messages to distinguish connection errors from other failures

**Pages affectées:**
- deploy.sh: Enhanced ssh_exec() function, added helper functions, improved error handling
- fixKnowledge/ssh-connection-errors-deployment.md: Documentation of the problem, root cause, and solution
2026-01-06 14:22:24 +01:00
13e0e0d801 lint fix wip 2026-01-06 14:17:55 +01:00
412989e6af lint fix wip 2026-01-06 11:30:23 +01:00
5ac5aab089 series wip & code quality checks 2026-01-06 09:26:07 +01:00
572ee2dde5 fix key import 2026-01-06 08:10:43 +01:00
27cb1a7b5b fix key import 2026-01-06 01:14:49 +01:00
a4a39fd0ba fix 'Chargement..' for profil 2026-01-06 01:11:20 +01:00
16560e0b52 series building 2026-01-06 00:59:38 +01:00
05382f34ab series building 2026-01-06 00:54:49 +01:00
ba0fcbfc96 series building 2026-01-06 00:37:49 +01:00
758ab5c966 series building 2026-01-06 00:26:31 +01:00
4a619c9576 series building 2026-01-05 23:37:29 +01:00
4787bd5410 Fix: profil image2 2026-01-05 23:24:10 +01:00
3009c4664f Fix: profil image2 2026-01-05 23:14:47 +01:00
a058056475 Fix: profil image2 2026-01-05 23:07:12 +01:00
94ac35f309 Fix: profil image 2026-01-05 22:57:46 +01:00
4e3254a078 Temporarily enable nostrimg.com for diagnostic logging
**Motivations:**
- Enable nostrimg.com to see detailed diagnostic logs
- Verify if the issue is code-related or server-side
- Collect logs to diagnose 500 errors

**Root causes:**
- Need to see actual request/response logs to diagnose the issue

**Correctifs:**
- Temporarily enabled nostrimg.com (enabled: true)
- Added comment indicating it's for diagnostic purposes
- Detailed logging already in place to capture request/response details

**Evolutions:**
- None

**Pages affectées:**
- lib/configStorageTypes.ts
2026-01-05 22:57:13 +01:00
a52a261459 Document nostrimg.com 500 error diagnosis
**Motivations:**
- Document the code verification for nostrimg.com 500 errors
- Explain what was checked and what might be the issue
- Provide next steps for diagnosis

**Root causes:**
- Unknown: Could be code issue or server-side issue
- Need detailed logs to determine

**Correctifs:**
- Documented all code verifications
- Listed potential issues to check
- Provided next steps for diagnosis

**Evolutions:**
- None

**Pages affectées:**
- fixKnowledge/nostrimg-500-error-diagnosis.md (new)
2026-01-05 22:56:36 +01:00
3740b93513 Add detailed logging for nostrimg.com requests to diagnose 500 errors
**Motivations:**
- Diagnose why nostrimg.com returns 500 errors
- Verify if the code is causing the errors or if it's a server-side issue
- Log request and response details for troubleshooting

**Root causes:**
- Unknown: Could be code issue (wrong field name, headers, format) or server issue
- Need detailed logs to determine the cause

**Correctifs:**
- Added detailed request logging for nostrimg.com:
  - URL, method, field name, filename, content type, file size
  - All headers (Content-Type, Accept, User-Agent, Authorization)
- Added detailed response logging for nostrimg.com:
  - Status code, status message, response headers
  - Body preview (500 chars), body length, HTML detection
- Added comment about field name ('file') - some endpoints might need different names

**Evolutions:**
- None

**Pages affectées:**
- pages/api/nip95-upload.ts
2026-01-05 22:56:07 +01:00
2b5df250f6 Improve NIP-98 error messages and disable nostrimg.com by default
**Motivations:**
- Provide clearer error messages when NIP-98 authentication is not available
- Disable nostrimg.com by default since it returns server errors (500)
- Help users understand why nostrcheck.me endpoint is skipped

**Root causes:**
- NIP-98 authentication requires unlocked account but error message was generic
- nostrimg.com endpoint consistently returns 500 errors
- Users don't understand why nostrcheck.me is skipped

**Correctifs:**
- Added detailed error messages for NIP-98 unavailability:
  - No account: 'Please create or import an account'
  - Account not unlocked: 'Please unlock your account with your recovery phrase'
- Disabled nostrimg.com by default (enabled: false) due to server errors
- Improved console warnings with specific reasons for skipping endpoints

**Evolutions:**
- None

**Pages affectées:**
- lib/nip95.ts
- lib/configStorageTypes.ts
2026-01-05 22:53:45 +01:00
015117686b Remove deprecated eslint config from next.config.js
**Motivations:**
- Fix Next.js 16.1.1 warning about unsupported eslint configuration
- Remove deprecated eslint option from next.config.js

**Root causes:**
- Next.js 16+ no longer supports eslint configuration in next.config.js
- The eslint option has been moved to command-line options or .eslintrc.json

**Correctifs:**
- Removed eslint configuration block from next.config.js
- Added comment explaining the change and alternatives

**Evolutions:**
- None

**Pages affectées:**
- next.config.js
2026-01-05 22:52:42 +01:00
dbe4dba70f Fix: profil image 2026-01-05 22:51:30 +01:00
e69b0178bc Document nostrimg.com HTML response issue and fixes
**Motivations:**
- Document the issue with nostrimg.com returning HTML instead of JSON
- Explain possible root causes and solutions
- Provide diagnostic steps for troubleshooting

**Root causes:**
- Missing HTTP headers (Accept, User-Agent)
- Possible incorrect endpoint URL
- Possible authentication requirements
- Endpoint may be unavailable or changed

**Correctifs:**
- Added Accept and User-Agent headers
- Improved HTML error detection and classification
- Enhanced error messages and logging

**Evolutions:**
- None

**Pages affectées:**
- fixKnowledge/nostrimg-html-response-error.md (new)
2026-01-05 22:51:06 +01:00
cee363c598 Add Accept and User-Agent headers, improve HTML error detection
**Motivations:**
- Some NIP-95 endpoints require Accept and User-Agent headers
- Better diagnosis of HTML error responses (404, 403, 500)
- More detailed error messages for troubleshooting

**Root causes:**
- Missing Accept: application/json header may cause endpoints to return HTML
- Missing User-Agent header may cause some servers to reject requests
- HTML error pages need better detection and classification

**Correctifs:**
- Added Accept: application/json header to all requests
- Added User-Agent: zapwall.fr/1.0 header to all requests
- Improved HTML error detection with 404/403/500 classification
- Enhanced error messages with specific suggestions based on error type
- Increased body preview in logs from 200 to 500 characters for better diagnosis

**Evolutions:**
- None

**Pages affectées:**
- pages/api/nip95-upload.ts
2026-01-05 22:50:37 +01:00
c7f8d301d5 Improve HTML response detection in NIP-95 upload API
**Motivations:**
- Better error handling when endpoints return HTML error pages instead of JSON
- Provide clearer error messages to users

**Root causes:**
- Some NIP-95 endpoints (e.g., nostrimg.com) return HTML error pages instead of JSON
- Current error handling only catches JSON parse errors without detecting HTML responses
- Users get confusing error messages about JSON parsing when the real issue is an HTML response

**Correctifs:**
- Added HTML detection before JSON parsing
- Extract error message from HTML title or h1 tags when possible
- Provide clearer error message indicating HTML response instead of JSON
- Improved error logging with HTML body preview

**Evolutions:**
- None

**Pages affectées:**
- pages/api/nip95-upload.ts
2026-01-05 22:49:05 +01:00
32b33d56a1 Add translations for settings page (fr/en)
**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
2026-01-05 22:43:11 +01:00
d7a04dd8f8 Fix nsec import validation for Uint8Array data
**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
2026-01-05 22:38:21 +01:00
57ac98ebe4 Fix: NIP-95 upload 500 error 2026-01-05 22:14:01 +01:00
7791370b37 Add key management configuration page
**Motivations:**
- Provide a dedicated interface for managing Nostr keys
- Allow users to view public keys (npub and hex)
- Enable importing private keys via URL or text format
- Respect the existing two-level encryption system

**Root causes:**
- No dedicated interface for key management
- Users need to view their public keys easily
- Users need to import keys in various formats (nsec URL, nsec text, hex)

**Correctifs:**
- None (new feature)

**Evolutions:**
- Created KeyManagementManager component for key management
- Added public key display (npub and hex formats)
- Implemented private key import with support for:
  - nostr:// URLs with nsec
  - nsec text format (nsec1...)
  - hex format (64 characters)
- Automatic key extraction from URLs
- Account replacement warning and confirmation
- Recovery phrase display after import
- Individual copy buttons for each key format
- Integration in settings page

**Pages affectées:**
- components/KeyManagementManager.tsx (new)
- pages/settings.tsx (modified)
- features/key-management-configuration.md (new)
2026-01-05 22:13:40 +01:00
b5ec69624c Fix: NIP-95 upload 500 error 2026-01-05 22:07:11 +01:00
d8311078bc Fix: NIP-95 upload 500 error 2026-01-05 21:56:09 +01:00
a90b77cec3 Fix: NIP-95 upload 500 error 2026-01-05 21:22:49 +01:00
065ab30828 Fix: favicon 404 error and NIP-95 upload 500 error
**Motivations:**
- Corriger l'erreur 404 pour favicon.ico demandé par les navigateurs
- Corriger l'erreur 500 de l'API NIP-95 upload empêchant les uploads de fichiers

**Root causes:**
- Fichier favicon.ico manquant dans public/ causant des erreurs 404 répétées
- Incompatibilité entre form-data (npm) et fetch() natif de Node.js dans l'API NIP-95

**Correctifs:**
- Ajout de favicon.svg et mise à jour des références dans les pages
- Remplacement de fetch() par https/http natifs de Node.js dans nip95-upload.ts
- Amélioration de la gestion des erreurs et nettoyage des fichiers temporaires

**Evolutions:**
- Documentation des problèmes et solutions dans fixKnowledge/

**Pages affectées:**
- components/HomeView.tsx
- pages/docs.tsx
- pages/presentation.tsx
- pages/api/nip95-upload.ts
- features/account-creation-buttons-separation.md
- fixKnowledge/favicon-404-error.md (nouveau)
- fixKnowledge/nip95-upload-500-error.md (nouveau)
- public/favicon.svg (nouveau)
2026-01-05 01:34:55 +01:00
83e9029f9a test 2025-12-29 10:44:16 +01:00
17aa64070e Change default NIP-95 endpoint to void.cat as nostr.build returns 405 2025-12-29 00:59:04 +01:00
35d4a94bb4 Change default NIP-95 endpoint back to nostr.build for proxy usage 2025-12-29 00:33:12 +01:00
0533122919 Always use proxy for all NIP-95 uploads to avoid all endpoint issues 2025-12-29 00:32:01 +01:00
a4820da2df Use proxy for all NIP-95 uploads to avoid CORS and endpoint issues, improve error logging 2025-12-29 00:30:54 +01:00
bafd8ca0bc Change default NIP-95 endpoint to picstr.build and fix proxy to accept endpoint parameter 2025-12-29 00:27:00 +01:00
7bab834f89 Fix multipart parsing in NIP-95 upload proxy by removing manual Content-Type header and improving error handling 2025-12-29 00:23:00 +01:00
970f8761ac Fix TypeScript syntax error in NIP-95 upload proxy endpoint by using interface 2025-12-29 00:20:26 +01:00
2b57b1d445 Add proxy API endpoint for NIP-95 upload to bypass CORS issues with nostr.build 2025-12-29 00:17:10 +01:00
07b9f513bb Change default NIP-95 endpoint to nostrcheck.me as void.cat is not accessible 2025-12-29 00:10:03 +01:00
333c8e4d7f Fix CORS issue by changing default NIP-95 endpoint to void.cat and adding fallback to try multiple endpoints 2025-12-28 23:41:52 +01:00
e5a95bc627 Remove h2 displaying truncated public key from presentation form header 2025-12-28 23:34:06 +01:00
107571c378 Remove CreateAccountModal for generation, generate account directly and show recovery step then unlock modal 2025-12-28 23:28:57 +01:00
7cfd235a00 Fix: Update PaymentModal to use custom Tailwind CSS theme colors 2025-12-28 23:21:18 +01:00
3153f1b27d Fix: Add @theme configuration for Tailwind CSS v4 custom colors and utilities 2025-12-28 23:11:58 +01:00