odysseus/static
Léo ab5a08a6f9 refactor(email): move emailLibrary.js into static/js/emailLibrary/
The email library was 11,375 lines in one file, the second-largest JS
module in the repo. `static/js/emailLibrary/` already held four extracted
helpers, so the package existed; the bulk of the code just was not in it.

The implementation moves to `emailLibrary/index.js` and the old path
becomes a re-export wrapper. Five call sites import that path, four of
them dynamically with a `?v=` string, and `sw.js` caches URLs verbatim,
so a wrapper is what makes the move need no coordinated edit to any of
them.

The test side is the part worth reviewing. 58 tests read
`static/js/emailLibrary.js` as text. Pointing them at
`emailLibrary/index.js` would buy one move and break again on the next
one, which is exactly what happened to the stylesheet tests (they now go
through `tests/helpers/stylesheets.py`). So the same shape:
`tests/helpers/js_modules.py` reads the whole package, and assertions
stop caring which module a function sits in.

`tests/test_email_library_module_graph_js.py` is new. This frontend has
no module-graph validation, and a package fails in ways a single file
cannot: a wrapper that drops an export is `undefined` at call time rather
than an error at load time, and a module that reads a `const` across an
import cycle throws only when that module is entered first. It pins the
wrapper's surface against the entry module's, evaluates every module on
its own in a browser, and requires both import paths to hand out one
instance.

It also caught a live gap while being written:
`emailLibrary/replyRecipients.js` is imported by `emailInbox.js`, an app
shell module, and was never in the `sw.js` precache.
2026-09-30 09:08:21 +02:00
..
css refactor(css): move cookbook, research, memory and settings styles to their own file 2026-09-23 16:12:53 +02:00
fonts feat(a11y): add a Text size control and an OpenDyslexic font option (#4210) 2026-06-22 13:53:46 +02:00
icons Cookbook model workflow fixes 2026-06-21 11:02:35 +00:00
js refactor(email): move emailLibrary.js into static/js/emailLibrary/ 2026-09-30 09:08:21 +02:00
lib perf(static): vendor KaTeX and Mermaid, and load them on first use (#5994) 2026-08-16 22:43:12 +01:00
test-fixtures Squash Odysseus development history 2026-09-11 06:04:19 +00:00
app.js fix(ui): bust cache for collapsible subscription usage 2026-09-22 13:12:19 +01:00
icon.ico feat(launcher): add portable windows launcher (#976) 2026-06-16 04:58:16 +01:00
index.html refactor(css): move cookbook, research, memory and settings styles to their own file 2026-09-23 16:12:53 +02:00
login.html Squash Odysseus development history 2026-09-11 06:04:19 +00:00
manifest.json pwa missing icons added (#428) 2026-06-15 16:00:13 +09:00
modal-control-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
research-ascii-variants.html Squash Odysseus development history 2026-09-11 06:04:19 +00:00
research-ascii-variants.js Squash Odysseus development history 2026-09-11 06:04:19 +00:00
style.css refactor(css): move cookbook, research, memory and settings styles to their own file 2026-09-23 16:12:53 +02:00
sw.js refactor(email): move emailLibrary.js into static/js/emailLibrary/ 2026-09-30 09:08:21 +02:00
wave-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00
whirlpool-variants.html Merge verified Odysseus fixes 2026-07-23 14:49:02 +00:00