# TODO ## HTMX v2 Migration Reference: `docs/autosave-system.md` → "HTMX v2 Migration Plan" section. - [x] `contenus-edit.php` (pages): Add `hx-*` attrs, add `overtype:change` dispatch in OverType `onChange` - [x] `contenus-edit.php` (form_help): Add `hx-*` attrs, add `overtype:change` dispatch in OverType `onChange` - [x] `apropos-groups-form.php` (contacts): Add `hx-*` attrs only - [x] `contenus-edit.php` (sidebar_links): Add `hx-*` attrs only - [x] Add `handleAutosaveResponse()` shared handler + `htmx:beforeRequest` loading state - [x] Delete `autosave.js` - [x] Fix backend `$isAjax` detection: also recognize `HX-Request` header (page.php, apropos.php, form-help.php) - [x] Form-help inline editors: add OverType toolbar + HTMX auto-save + remove save buttons - [x] Markdown cheatsheet modal: reusable dialog on all OverType editors ## FilePond error fixes - [x] Fix `server.process.onerror`: don't access `response.status` on string (response is XHR text body) - [x] Fix `server.load`: convert from string URL to object with proper `onload`/`onerror` handlers - [x] Fix `server.process.onload`: guard against non-ID responses (e.g. HTML error pages disguised as 200) - [x] Fix `destroyFilePondsIn`: abort in-flight uploads before destroying to prevent stale XHR callbacks crashing `_write` - [x] Fix `FilepondHandler.php`: set `Content-Type: text/plain` header at top of `handleProcess`, `handleLoad`, `handleRevert`, `handleRemove` so PHP doesn't default to `text/html` on `die()`