Serve htmx, EasyMDE and oat from vTodo; editor toolbar uses vJournal's icons #115

Merged
CrowderSoup merged 1 commit from claude/self-host-assets into main 2026-11-17 22:38:08 +00:00
Owner

vTodo loaded four things from other people's CDNs on every page:

What From Problem
oat unpkg, no version any new oat release changes how vTodo looks, unannounced
htmx 2.0.4 unpkg
EasyMDE 2.18.0 jsdelivr
Font Awesome bootstrapcdn (EasyMDE fetched it for its toolbar)

They're now pinned copies in static/vendor/, the way vJournal serves its own. The page makes no third-party requests now (checked in the browser's network log).

The notes and comment editors drop Font Awesome and use vJournal's toolbar: bold, italic, heading, bullets, checkbox, link, code, with the icons from vJournal's packages/theme/icons.svg. That gives the two apps' editors the same buttons and the same look. The preview, side-by-side, fullscreen, quote, numbered list, image and guide buttons are gone.

Browser tests used a stand-in for unpkg's htmx. They now load the real files from static, EasyMDE included. All 15 browser tests pass, and so does the full suite (735).

Found along the way, not changed here: CONTENT_SECURITY_POLICY is set in settings, but Django's CSP middleware isn't in MIDDLEWARE, so production sends no CSP header. With everything self-hosted, it could now be turned on with 'self' only. That's a separate change.

🤖 Generated with Claude Code

vTodo loaded four things from other people's CDNs on every page: | What | From | Problem | |---|---|---| | oat | unpkg, **no version** | any new oat release changes how vTodo looks, unannounced | | htmx 2.0.4 | unpkg | | | EasyMDE 2.18.0 | jsdelivr | | | Font Awesome | bootstrapcdn (EasyMDE fetched it for its toolbar) | | They're now pinned copies in `static/vendor/`, the way vJournal serves its own. The page makes no third-party requests now (checked in the browser's network log). The notes and comment editors drop Font Awesome and use vJournal's toolbar: bold, italic, heading, bullets, checkbox, link, code, with the icons from vJournal's `packages/theme/icons.svg`. That gives the two apps' editors the same buttons and the same look. The preview, side-by-side, fullscreen, quote, numbered list, image and guide buttons are gone. Browser tests used a stand-in for unpkg's htmx. They now load the real files from static, EasyMDE included. All 15 browser tests pass, and so does the full suite (735). Found along the way, not changed here: `CONTENT_SECURITY_POLICY` is set in settings, but Django's CSP middleware isn't in `MIDDLEWARE`, so production sends no CSP header. With everything self-hosted, it could now be turned on with `'self'` only. That's a separate change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Serve htmx, EasyMDE and oat from vTodo, and draw the editor with vJournal's icons.
All checks were successful
tests / pytest (push) Successful in 1m23s
3e2f788df0
The page loaded four things from other people's servers: oat from unpkg
with no version (so any new release would change how vTodo looks),
htmx from unpkg, EasyMDE from jsdelivr, and Font Awesome from
bootstrapcdn, which EasyMDE fetched for its toolbar. They're now pinned
copies in static/vendor/, like vJournal serves its own.

The notes and comment editors drop Font Awesome for the toolbar vJournal's
editor has, with the same icons from packages/theme: bold, italic, heading,
bullets, checkbox, link, code.

Browser tests no longer need a stand-in for unpkg's htmx.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CrowderSoup deleted branch claude/self-host-assets 2026-11-17 22:38:09 +00:00
Sign in to join this conversation.
No description provided.