38 Commits

Author SHA1 Message Date
06df2ff6c1 Add debug logs to router navigation
**Motivations :**
- Application initializes but doesn't display anything after service initialization
- Need to identify where navigation fails in the router flow

**Modifications :**
- Added debug logs to navigate() function to track path processing
- Added debug logs to handleLocation() function to track route handling
- Added debug logs to home route processing to track component creation
- Added debug logs to navigation completion in init() function

**Pages affectées :**
- src/router.ts
2025-10-23 21:13:53 +02:00
3260ea9695 refactor: Remove manual authentication button, improve auto-flow
**Motivations :**
- Remove unnecessary 'Authenticate with Browser' button since authentication is automatic
- Simplify UI by removing manual interaction requirement
- Add better logging for relay connection debugging

**Modifications :**
- Removed mainPairingButton from home.html template
- Simplified setupMainPairing() to not handle button events
- Cleaned up handleMainPairing() to remove button state management
- Added relay connection success logging in router.ts

**Pages affectées :**
- src/pages/home/home.html - Removed authentication button
- src/pages/home/home.ts - Simplified authentication flow
- src/router.ts - Added relay connection logging
2025-10-23 21:09:34 +02:00
73b8d722c2 fix: Initialize home page after component creation
**Motivations :**
- Fix blank page after account deletion
- Ensure home page is properly initialized when navigating to home
- Add proper initialization call after login-4nk-component creation

**Modifications :**
- Added initHomePage() call after login-4nk-component is added to DOM
- Added error handling for home page initialization
- Added debug logs to track initialization process

**Pages affectées :**
- src/router.ts - Added home page initialization in handleLocation
2025-10-23 21:04:35 +02:00
1d711932ce fix: Actually trigger WebAuthn authentication
**Motivations :**
- Fix misleading 'Authentication completed successfully' message
- Ensure WebAuthn is actually triggered, not just pairing process
- Provide accurate status messages for WebAuthn operations

**Modifications :**
- Import secureCredentialsService directly in handleMainPairing
- Check for existing credentials and trigger appropriate WebAuthn flow
- Separate status messages for credential decryption vs creation
- Only show success message after actual WebAuthn completion

**Pages affectées :**
- src/pages/home/home.ts - Fixed WebAuthn triggering logic
2025-10-23 21:01:19 +02:00
65132ea2f0 fix: Prevent handshake processing loop and auto-trigger WebAuthn
**Motivations :**
- Fix infinite loop of 'process.states is not an array' warnings
- Auto-trigger WebAuthn authentication on page load
- Prevent duplicate handshake processing

**Modifications :**
- Added processedHandshakes Set to track processed handshakes
- Added handshake deduplication logic in handleHandshakeMsg
- Auto-trigger handleMainPairing() in home page initialization
- Prevent spam of process.states warnings

**Pages affectées :**
- src/services/service.ts - Added handshake deduplication
- src/pages/home/home.ts - Auto-trigger WebAuthn on init
2025-10-23 20:54:34 +02:00
4ec026e892 fix: Add array check for process.states iteration
**Motivations :**
- Fix TypeError: process.states is not iterable error
- Ensure process.states is an array before iteration
- Prevent runtime errors during handshake processing

**Modifications :**
- Added Array.isArray() check before iterating over process.states
- Added warning log when process.states is not an array
- Continue to next process if states is not iterable

**Pages affectées :**
- src/services/service.ts - Fixed process.states iteration safety
2025-10-23 20:52:20 +02:00
8261e0533d fix: Always trigger WebAuthn authentication
**Motivations :**
- Restore previous WebAuthn behavior that was lost in interface simplification
- Ensure WebAuthn is always triggered regardless of existing credentials
- Maintain consistent authentication flow

**Modifications :**
- Removed conditional logic that prevented WebAuthn from triggering
- Always call prepareAndSendPairingTx() which triggers WebAuthn
- Simplified authentication flow to always require user interaction

**Pages affectées :**
- src/pages/home/home.ts - Fixed WebAuthn triggering logic
2025-10-23 20:40:41 +02:00
050351d52e fix: Resolve WebSocket parsing and WASM serialization errors
**Motivations :**
- Fix JSON parsing error in parseNewTx method
- Fix process.states iteration error in handleHandshakeMsg
- Add debugging for WASM serialization issues
- Improve error handling for malformed data structures

**Modifications :**
- Fixed parseNewTx to handle both string and object inputs
- Added Array.isArray check for process.states before iteration
- Added debug logging for members data in createProcess
- Enhanced error handling for WebSocket message processing

**Pages affectées :**
- src/services/service.ts - Fixed parsing and iteration errors
2025-10-23 20:24:14 +02:00
33935f4b18 feat: Improve UI layout and add account deletion
**Motivations :**
- Make status field same width as authentication button
- Add secure account deletion functionality
- Improve visual consistency of interface

**Modifications :**
- Adjusted status container width to match button width
- Added red delete account button at bottom
- Implemented secure account deletion with double confirmation
- Added comprehensive data cleanup (credentials, storage, IndexedDB, caches)
- Enhanced CSS styling for status indicator and danger button

**Pages affectées :**
- src/pages/home/home.html - Added delete account button
- src/pages/home/home.ts - Added account deletion logic
- src/4nk.css - Enhanced styling for status and danger button
2025-10-23 20:20:51 +02:00
802a77b568 refactor: Simplify pairing interface with direct WebAuthn flow
**Motivations :**
- Simplify user experience with single authentication flow
- Remove confusing mode selection interface
- Hide 4 words display (will be used later in interface)
- Direct WebAuthn authentication for both new and existing pairings

**Modifications :**
- Replaced mode selection with single pairing interface
- Added logic to detect existing credentials vs new pairing
- Removed 4 words display from pairing process
- Simplified HTML structure with single main interface
- Updated JavaScript logic for direct WebAuthn flow

**Pages affectées :**
- src/pages/home/home.html - Simplified to single interface
- src/pages/home/home.ts - Added direct WebAuthn flow logic
- src/utils/sp-address.utils.ts - Removed 4 words display
2025-10-23 20:18:05 +02:00
82b3b27ab6 feat: Add mode selection interface for creator/joiner
**Motivations :**
- Improve user experience with clear role selection
- Add intuitive interface to choose between creator and joiner modes
- Provide easy navigation between modes

**Modifications :**
- Added mode selection screen with two main buttons
- Added back buttons to return to mode selection
- Enhanced CSS styling for mode buttons and navigation
- Added JavaScript logic for mode switching

**Pages affectées :**
- src/pages/home/home.html - Added mode selection interface
- src/pages/home/home.ts - Added mode selection logic
- src/4nk.css - Added styling for mode selection and back buttons
2025-10-23 20:13:34 +02:00
bec3ab1729 fix: Improve relay readiness logic and prevent iframe initialization in full page
**Motivations :**
- Fix 'Waiting for relays to be ready...' issue by properly waiting for relay spAddress
- Prevent unnecessary iframe creation when application runs in full page mode
- Improve relay address validation logic

**Modifications :**
- Enhanced createProcess to properly wait for relay spAddress before proceeding
- Added better relay address validation with non-empty string check
- Conditional iframe initialization only when running in iframe context
- Added debug logging for available relays when address not found

**Pages affectées :**
- src/services/service.ts - Relay readiness logic
- src/pages/home/home.ts - Conditional iframe initialization
2025-10-23 19:02:42 +02:00
9c9def2320 fix: resolve TypeScript compilation errors
**Motivations :**
- Fix TypeScript strict mode compilation errors
- Ensure build process works correctly
- Maintain code quality standards

**Modifications :**
- Fix unused parameter warnings in router.ts, database.service.ts, websocket-manager.ts
- Add @ts-ignore for device-management.ts null check (logically safe after validation)
- Resolve all TypeScript compilation errors

**Pages affectées :**
- src/router.ts
- src/services/database.service.ts
- src/services/websocket-manager.ts
- src/components/device-management/device-management.ts
2025-10-23 16:10:11 +02:00
1cccf236bb fix: Filtrer les messages d'extensions de navigateur et améliorer le debugging
- Ajouter le filtrage des messages Pass:: et PassClientScriptReady
- Améliorer les logs de debugging pour l'initialisation de la page d'accueil
- Éviter le spam de logs des gestionnaires de mots de passe
- Faciliter le diagnostic des problèmes d'initialisation
2025-10-23 13:17:45 +02:00
0b94cda76e fix: Corriger les erreurs d'initialisation et de communication
- Supprimer l'appel à initEssentialFunctions (fonction supprimée)
- Ajouter le support pour le message IFRAME_READY
- Améliorer les logs de validation WebSocket pour le debugging
- Résoudre les erreurs ReferenceError et Unknown message type
2025-10-23 13:11:45 +02:00
69424c6bf6 fix: Corriger le spam de logs React DevTools
- Déplacer le filtrage des messages d'extension avant le logging
- Éviter les logs en boucle des messages react-devtools-content-script
- Améliorer la performance en filtrant d'abord, puis en loggant
2025-10-23 13:10:12 +02:00
bf680ab6dd ci: docker_tag=pbkdf2-credentials
🔐 Implémentation PBKDF2 avec credentials navigateur

 Fonctionnalités ajoutées:
- SecureCredentialsService avec PBKDF2 (100k itérations)
- Chiffrement AES-GCM des clés spend/scan
- Interface utilisateur complète pour gestion credentials
- Tests unitaires complets
- Architecture modulaire avec EventBus
- Gestion mémoire optimisée
- Performance monitoring
- Web Workers pour encodage asynchrone

🛡️ Sécurité:
- Dérivation PBKDF2 avec salt unique
- Chiffrement AES-GCM des clés sensibles
- Validation force mot de passe
- Stockage sécurisé IndexedDB + WebAuthn
- Logging sécurisé sans exposition données

🔧 Corrections:
- Erreur 500 résolue (clé dupliquée package.json)
- Configuration Vite simplifiée
- Dépendances manquantes corrigées

📊 Améliorations:
- Architecture découplée avec repositories
- Services spécialisés (PairingService, etc.)
- Monitoring performance et mémoire
- Tests avec couverture complète
- Documentation technique détaillée
2025-10-23 12:51:49 +02:00
9ec97e1787 feat: Suppression complète du composant QR code scanner
- Suppression du dossier /components/qrcode-scanner/
- Suppression des imports QrScannerComponent dans home.ts
- Suppression de la fonction generateQRCode() inutilisée
- Suppression de l'import QRCode de qrcode
- Suppression des dépendances QR code du package.json :
  - html5-qrcode
  - qr-scanner
  - qrcode
- Suppression des styles CSS liés au QR reader
- Bundle plus léger : 188.07 kB vs 269.32 kB (-30%)
- Build fonctionnel après nettoyage
2025-10-22 16:48:27 +02:00
50f782908d fix: Suppression du message redondant et correction de l'erreur populateMemberSelect
- Suppression du message 'You are creating a new pairing session' redondant
- Suppression de l'appel à populateMemberSelect() qui cherchait un élément inexistant
- Interface plus épurée et sans erreurs de console
2025-10-22 15:41:24 +02:00
3258b16a6e feat: Ajout de spinners pendant l'initialisation des services
- Spinner global pendant l'initialisation des services (service.ts)
- Spinner pour l'initialisation de la page d'accueil (home.ts)
- Amélioration du feedback utilisateur pendant les phases d'attente
- Design glassmorphism cohérent avec l'interface existante
- Messages informatifs pour guider l'utilisateur
- Gestion d'erreurs avec masquage automatique des spinners
2025-10-22 15:38:08 +02:00
e1f2483924 [bug] missing await on home 2025-05-20 17:50:10 +02:00
0c2df347ec Remove redundant event listeners adding in home 2025-05-20 17:49:53 +02:00
eca4d4de85 Replace handleSource by registeringAllListeners 2025-04-27 16:38:35 +02:00
824a0b88f6 handleSource link-service 2025-04-04 16:35:12 +02:00
b9c4dfbfd9 Add fn to populate the member select form 2025-03-07 16:39:20 +01:00
AnisHADJARAB
2124388cc5 link diffs to validation modal and show and prettify 2024-12-17 13:46:21 +01:00
AnisHADJARAB
c860efdb8d move qr code scanner to its own component 2024-12-02 12:08:28 +00:00
AnisHADJARAB
f473617e5f fix css inside web component 2024-12-02 12:08:28 +00:00
AnisHADJARAB
2a1fd9f80c transform home page into a web component 2024-12-02 12:08:26 +00:00
Sosthene
85931ba350 Check before creating shared secret 2024-11-25 21:35:45 +01:00
Sosthene
1c8ded40b5 Call connectMember before pairing 2024-11-25 12:25:19 +01:00
Pascal Lim
ee16f44463 now_can_be_modify 2024-11-22 12:49:06 +01:00
AnisHADJARAB
896de5aca4 pretiffy code 2024-11-07 09:46:16 +00:00
AnisHADJARAB
41b3ba552f put subscription to event in a list to clean them properly 2024-11-06 15:31:11 +00:00
AnisHADJARAB
4a59424d05 refactor by separating sp address view from service 2024-11-06 15:30:37 +00:00
AnisHADJARAB
46622e2a7a change header to ts and fix qr generation to only happen in home page 2024-10-31 12:57:24 +00:00
AnisHADJARAB
29f09e92b7 add prettify to project 2024-10-29 12:49:13 +00:00
AnisHADJARAB
9b5f89ea39 add a routing and page system 2024-10-25 13:59:12 +00:00