fix(embedded): ship the model assets in the widget package

Element Call reaches production only as the embedded npm package, which webpack
copies into ThreadNet-Web under /widgets/element-call/. The embedded build sets
publicDir: false — upstream reasons that public/ holds nothing but the favicon,
which stopped being true when the model assets landed there.

Verified rather than assumed: with the upstream value everything builds, the
standalone bundle works, and the filter is dead only inside the widget, 404ing on
the model. That is the failure this would have shipped.

The package grows from about 41 to 66 MB, measured — most of what was already
there is source maps and the crypto and vision wasm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Thore Cimbal
2026-08-16 12:00:00 +00:00
co-authored by Claude Opus 4.8
parent 3f17001720
commit d270e0c706
3 changed files with 21 additions and 2 deletions
+13
View File
@@ -102,6 +102,19 @@ erkannt - sie gehen ungefiltert raus. Betroffen sind auch leise Chiclet-Tastatur
3. **Default 35 %, nicht 100 %.** Gemessen reicht das fuer "Tastatur weg und Stimme
natuerlich"; mehr Daempfung erhoeht nur das Artefaktrisiko.
⚠️ **`vite-embedded.config.ts`: `publicDir` MUSS aktiv bleiben.** Upstream steht dort
`publicDir: false` mit der Begruendung, `public/` enthalte nur das Favicon - bei uns liegen
dort die Modell-Assets. Mit dem Upstream-Wert baut alles fehlerfrei, der Standalone-Build
funktioniert, und **nur im Widget ist der Filter tot** (404 auf das Modell). Genau diese
Zeile ist beim Rebase der wahrscheinlichste stille Rueckfall.
**Auslieferungsweg (nicht offensichtlich):** Element Call laeuft hier **nicht** als eigenes
Image. Der Weg ist `threadnet-call` -> npm-Paket `@sorb/threadnet-call-embedded` -> Gitea ->
`ThreadNet-Web` (webpack kopiert das Paket-`dist` nach `webapp/widgets/element-call/`) ->
`threadnet-web`-Image. Deshalb muessen die Assets **ins Paket**; das Widget loest sie relativ
zu seiner eigenen URL auf (`/widgets/element-call/assets/dfn3/...`). Das Paket waechst dadurch
von ~41 auf ~66 MB (gemessen; der Rest sind Source-Maps und die Crypto-/Vision-wasm).
**Kein** Rust/wasm-Build noetig (das fertige Paket genuegt), **kein** Dry/Wet-Mixer und
**kein** Delay-Node - geregelt wird ueber den Modellparameter (`noiseReductionLevel` /
`atten_lim`), nicht ueber Zurueckmischen des Originalsignals.