Skip to content

ZenNotes v2.20.2

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Aug 00:05

ZenNotes 2.20.2: databases work again on a self-hosted server

A fix release. If your vault lives on your own ZenNotes server and databases stopped working after you updated, this is the one you want. Installers for macOS, Windows, and Linux (x64 + arm64) are attached below.

🐛 Fixes

  • Databases on a remote vault work again, whatever version your server is. Creating or opening a database against a self-hosted server could fail with Remote server request failed (500 Internal Server Error) for /api/notes/read?path=Untitled Database.base/data.csv, and nothing about it was your fault or your vault's.

    What happened: a database is not a special thing the server knows about, it is a folder holding data.csv and a schema.json, and the app builds it out of ordinary file reads. That makes one question load-bearing, "is this file missing, or did the request fail?", and the two answers point opposite ways. A missing schema.json means "this is a plain CSV, adopt it", so treating a failed read as missing would write an inferred schema over your real one. A missing data.csv is how the app finds a free name when you create a database, so treating a missing file as a failure makes creating one impossible.

    2.20.0 taught the app to trust only a clear "not found" answer, which protects your schema and is right for servers of the same age. Servers older than 2.20 answer every missing file with a server error instead, so against one of those the app could not tell the difference and refused everything. Now it asks: on the first server error, it requests a path that cannot possibly exist and looks at the answer. A server that says "not found" for that one is telling the truth about all its answers, so its errors stay errors. A server that repeats the error cannot tell the two apart, so the app stops pretending otherwise. One extra request per connection, none at all against a current server, and your schema is still never overwritten because of a failed read.

    Servers from this release also say plainly that they report a missing file as "not found", so a current app talking to a current server never has to ask. And asking to read a folder as if it were a file now answers "path is a directory, not a file" instead of a generic server error, which is the other way this could send you looking for a broken server that was working fine. (Reported by Kta with the exact error text, which is what made it reproducible.)

🧰 For contributors

  • The CLI test suite no longer depends on whether you personally have the zn command installed. It read your real $PATH, so it passed in CI and failed on the machine of anyone who had ever launched the app.
  • CONTRIBUTING.md now lists the scripts that exist: npm run lint never did, and npm run typecheck (which the release build gates on) was missing.

Everything from 2.20.0 and 2.20.1 is here unchanged: Workflows, custom code languages, folder remapping, the new exports.


Keyboard-first and local-first, as always.