fix(dev): ML noise suppression works on npm start; no lotusTheme warning per call (#293) #410

Merged
jared merged 1 commits from fix/dev-denoise-theme into lotus 2026-10-18 09:59:53 -04:00
Owner

Fixes #293.

1. ML noise suppression didn't work on npm start. The denoise worklets, wasm and models were only copied into dist/public/element-call/denoise/ by the lotus-denoise closeBundle hook. On the dev server the call frame got the SPA fallback (MIME type mismatch) and silently fell back to the raw mic.

  • The asset list is now one denoiseSources() shared by the build copy and a new configureServer middleware. The middleware serves the same /public/element-call/denoise/… paths in dev, with JS/wasm content types.
  • The DTLN tree lookup refuses paths outside its directory.
  • The build's checks and error messages are unchanged; the DeepFilterNet error string became a template literal (it was already failing prefer-template).

2. lotusTheme warning in every call. getWidget now sends lotusTheme=true along with lotusTransparent. The fork applied the theme anyway and logged lotusTransparent is set without lotusTheme each call.

Verified on the dev server (npx vite):

  • rnnoiseWorklet.js, speexWorklet.js, noiseGateWorklet.js, workadventure/audio-worklet.js and deepfilternet/index.esm.js return 200 text/javascript; rnnoise.wasm and df_bg.wasm return 200 application/wasm. Before, they got the HTML fallback.
  • Joining a call with ML / RNNoise logs [lotus] denoise processor active (rnnoise, floor=0.15), and no lotusTheme warning.

Seen while testing (not changed here): the host doesn't handle the fork's io.lotus.denoise_state ("host did not ack"), so a silent ML fallback (#260) still isn't surfaced in the UI.

tsc clean · unit tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #293. **1. ML noise suppression didn't work on `npm start`.** The denoise worklets, wasm and models were only copied into `dist/public/element-call/denoise/` by the `lotus-denoise` `closeBundle` hook. On the dev server the call frame got the SPA fallback (MIME type mismatch) and silently fell back to the raw mic. - The asset list is now one `denoiseSources()` shared by the build copy and a new `configureServer` middleware. The middleware serves the same `/public/element-call/denoise/…` paths in dev, with JS/wasm content types. - The DTLN tree lookup refuses paths outside its directory. - The build's checks and error messages are unchanged; the DeepFilterNet error string became a template literal (it was already failing `prefer-template`). **2. `lotusTheme` warning in every call.** `getWidget` now sends `lotusTheme=true` along with `lotusTransparent`. The fork applied the theme anyway and logged `lotusTransparent is set without lotusTheme` each call. **Verified** on the dev server (`npx vite`): - `rnnoiseWorklet.js`, `speexWorklet.js`, `noiseGateWorklet.js`, `workadventure/audio-worklet.js` and `deepfilternet/index.esm.js` return **200 text/javascript**; `rnnoise.wasm` and `df_bg.wasm` return **200 application/wasm**. Before, they got the HTML fallback. - Joining a call with ML / RNNoise logs **`[lotus] denoise processor active (rnnoise, floor=0.15)`**, and no lotusTheme warning. Seen while testing (not changed here): the host doesn't handle the fork's `io.lotus.denoise_state` ("host did not ack"), so a silent ML fallback (#260) still isn't surfaced in the UI. `tsc` clean · unit tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-18 00:24:07 -04:00
fix(dev): ML noise suppression works on npm start; no lotusTheme warning per call (#293)
CI / Build & Quality Checks (pull_request) Successful in 3m4s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 10s
CI / Playwright smoke (e2e) (pull_request) Successful in 18m16s
cd760ebc3c
The denoise worklets/wasm/models were only copied into dist/ by the
lotus-denoise closeBundle hook, so on the dev server the call frame got
the SPA fallback for them and silently used the raw mic. The asset list
is now shared (denoiseSources) between that copy and a dev-server
middleware serving the same paths. Also send lotusTheme=true with
lotusTransparent, which the fork warned about in every call.

Fixes #293

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 4bfb51c5fe into lotus 2026-10-18 09:59:53 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#410