feat: migrate from clientside javascript to elysiajs eden

LA
6h ago
+1767-475

I'm playing around a bit with agentic coding using local LLMs. I thought I'd tackle this feature that way. This PR still needs a lot of thorough testing.

Summary

Migrates the inline/client-side JavaScript to typed TypeScript client scripts that talk to the server via Elysia Eden.

Client scripts

  • Replaced public/script.js and public/results.js with public/script.ts, public/results.ts, and a new public/history.ts.
  • Removed the inline JS from src/pages/history.tsx (~100 lines), moving it into history.ts.
  • Added src/eden.ts (typed Eden client, centralized server URL).
  • Added helpers: findPresetTarget, historySelection, and normalizeFiletype tweaks. The ffmpeg converter and converters/main.ts have small related changes. These also support the wav-3cx preset and URL-param format pre-selection.

Build & tooling

  • Client bundles are built before dev/hot, and in the Dockerfile.
  • Updated package.json, bun.lock, bunfig.toml, tsconfig*.json, and eslint.config.ts.
  • Generated bundles (e.g. history.js) are git-ignored.

Review fixes

  • Iterate NodeList via Array.from so the tsc build passes.
  • Tightened Eden typings and addressed type-safety/XSS review concerns.
  • Pages now reference the built bundles instead of inline scripts.

Tests

  • New DOM tests for script, history, and results (tests/client/*), plus Eden app, helper, and build-script tests.
  • Updated page tests to assert no inline <script> tags (matched case-insensitively).
  • Console output is silenced and client-script coverage is raised.