refactor(js): extract vault-health module from app.js monofile (§3.1)
Seventh slice of the app.js split. Moves the vault-health dashboard (computeHealthCache, healthScoreBand, renderHealthDashboard/Section, openEntryForFix, entryAgeDays + scoring consts) to js/app.health.js. Pure declarations, no top-level side effects → loads before app.js. Uses computeStrength/decryptPwd/state/api via shared global scope at call time. - Byte-for-byte identical extraction; syntax OK on all eight app parts. - auditCache/auditFilter sit in this var block but drive the separate Audit-log viewer in app.js — they ride along and resolve cross-file via shared scope (documented). - index.html + BuildAssets whitelist + harness APP_PARTS updated. - 62/62 tests green. app.js: 11936 → 9545 lines (7 modules extracted). NOTE: quick search is NOT contiguous (interleaved with cheatsheet + history-modal code, lines 886-1063), so a clean byte-identical extraction isn't trivial — deferred. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -242,10 +242,14 @@ réécriture des call-sites, risque quasi nul vs conversion en modules ES).
|
||||
**+7 tests `faviconHost`** (extraction hostname → décide quel domaine part
|
||||
vers DDG). A révélé un commentaire faux (IPs « valides » alors qu'elles
|
||||
sont rejetées par la règle TLD `[a-z]{2,}`) — corrigé.
|
||||
- `app.js` : 11 936 → **9 790 lignes** (6 modules sortis).
|
||||
- ✅ `js/app.health.js` extrait (vault health dashboard) — byte-for-byte
|
||||
identique, chargé AVANT app.js (`auditCache`/`auditFilter` viennent avec,
|
||||
résolus cross-fichier).
|
||||
- `app.js` : 11 936 → **9 545 lignes** (7 modules sortis).
|
||||
- Suite de tests : 42 → **62 tests**.
|
||||
- Reste à extraire (grosses sections cohésives) : slideover, settings,
|
||||
quicksearch, autofill, vault-health…
|
||||
- Reste : slideover, settings, autofill… Note : **quicksearch n'est PAS
|
||||
contigu** (entrelacé avec cheatsheet + history-modal 886-1063) → extraction
|
||||
propre pas triviale, reportée.
|
||||
- ✅ `node --check` en pré-étape de `BuildAssets.ps1` : **déjà fait** (cf. §3.2).
|
||||
|
||||
### 3.2 🟡 Aucun test automatisé — **partiellement adressé (2026-07-04)**
|
||||
|
||||
Reference in New Issue
Block a user