refactor(js): extract quick-search overlay cluster from app.js (§3.1)

Eighth slice. Quick search wasn't contiguous — its functions sat on both
sides of the cheatsheet and password-history modals (lines 725-1104). Rather
than a fiddly non-contiguous cut, the whole overlay cluster is extracted as
one byte-identical block: js/app.overlays.js (quick search + cheatsheet +
password history). Pure declarations, no top-level side effects → loads
before app.js; all state/api/Bridge/render/decryptPwd refs resolve via shared
global scope at call time.

- Byte-for-byte identical; syntax OK on all nine app parts; 62/62 tests green.
- index.html + BuildAssets whitelist + harness APP_PARTS updated.

app.js: 11936 → 9170 lines (8 modules extracted, ~2770 lines). Load order:
argon2 → crypto → totp → favicon → import → backup → health → overlays →
app → sync.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-08 18:43:55 +01:00
parent b44b05118e
commit 9e424efaf4
7 changed files with 408 additions and 383 deletions
+8 -4
View File
@@ -245,11 +245,15 @@ réécriture des call-sites, risque quasi nul vs conversion en modules ES).
-`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).
- `js/app.overlays.js` extrait (quick search + cheatsheet + password
history) — quicksearch était entrelacé avec ces 2 overlays, donc extraits
ensemble en un bloc contigu byte-for-byte. Chargé AVANT app.js.
- `app.js` : 11 936 → **9 170 lignes** (8 modules sortis, ~2 770 lignes).
- Suite de tests : 42 → **62 tests**.
- Reste : slideover, settings, autofill… Note : **quicksearch n'est PAS
contigu** (entrelacé avec cheatsheet + history-modal 886-1063) → extraction
propre pas triviale, reportée.
- Reste : sections très couplées au state/DOM (slideover, settings, folders,
attachments, autofill, PIN/recovery/quick-unlock) — rendement/risque faible,
à faire au fil de l'eau. Le socle §3.1 (pattern + modules à risque isolés +
filet de tests) est en place.
-`node --check` en pré-étape de `BuildAssets.ps1` : **déjà fait** (cf. §3.2).
### 3.2 🟡 Aucun test automatisé — **partiellement adressé (2026-07-04)**