Repro
Tested on enzyme v0.5.3 (macos-arm64).
enzyme serve -p <vault> (any vault)
- Open http://127.0.0.1:8765/ in browser
- Use the UI's note-save feature → fails with HTTP 422
Root cause
Frontend/backend payload mismatch.
JS bundle (/assets/index-C3fkMwYV.js) sends:
fetch(`${baseURL}/notes/save`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ query: S, markdown: c })
})
Rust backend (/notes/save route) expects:
{ "filename": "<path>", "content": "<markdown body>" }
Server response on the JS-shaped payload:
HTTP 422 Unprocessable Entity
Failed to deserialize the JSON body into the target type: missing field `filename`
Confirmed working when manually shaped correctly
curl -X POST http://127.0.0.1:8765/notes/save \
-H "Content-Type: application/json" \
-d '{"filename":"00-Inbox/test.md","content":"# Test"}'
# → HTTP 200, {"file_path":"...","relative_path":"...","success":true}
# → file actually created in vault
So the backend save logic is fine. Just the frontend asset sends wrong field names.
Fix (one-line in JS source pre-bundle)
- body: JSON.stringify({ query: S, markdown: c })
+ body: JSON.stringify({ filename: S, content: c })
Or update the backend to accept both field names for backward compat.
Reference
JS source location (from binary string): crates/enzyme-api/src/explore_pipeline.rs references /notes/save route. The frontend that ships with the binary is at /assets/index-C3fkMwYV.js.
Repro
Tested on enzyme v0.5.3 (macos-arm64).
enzyme serve -p <vault>(any vault)Root cause
Frontend/backend payload mismatch.
JS bundle (
/assets/index-C3fkMwYV.js) sends:Rust backend (
/notes/saveroute) expects:{ "filename": "<path>", "content": "<markdown body>" }Server response on the JS-shaped payload:
Confirmed working when manually shaped correctly
So the backend save logic is fine. Just the frontend asset sends wrong field names.
Fix (one-line in JS source pre-bundle)
Or update the backend to accept both field names for backward compat.
Reference
JS source location (from binary string):
crates/enzyme-api/src/explore_pipeline.rsreferences/notes/saveroute. The frontend that ships with the binary is at/assets/index-C3fkMwYV.js.