Current state: saving in the composer POSTs /noteadd / /noteedit (with from=compose) and 303-redirects back to /compose?id=…, i.e. a full page reload — CodeMirror re-initializes and scroll/cursor position is lost.
Desired: an optimistic / fetch-based save that keeps the editor state in place (update the note id + preview in the DOM, no reload). The rest of the app already uses this optimistic-write pattern in public/app.js.
Pointers: web/src/app.js (/noteadd, /noteedit → redirect(...)), web/src/render/notes.js (renderCompose #cmp-form), web/public/app.js.
Related: the composer "live preview" issue.
Current state: saving in the composer POSTs
/noteadd//noteedit(withfrom=compose) and 303-redirects back to/compose?id=…, i.e. a full page reload — CodeMirror re-initializes and scroll/cursor position is lost.Desired: an optimistic /
fetch-based save that keeps the editor state in place (update the note id + preview in the DOM, no reload). The rest of the app already uses this optimistic-write pattern inpublic/app.js.Pointers:
web/src/app.js(/noteadd,/noteedit→redirect(...)),web/src/render/notes.js(renderCompose#cmp-form),web/public/app.js.Related: the composer "live preview" issue.