From 5a3105926b2156b1696dee493de322fad478e1d1 Mon Sep 17 00:00:00 2001 From: Adib Hanna Date: Fri, 20 Nov 2026 12:02:39 -0600 Subject: [PATCH 1/8] Fix(tests): the ordered-list tests hand Enter the finished parse The renumber tests failed now and then on slow runners, last on Windows x64 in PR #1098: "pads every marker once the list outgrows the column (99 to 100)" kept the old padding. makeState forced a full parse with ensureSyntaxTree, but that finishes the parse inside the language state's context and leaves the tree syntaxTree(state) returns at the one the state was created with. lang-markdown's insertNewlineContinueMarkup reads syntaxTree(state), so when the creation parse ran out of time partway down a long list, Enter did not see the list at all. On a 200,000-line document the creation tree covered 3,002 characters and still did after ensureSyntaxTree; an empty transaction made it cover all 3,777,784. makeState now returns state.update({}).state after the forced parse. The app is not affected: a view keeps applying the parse worker's tree. --- .../app-core/src/lib/cm-ordered-list-renumber.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/app-core/src/lib/cm-ordered-list-renumber.test.ts b/packages/app-core/src/lib/cm-ordered-list-renumber.test.ts index 462c5bad..341b93d6 100644 --- a/packages/app-core/src/lib/cm-ordered-list-renumber.test.ts +++ b/packages/app-core/src/lib/cm-ordered-list-renumber.test.ts @@ -51,7 +51,13 @@ function makeState( // Force a full parse so the transactionExtender can rely on a // complete syntax tree when it walks for OrderedList nodes. ensureSyntaxTree(state, doc.length, 5_000) - return state + // ensureSyntaxTree finishes the parse in the language state's context, but + // syntaxTree(state) keeps returning the tree the state was created with. + // insertNewlineContinueMarkup reads syntaxTree(state), so on a runner slow + // enough to leave the creation parse partial, Enter missed the list + // (Windows, PR #1098). An empty transaction makes the state adopt the + // finished tree. + return state.update({}).state } function applyAndRead( From 9964d498a4627719ac2b96e1d16772d958e73cc8 Mon Sep 17 00:00:00 2001 From: Adib Hanna Date: Fri, 20 Nov 2026 12:02:46 -0600 Subject: [PATCH 2/8] CI(windows): test scratch vaults live on the runner's work disk Windows x64 failed main at abf115d4 and three runs of PR #1098 on desktop tests that hit vitest's 5 s limit: the MCP "update_task on a recurring task" cases, the vault demo tour, asset deletes. They are not slow tests. "counts from the due date the same call sets" takes 26 ms on a Mac, 2.5 s on a passing Windows run and over 8 s on the failing one. One update_task call makes four fsyncs, across the note, its agent-edit record and its creation record, and every test vault comes from os.tmpdir(), which on the runner is C:\Users\runneradmin\AppData\Local\Temp, on the OS disk. The checkout and RUNNER_TEMP are on D:. A Windows job now sets TEMP and TMP to RUNNER_TEMP before anything runs. Raising the timeout would have hidden the cost rather than removed it. This is the likely cause, not yet a measured one: the first Windows run on this commit is the comparison (the desktop suite took 140 s to 174 s on C:). --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eea7a6f1..60503eaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,6 +107,18 @@ jobs: - name: Install dependencies run: npm ci + # The tests' scratch vaults come from os.tmpdir(), which on a Windows + # runner is C:\Users\runneradmin\AppData\Local\Temp, the OS disk, while + # the checkout sits on D:. One MCP task update fsyncs four files there, + # and on a slow runner that took a 25 ms test past 8 s and failed main + # (vitest's 5 s limit, 2026-11-20). RUNNER_TEMP is on D:. + - name: Keep test scratch files on the runner's work disk + if: runner.os == 'Windows' + shell: pwsh + run: | + "TEMP=$env:RUNNER_TEMP" >> $env:GITHUB_ENV + "TMP=$env:RUNNER_TEMP" >> $env:GITHUB_ENV + - name: Verify terminal artifacts and legacy launchers if: runner.os != 'Windows' run: node --test tooling/scripts/terminal-artifact.test.mjs tooling/scripts/terminal-launcher.test.mjs From bf4f86c40ddc23857c7e040b5feb47555f0bc884 Mon Sep 17 00:00:00 2001 From: Adib Hanna Date: Fri, 20 Nov 2026 12:03:03 -0600 Subject: [PATCH 3/8] Fix(notes): a note made again under a deleted note's name gets its own date on Windows Delete a note permanently and make a new one under the same name within about 15 seconds, and on Windows the new note showed the deleted note's creation date. NTFS hands a file created or renamed into a recently freed name the old file's birthtime (file system tunneling), and a new note had no creation record: createNote, a first save and the MCP server cleared any old record and left the date to the file's birthtime. Worse, the note's first save then wrote that inherited date into its record for good. Windows CI caught it as "removes creation metadata on permanent deletion so a new note cannot inherit the old date" reading a date 1.4 s old. Every note the app makes now records now as its creation date before the file is written: createNote, createExcalidraw, converting an Obsidian drawing, importing an external note, duplicating (desktop and MCP), MCP create_note and the first save of a new path. The record replaces whatever an earlier note of that name left, is written the way the existing records are (temp file, fsync, rename), and is skipped for a temporary folder session, which never gets a .zennotes folder. Deleting still removes the record. A note made outside the app (Explorer, git) still falls back to the file's birthtime; there is nothing to record for it. Notes that already picked up a wrong date keep it. The new tests make stat answer with the deleted note's birthtime for the recreated path, so every platform runs the Windows case; all three fail on the old code. --- .../src/main/note-creation-metadata.ts | 39 +++++++++++++-- .../src/main/vault-creation-metadata.test.ts | 47 +++++++++++++++++++ apps/desktop/src/main/vault.ts | 12 ++--- apps/desktop/src/mcp/vault-ops.ts | 6 +-- 4 files changed, 92 insertions(+), 12 deletions(-) diff --git a/apps/desktop/src/main/note-creation-metadata.ts b/apps/desktop/src/main/note-creation-metadata.ts index 6acd8a1a..5f0e65df 100644 --- a/apps/desktop/src/main/note-creation-metadata.ts +++ b/apps/desktop/src/main/note-creation-metadata.ts @@ -2,6 +2,7 @@ import { promises as fs } from 'node:fs' import path from 'node:path' import { randomInt } from 'node:crypto' import { renameWithRetry } from './atomic-write' +import { isEphemeralRoot } from './ephemeral-vaults' const metadataDirectory = '.zennotes/note-metadata' const metadataSuffix = '.metadata.json' @@ -113,17 +114,49 @@ export async function prepareNoteCreation( throw error }) if (!previous) { - await fs.rm(metadata, { force: true }) + await startNoteCreation(root, rel) return } if ((await readCreationMetadata(metadata)) !== null) return const createdAt = Math.trunc(previous.birthtimeMs || previous.ctimeMs) + await publishCreationMetadata(metadata, createdAt, previous.mode & 0o777) +} + +/** + * Record now as the creation date of a note this app is about to create, + * replacing any record an earlier note of the same name left behind. + * + * A new note cannot leave its date to the file's birthtime. On NTFS, a file + * created or renamed into a name that was deleted within the last 15 seconds + * gets the deleted file's birthtime back (file system tunneling), so a note + * deleted and made again under the same name showed the old note's date, and + * its first save wrote that date into this record for good. A note created + * outside the app still falls back to birthtime; there is nothing to record + * for it. + */ +export async function startNoteCreation(root: string, rel: string): Promise { + if (isEphemeralRoot(root)) return + if ( + rel.replaceAll('\\', '/').startsWith('.zennotes/') || + !/\.(md|excalidraw)$/i.test(rel) + ) + return + await publishCreationMetadata(await noteMetadataPath(root, rel), Date.now()) +} + +async function publishCreationMetadata( + metadata: string, + createdAt: number, + mode?: number, +): Promise { await fs.mkdir(path.dirname(metadata), { recursive: true }) const temporary = `${metadata}.${process.pid}.${Date.now()}${String(randomInt(1000000)).padStart(6, '0')}.tmp` try { - const file = await fs.open(temporary, 'wx', previous.mode & 0o777) + const file = await fs.open(temporary, 'wx', mode) try { - await file.writeFile(JSON.stringify({ version: 1, createdAt }) + '\n') + await file.writeFile( + JSON.stringify({ version: 1, createdAt: Math.trunc(createdAt) }) + '\n', + ) await file.sync() } finally { await file.close() diff --git a/apps/desktop/src/main/vault-creation-metadata.test.ts b/apps/desktop/src/main/vault-creation-metadata.test.ts index 44d0124c..ec17d224 100644 --- a/apps/desktop/src/main/vault-creation-metadata.test.ts +++ b/apps/desktop/src/main/vault-creation-metadata.test.ts @@ -216,6 +216,53 @@ describe('portable note creation metadata across desktop vault operations', () = expect((await readNote(root, notePath)).createdAt).toBe(recreated.createdAt) }) + // NTFS hands a file made under a name deleted in the last 15 seconds the + // deleted file's birthtime (file system tunneling). Windows CI caught the + // case above reading that birthtime back; stat is made to answer the same + // way here, so every platform runs the Windows case. + it.each([ + ['createNote', (root: string) => createNote(root, 'inbox', 'Original')], + ['a first writeNote', (root: string) => writeNote(root, 'inbox/Original.md', '# Original\n')], + ['the MCP server', (root: string) => mcpVault.createNote(root, 'inbox', 'Original')] + ])( + 'a note made again after a permanent delete keeps its own date when the file system hands back the old birthtime, through %s', + async (_label, create) => { + const root = await makeVault() + const notePath = 'inbox/Original.md' + await seedNote(root, notePath) + await deleteNote(root, notePath) + invalidateNoteMetaCache(root) + + const fsModule = await import('node:fs') + const realStat = fsModule.promises.stat + const abs = path.join(root, notePath) + const tunneled = vi + .spyOn(fsModule.promises, 'stat') + .mockImplementation(async (...args: Parameters) => { + const result = await realStat(...args) + if (path.resolve(String(args[0])) !== abs) return result + return Object.assign(result, { + birthtimeMs: ORIGINAL_CREATED_AT, + birthtime: new Date(ORIGINAL_CREATED_AT) + }) + }) + try { + const beforeCreate = Date.now() + const created = await create(root) + expect(created.path).toBe(notePath) + expect(created.createdAt).toBeGreaterThanOrEqual(beforeCreate) + expect(created.createdAt).toBeLessThanOrEqual(Date.now()) + + // The first save must not write the handed-back birthtime down. + const saved = await writeNote(root, notePath, '# Original\n\nEdited.\n') + expect(saved.createdAt).toBe(created.createdAt) + expect(await readMetadata(root, notePath)).toEqual({ version: 1, createdAt: created.createdAt }) + } finally { + tunneled.mockRestore() + } + } + ) + it.each([ ['malformed JSON', '{"version":'], ['unsupported version', JSON.stringify({ version: 2, createdAt: ORIGINAL_CREATED_AT })], diff --git a/apps/desktop/src/main/vault.ts b/apps/desktop/src/main/vault.ts index 8e470670..28d9bc9f 100644 --- a/apps/desktop/src/main/vault.ts +++ b/apps/desktop/src/main/vault.ts @@ -1,4 +1,4 @@ -import { noteMetadataPath, readNoteCreatedAt, prepareNoteCreation, removeNoteCreation } from './note-creation-metadata' +import { noteMetadataPath, readNoteCreatedAt, prepareNoteCreation, removeNoteCreation, startNoteCreation } from './note-creation-metadata' import { noteCommentsPath, noteCommentsRoot, @@ -3613,7 +3613,7 @@ export async function createNote( const finalTitle = await uniqueTitle(dir, base) const abs = path.join(dir, `${finalTitle}.md`) const body = `# ${finalTitle}\n\n` - await removeNoteCreation(root, toPosix(path.relative(root, abs))) + await startNoteCreation(root, toPosix(path.relative(root, abs))) await removeAgentEditRecord(root, toPosix(path.relative(root, abs))) await fs.writeFile(abs, body, 'utf8') invalidateNoteMetaCache(root, toPosix(path.relative(root, abs))) @@ -3645,7 +3645,7 @@ export async function createExcalidraw( } } const abs = path.join(dir, `${finalTitle}.excalidraw`) - await removeNoteCreation(root, toPosix(path.relative(root, abs))) + await startNoteCreation(root, toPosix(path.relative(root, abs))) await removeAgentEditRecord(root, toPosix(path.relative(root, abs))) await fs.writeFile(abs, JSON.stringify(emptyExcalidrawDocument(), null, 2), 'utf8') invalidateNoteMetaCache(root, toPosix(path.relative(root, abs))) @@ -3687,7 +3687,7 @@ export async function convertObsidianExcalidraw(root: string, rel: string): Prom } } const destAbs = path.join(dir, `${finalTitle}.excalidraw`) - await removeNoteCreation(root, toPosix(path.relative(root, destAbs))) + await startNoteCreation(root, toPosix(path.relative(root, destAbs))) await removeAgentEditRecord(root, toPosix(path.relative(root, destAbs))) await fs.writeFile(destAbs, JSON.stringify(scene, null, 2), 'utf8') invalidateNoteMetaCache(root, toPosix(path.relative(root, destAbs))) @@ -3707,7 +3707,7 @@ export async function importExternalNote(root: string, sourceAbsPath: string): P const finalTitle = await uniqueTitle(destDir, baseTitle) const destAbs = path.join(destDir, `${finalTitle}.md`) const body = await fs.readFile(source, 'utf8') - await removeNoteCreation(root, toPosix(path.relative(root, destAbs))) + await startNoteCreation(root, toPosix(path.relative(root, destAbs))) await removeAgentEditRecord(root, toPosix(path.relative(root, destAbs))) await fs.writeFile(destAbs, body, 'utf8') await fs.rm(source, { force: true }) @@ -4561,7 +4561,7 @@ export async function duplicateNote(root: string, rel: string): Promise Date: Fri, 20 Nov 2026 14:38:00 -0600 Subject: [PATCH 4/8] Docs(whats-new): 2.90.0 announces the Windows creation-date fix The one change a user can see in 2.90.0 is that a note deleted and made again under the same name on Windows shows its own date (bf4f86c4), with the same fix in the bundled zn 0.18.1. The CI and test commits of this release have nothing to announce. --- packages/app-core/src/lib/whats-new.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/app-core/src/lib/whats-new.ts b/packages/app-core/src/lib/whats-new.ts index f6cb3d70..c5310220 100644 --- a/packages/app-core/src/lib/whats-new.ts +++ b/packages/app-core/src/lib/whats-new.ts @@ -39,6 +39,15 @@ export const CLOUD_ANNOUNCEMENT = { } as const export const WHATS_NEW: readonly WhatsNewEntry[] = [ + { + version: '2.90.0', + highlights: [ + { + title: 'New notes keep their own date on Windows', + body: 'A note you delete and make again under the same name now shows the day you made it, not the deleted note’s date. The bundled zn CLI 0.18.1 has the same fix.' + } + ] + }, { version: '2.89.0', highlights: [ From c9ffa61635c26e91fd29c55f2a85ae1812c07259 Mon Sep 17 00:00:00 2001 From: Adib Hanna Date: Fri, 20 Nov 2026 14:41:38 -0600 Subject: [PATCH 5/8] Chore(cli): the desktop bundles zn 0.18.1 zn 0.18.1 (ZenNotes/tui v0.18.1, ZenNotes/tui#55) records a new note's creation date the moment it makes the note, so on Windows a note made again under a deleted note's name keeps its own date, the same fix this release makes in the app and its MCP server (bf4f86c4). The pin is that release's signed terminal-release.json, verified against zn-release-1 and copied byte for byte; the staged binary reports zn v0.18.1. The in-app help's CLI card names 0.18.1 and desktop 2.90.0. --- apps/desktop/terminal-release.json | 20 ++++++++++---------- packages/app-core/src/lib/help.ts | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/desktop/terminal-release.json b/apps/desktop/terminal-release.json index 244f4345..6667cb96 100644 --- a/apps/desktop/terminal-release.json +++ b/apps/desktop/terminal-release.json @@ -3,24 +3,24 @@ "release": { "repository": "ZenNotes/tui", "protocol": 1, - "version": "0.18.0", - "commit": "e443a8b0f3c8886dcdcac3aeec6269914968060b", + "version": "0.18.1", + "commit": "8b0582a524603a543f244f210225fbb6f06d6deb", "artifacts": { "darwin-arm64": { - "url": "https://github.com/ZenNotes/tui/releases/download/v0.18.0/zn_0.18.0_darwin_arm64.tar.gz", - "sha256": "3b57795dece8e11d7a500ee2b301621d3187145e7264b7242851fd54b473d2a9" + "url": "https://github.com/ZenNotes/tui/releases/download/v0.18.1/zn_0.18.1_darwin_arm64.tar.gz", + "sha256": "fb26893566292629ae8a232289abc9178dd8f0b6a13b0896eda2b77edb12662d" }, "darwin-x64": { - "url": "https://github.com/ZenNotes/tui/releases/download/v0.18.0/zn_0.18.0_darwin_amd64.tar.gz", - "sha256": "da3bed8f9e436f5c3f3fc78007df704ac18be317890d85e19fc76ba2124b1476" + "url": "https://github.com/ZenNotes/tui/releases/download/v0.18.1/zn_0.18.1_darwin_amd64.tar.gz", + "sha256": "95242d01306e8915e775bed271a7152639151d7dc05ee5d5a17b58d815cee40d" }, "linux-arm64": { - "url": "https://github.com/ZenNotes/tui/releases/download/v0.18.0/zn_0.18.0_linux_arm64.tar.gz", - "sha256": "cb4816d57f2a8b2f10748173cf232a04aaf0be40ab2c072fbeeb1e9380a1d48e" + "url": "https://github.com/ZenNotes/tui/releases/download/v0.18.1/zn_0.18.1_linux_arm64.tar.gz", + "sha256": "e6798937df01e68bd12a965261fd1a4c4ee7422575889b43329a3fd29a67892b" }, "linux-x64": { - "url": "https://github.com/ZenNotes/tui/releases/download/v0.18.0/zn_0.18.0_linux_amd64.tar.gz", - "sha256": "7b738d0d5ce98a817d0017689e6fea464649240f42ba4baaae4a5b70de90e538" + "url": "https://github.com/ZenNotes/tui/releases/download/v0.18.1/zn_0.18.1_linux_amd64.tar.gz", + "sha256": "3b6f87a06abad7b0075bd6c9e304e96ff80387b2c8bef94defc97a240005677a" } } } diff --git a/packages/app-core/src/lib/help.ts b/packages/app-core/src/lib/help.ts index 4dead137..311fe391 100644 --- a/packages/app-core/src/lib/help.ts +++ b/packages/app-core/src/lib/help.ts @@ -1716,10 +1716,10 @@ export const HELP_CLI: HelpCard[] = [ 'Builds with the Go terminal tool include `zn tui`. An existing desktop-managed CLI keeps itself up to date (see Updates arrive without a ZenNotes update); keep using the same `zn` commands. Settings shows the installed terminal version and offers Repair if an upgrade needs attention. Desktop-installed commands keep following the desktop vault, while the TUI remembers its own selection. Explicit `--vault` and `--server` flags still win. Set `ZENNOTES_WORKSPACE_SOURCE=terminal` to use the terminal default for a command, or `ZENNOTES_CLI_ENGINE=legacy` to run the previous CLI during the transition. Homebrew and manual installations stay managed by their own installer. A shortcut left behind by a moved Mac app or an old AppImage can be repaired from Settings: review the old target, replacement and backup path before choosing Repair shortcut. Note saves preserve creation dates in small files under `.zennotes/note-metadata` without changing Markdown; keep the `.zennotes` folder with vault backups. Explicit legacy rollback needs the original app resources to remain available.' }, { - title: 'CLI 0.18.0 in desktop 2.89.0', + title: 'CLI 0.18.1 in desktop 2.90.0', only: 'desktop', body: - 'On macOS and Linux, desktop 2.89.0 bundles CLI 0.18.0. Run `zn` in an interactive terminal or `zn tui` to open the editor. It includes editable settings, restored splits and sessions, comments, attachments, templates, bulk actions, and cross-note yank and paste. Use `:version` in the TUI for a persistent report and press `c` or `y` to copy it. `zn status`, `zn doctor`, `zn config`, and `zn completion` help with setup and scripts; `zn server` manages native local servers, also available through `:servers`. Since 0.6.1, `zn vault list` marks each entry `app` (saved by this desktop app) or `terminal` (saved by zn itself) and says which of them `zn use`, `zn disconnect` and `zn vault remove` act on; every command starts without waiting on terminals that do not answer a background-color query; and the help output lines up. 0.6.2 is the first release with a signed manifest, which is how this app keeps its managed zn current, 0.6.3 reads a line over a lone `-` as a paragraph, as the app does (#898), and 0.7.0’s `zn mcp` records an assistant’s edits for review in this app and no longer lets an assistant write into `.zennotes`. 0.7.1 leaves cancelled tasks out of the open ones in `zn task list` and in `zn mcp`’s `list_tasks` (#929), and when a server needs a token, its message points to Settings → MCP → Server token. 0.7.2 reads tasks in numbered lists and quotes the way the app does, in `zn task` and in `zn mcp`, and 0.8.0 adds `zn task watch`, which prints each task status change as it happens, and gives each task’s status in `zn task list --json` and in `list_tasks`. 0.8.1 keeps a finished task note in its Custom status column and gives `zn mcp` this app’s assistant instructions again, and 0.9.0 follows the vault’s Task folders in `zn task list`, `zn task watch` and `zn mcp`, and the TUI’s Settings saves both Tasks folder lists where every app reads them. 0.9.1 keeps a wikilink of more than one word from widening the TUI preview’s row and scrolling the whole screen. 0.9.2 lets a second `$` on a wrapped line reach the end of the line and makes three backticks a code fence, 0.10.0 adds `zn base pages`, which gives every database record its record page so each can be linked, and 0.11.0 gives a task without a due date its own No due date group and Status board column, as this app does (#990), and orders the task list by priority with `O` or `:order priority` (#989). 0.12.0 can draw display math and TikZ in the TUI preview with `[terminal] math = "latex"`, using TeX installed on your computer (zn does not include TeX; `zn doctor` prints the install commands), 0.12.1 fits pictures in the preview to the pane as it grows or shrinks, 0.12.2 says which TeX tool is missing and how to install it, and 0.13.0 lets `zn mcp` share only part of a vault (`--allow-path`, `--deny-path`, `--read-only`, `--access`; see Share part of a vault with an assistant), keeps assistants out of hidden and system folders, and puts a row `zn base add` makes into the picked rows of the view the database opens on; 0.13.1 leaves the template folder out of tasks, search and tags, as the app does; 0.14.0 adds month, week and day views to the TUI’s Tasks calendar, a bar cursor while you type, a note’s own view mode from its frontmatter (`[terminal] view_mode_field` and `[terminal.view_mode_rules]`), and opens every new note in the editor; and 0.15.0 stops undo from wiping a note, lets autosave be turned off (`[terminal] autosave = false`), and makes `gd` follow links the way the desktop does. 0.16.0 gives `zn mcp` tools for attachments, `update_task`, `daily_note` and sections. 0.17.0 draws Mermaid diagrams at any pane width, keeps a note’s control sequences out of your terminal, keeps code literal in the preview, and reads a table’s `[[Note\\|alias]]` as a link. 0.17.1 moves the TUI’s reading view on the first `j`, Ctrl+D or Ctrl+F press, draws a flowchart’s side edges honestly, and keeps color codes in names out of your terminal. 0.17.2 puts the cursor on a task’s own line when you open it from the TUI, and on the heading itself when you open one from the outline. 0.17.3 keeps a repeating task’s block id on the open task when it rolls, as this app does. Run `zn update --check` to see the latest CLI release; for a desktop-managed CLI, ZenNotes installs it. The full command reference is at https://zennotes.org/tui/docs.' + 'On macOS and Linux, desktop 2.90.0 bundles CLI 0.18.1. Run `zn` in an interactive terminal or `zn tui` to open the editor. It includes editable settings, restored splits and sessions, comments, attachments, templates, bulk actions, and cross-note yank and paste. Use `:version` in the TUI for a persistent report and press `c` or `y` to copy it. `zn status`, `zn doctor`, `zn config`, and `zn completion` help with setup and scripts; `zn server` manages native local servers, also available through `:servers`. Since 0.6.1, `zn vault list` marks each entry `app` (saved by this desktop app) or `terminal` (saved by zn itself) and says which of them `zn use`, `zn disconnect` and `zn vault remove` act on; every command starts without waiting on terminals that do not answer a background-color query; and the help output lines up. 0.6.2 is the first release with a signed manifest, which is how this app keeps its managed zn current, 0.6.3 reads a line over a lone `-` as a paragraph, as the app does (#898), and 0.7.0’s `zn mcp` records an assistant’s edits for review in this app and no longer lets an assistant write into `.zennotes`. 0.7.1 leaves cancelled tasks out of the open ones in `zn task list` and in `zn mcp`’s `list_tasks` (#929), and when a server needs a token, its message points to Settings → MCP → Server token. 0.7.2 reads tasks in numbered lists and quotes the way the app does, in `zn task` and in `zn mcp`, and 0.8.0 adds `zn task watch`, which prints each task status change as it happens, and gives each task’s status in `zn task list --json` and in `list_tasks`. 0.8.1 keeps a finished task note in its Custom status column and gives `zn mcp` this app’s assistant instructions again, and 0.9.0 follows the vault’s Task folders in `zn task list`, `zn task watch` and `zn mcp`, and the TUI’s Settings saves both Tasks folder lists where every app reads them. 0.9.1 keeps a wikilink of more than one word from widening the TUI preview’s row and scrolling the whole screen. 0.9.2 lets a second `$` on a wrapped line reach the end of the line and makes three backticks a code fence, 0.10.0 adds `zn base pages`, which gives every database record its record page so each can be linked, and 0.11.0 gives a task without a due date its own No due date group and Status board column, as this app does (#990), and orders the task list by priority with `O` or `:order priority` (#989). 0.12.0 can draw display math and TikZ in the TUI preview with `[terminal] math = "latex"`, using TeX installed on your computer (zn does not include TeX; `zn doctor` prints the install commands), 0.12.1 fits pictures in the preview to the pane as it grows or shrinks, 0.12.2 says which TeX tool is missing and how to install it, and 0.13.0 lets `zn mcp` share only part of a vault (`--allow-path`, `--deny-path`, `--read-only`, `--access`; see Share part of a vault with an assistant), keeps assistants out of hidden and system folders, and puts a row `zn base add` makes into the picked rows of the view the database opens on; 0.13.1 leaves the template folder out of tasks, search and tags, as the app does; 0.14.0 adds month, week and day views to the TUI’s Tasks calendar, a bar cursor while you type, a note’s own view mode from its frontmatter (`[terminal] view_mode_field` and `[terminal.view_mode_rules]`), and opens every new note in the editor; and 0.15.0 stops undo from wiping a note, lets autosave be turned off (`[terminal] autosave = false`), and makes `gd` follow links the way the desktop does. 0.16.0 gives `zn mcp` tools for attachments, `update_task`, `daily_note` and sections. 0.17.0 draws Mermaid diagrams at any pane width, keeps a note’s control sequences out of your terminal, keeps code literal in the preview, and reads a table’s `[[Note\\|alias]]` as a link. 0.17.1 moves the TUI’s reading view on the first `j`, Ctrl+D or Ctrl+F press, draws a flowchart’s side edges honestly, and keeps color codes in names out of your terminal. 0.17.2 puts the cursor on a task’s own line when you open it from the TUI, and on the heading itself when you open one from the outline. 0.17.3 keeps a repeating task’s block id on the open task when it rolls, as this app does. Run `zn update --check` to see the latest CLI release; for a desktop-managed CLI, ZenNotes installs it. The full command reference is at https://zennotes.org/tui/docs.' }, { title: 'Updates arrive without a ZenNotes update', From e47484414ade3bdcaec0a737d8f646288c1a2024 Mon Sep 17 00:00:00 2001 From: Adib Hanna Date: Fri, 20 Nov 2026 14:42:19 -0600 Subject: [PATCH 6/8] Release: align desktop and shared packages at 2.90.0 --- apps/desktop/package.json | 2 +- apps/quicklook/package.json | 2 +- apps/share-viewer/package.json | 2 +- apps/web/package.json | 2 +- package-lock.json | 22 +++++++++++----------- package.json | 2 +- packages/app-core/package.json | 2 +- packages/bridge-contract/package.json | 2 +- packages/portable-vault/package.json | 2 +- packages/shared-domain/package.json | 2 +- packages/shared-ui/package.json | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 72822331..9c2d5acc 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/desktop", "productName": "ZenNotes", - "version": "2.89.0", + "version": "2.90.0", "description": "ZenNotes desktop shell", "private": true, "main": "./out/main/index.js", diff --git a/apps/quicklook/package.json b/apps/quicklook/package.json index 9de53735..b217d39e 100644 --- a/apps/quicklook/package.json +++ b/apps/quicklook/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/quicklook", "private": true, - "version": "2.89.0", + "version": "2.90.0", "type": "module", "description": "The macOS Quick Look preview for Markdown files: the page it renders and the Swift extension that serves it", "homepage": "https://zennotes.org", diff --git a/apps/share-viewer/package.json b/apps/share-viewer/package.json index be62cdd1..e208e205 100644 --- a/apps/share-viewer/package.json +++ b/apps/share-viewer/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/share-viewer", "private": true, - "version": "2.89.0", + "version": "2.90.0", "type": "module", "description": "Read-only renderer for publicly shared ZenNotes, embedded by the zennotes.org website", "homepage": "https://zennotes.org", diff --git a/apps/web/package.json b/apps/web/package.json index 110a508d..0aa4416f 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/web", "private": true, - "version": "2.89.0", + "version": "2.90.0", "type": "module", "description": "ZenNotes web client for self-hosted and hosted deployments", "homepage": "https://zennotes.org", diff --git a/package-lock.json b/package-lock.json index 986580a0..251799ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "zennotes-monorepo", - "version": "2.89.0", + "version": "2.90.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "zennotes-monorepo", - "version": "2.89.0", + "version": "2.90.0", "hasInstallScript": true, "workspaces": [ "apps/*", @@ -23,7 +23,7 @@ }, "apps/desktop": { "name": "@zennotes/desktop", - "version": "2.89.0", + "version": "2.90.0", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "^6.18.3", @@ -927,7 +927,7 @@ }, "apps/quicklook": { "name": "@zennotes/quicklook", - "version": "2.89.0", + "version": "2.90.0", "dependencies": { "@codemirror/autocomplete": "^6.18.3", "@codemirror/commands": "^6.7.1", @@ -1013,7 +1013,7 @@ }, "apps/share-viewer": { "name": "@zennotes/share-viewer", - "version": "2.89.0", + "version": "2.90.0", "dependencies": { "@codemirror/autocomplete": "^6.18.3", "@codemirror/commands": "^6.7.1", @@ -1085,7 +1085,7 @@ }, "apps/web": { "name": "@zennotes/web", - "version": "2.89.0", + "version": "2.90.0", "dependencies": { "@codemirror/autocomplete": "^6.18.3", "@codemirror/commands": "^6.7.1", @@ -16426,7 +16426,7 @@ }, "packages/app-core": { "name": "@zennotes/app-core", - "version": "2.89.0", + "version": "2.90.0", "dependencies": { "@codemirror/autocomplete": "^6.18.3", "@codemirror/commands": "^6.7.1", @@ -16515,14 +16515,14 @@ }, "packages/bridge-contract": { "name": "@zennotes/bridge-contract", - "version": "2.89.0", + "version": "2.90.0", "devDependencies": { "typescript": "^5.7.2" } }, "packages/portable-vault": { "name": "@zennotes/portable-vault", - "version": "2.89.0", + "version": "2.90.0", "dependencies": { "@zennotes/bridge-contract": "*", "@zennotes/shared-domain": "*" @@ -16534,7 +16534,7 @@ }, "packages/shared-domain": { "name": "@zennotes/shared-domain", - "version": "2.89.0", + "version": "2.90.0", "dependencies": { "@scure/bip39": "2.4.0", "@zennotes/bridge-contract": "*", @@ -16548,7 +16548,7 @@ }, "packages/shared-ui": { "name": "@zennotes/shared-ui", - "version": "2.89.0" + "version": "2.90.0" } } } diff --git a/package.json b/package.json index ddc23857..649a45e6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zennotes-monorepo", "private": true, - "version": "2.89.0", + "version": "2.90.0", "description": "ZenNotes monorepo for desktop, web, and self-hosted server builds", "packageManager": "npm@10.9.2", "engines": { diff --git a/packages/app-core/package.json b/packages/app-core/package.json index c410a5c2..e835dfaf 100644 --- a/packages/app-core/package.json +++ b/packages/app-core/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/app-core", "private": true, - "version": "2.89.0", + "version": "2.90.0", "type": "module", "exports": { "./main": "./src/main.tsx", diff --git a/packages/bridge-contract/package.json b/packages/bridge-contract/package.json index 6bcad779..756f1aa5 100644 --- a/packages/bridge-contract/package.json +++ b/packages/bridge-contract/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/bridge-contract", "private": true, - "version": "2.89.0", + "version": "2.90.0", "type": "module", "exports": { "./bridge": "./src/bridge.ts", diff --git a/packages/portable-vault/package.json b/packages/portable-vault/package.json index e81e9985..e3ac137e 100644 --- a/packages/portable-vault/package.json +++ b/packages/portable-vault/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/portable-vault", "private": true, - "version": "2.89.0", + "version": "2.90.0", "type": "module", "exports": { "./host": "./src/host.ts", diff --git a/packages/shared-domain/package.json b/packages/shared-domain/package.json index b9bdc87f..fd6add56 100644 --- a/packages/shared-domain/package.json +++ b/packages/shared-domain/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/shared-domain", "private": true, - "version": "2.89.0", + "version": "2.90.0", "type": "module", "exports": { "./*": "./src/*.ts" diff --git a/packages/shared-ui/package.json b/packages/shared-ui/package.json index 2628324c..0bba360a 100644 --- a/packages/shared-ui/package.json +++ b/packages/shared-ui/package.json @@ -1,7 +1,7 @@ { "name": "@zennotes/shared-ui", "private": true, - "version": "2.89.0", + "version": "2.90.0", "type": "module", "exports": { ".": "./src/index.ts" From f8016f12a90495d5cf1c031ebe31718f15fa6b06 Mon Sep 17 00:00:00 2001 From: Adib Hanna Date: Fri, 20 Nov 2026 15:17:28 -0600 Subject: [PATCH 7/8] Deps(katex): math renders with KaTeX 0.19.1, past its trust-bypass advisory npm audit listed seven low findings, all GHSA-238p-pmpm-9mq7: in KaTeX before 0.18.2, prototype pollution that already exists in the page can switch on options the author left off, such as trust. Every copy of KaTeX the app loads was 0.16.47: our own dependency in app-core, desktop, web, quicklook and the share viewer, and the ones rehype-katex, micromark-extension-math and mermaid bring. Those three still ask for ^0.16.0 in their newest releases, so a root override moves them to the same 0.19.1, and the lockfile resolves one copy for the whole tree. The production audit now reports nothing at any level. KaTeX 0.18 prefixed its internal class names (`.tag` is now `.katex-tag`, `.base` is `.katex-base`). The app's stylesheet targets only `.katex` and `.katex-display`, which keep their names, and it passes no `strict` option, so the 0.19 strict change reports nothing new. The two equation-numbering tests and the editor smoke suite read the number by the old class and now read `.katex-tag`. Driven in the built app on a note with inline, struck, numbered, matrix, aligned and underbrace math: every formula renders in Edit and Preview, numbers read (1) and (2), no KaTeX errors, no console errors or warnings. A user theme that styled KaTeX's internal classes would need the new names; the app ships none that do. --- apps/desktop/package.json | 2 +- apps/quicklook/package.json | 2 +- apps/share-viewer/package.json | 2 +- apps/web/package.json | 2 +- package-lock.json | 36 ++++++++++++------- package.json | 1 + packages/app-core/package.json | 2 +- .../app-core/src/lib/cm-math-render.test.ts | 2 +- packages/app-core/src/lib/markdown.test.ts | 2 +- tooling/scripts/editor-improvements-smoke.mjs | 4 +-- 10 files changed, 33 insertions(+), 22 deletions(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 9c2d5acc..1ee31d6c 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -69,7 +69,7 @@ "harper.js": "^2.7.0", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "node-tikzjax": "^1.0.5", "pele": "1.12.0", "prettier": "^3.8.2", diff --git a/apps/quicklook/package.json b/apps/quicklook/package.json index b217d39e..9bdc465b 100644 --- a/apps/quicklook/package.json +++ b/apps/quicklook/package.json @@ -32,7 +32,7 @@ "gray-matter": "^4.0.3", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "pele": "1.12.0", "prettier": "^3.8.2", "react": "^18.3.1", diff --git a/apps/share-viewer/package.json b/apps/share-viewer/package.json index e208e205..e9fdf80f 100644 --- a/apps/share-viewer/package.json +++ b/apps/share-viewer/package.json @@ -33,7 +33,7 @@ "gray-matter": "^4.0.3", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "pele": "1.12.0", "prettier": "^3.8.2", "react": "^18.3.1", diff --git a/apps/web/package.json b/apps/web/package.json index 0aa4416f..7458611a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -46,7 +46,7 @@ "harper.js": "^2.7.0", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "pele": "1.12.0", "prettier": "^3.8.2", "react": "^18.3.1", diff --git a/package-lock.json b/package-lock.json index 251799ca..db5c84f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,7 +57,7 @@ "harper.js": "^2.7.0", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "node-tikzjax": "^1.0.5", "pele": "1.12.0", "prettier": "^3.8.2", @@ -789,6 +789,16 @@ "graceful-fs": "^4.1.6" } }, + "apps/desktop/node_modules/katex/node_modules/commander": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.1.0.tgz", + "integrity": "sha512-cgnQ88TRrWcC7pVq46RzJVRMktu3W2RcbnoidnfBsl1bmDCBwJS/udcIZpKoCrbAYYaCqsz1yZCVIgbIaU3ddQ==", + "extraneous": true, + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + }, "apps/desktop/node_modules/minipass": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", @@ -949,7 +959,7 @@ "gray-matter": "^4.0.3", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "pele": "1.12.0", "prettier": "^3.8.2", "react": "^18.3.1", @@ -1035,7 +1045,7 @@ "gray-matter": "^4.0.3", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "pele": "1.12.0", "prettier": "^3.8.2", "react": "^18.3.1", @@ -1115,7 +1125,7 @@ "harper.js": "^2.7.0", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "pele": "1.12.0", "prettier": "^3.8.2", "react": "^18.3.1", @@ -10762,28 +10772,28 @@ } }, "node_modules/katex": { - "version": "0.16.47", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.47.tgz", - "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.19.1.tgz", + "integrity": "sha512-jG8uKntjSEcm2EpQOh0XturpPuuC9r3Sq5HLHdsFdWZT27E672SF19QEi+of0/YeOy15lDgRhKvr5614uRrEfA==", "funding": [ "https://opencollective.com/katex", "https://github.com/sponsors/katex" ], "license": "MIT", "dependencies": { - "commander": "^8.3.0" + "commander": "^15.0.0" }, "bin": { "katex": "cli.js" } }, "node_modules/katex/node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-15.1.0.tgz", + "integrity": "sha512-cgnQ88TRrWcC7pVq46RzJVRMktu3W2RcbnoidnfBsl1bmDCBwJS/udcIZpKoCrbAYYaCqsz1yZCVIgbIaU3ddQ==", "license": "MIT", "engines": { - "node": ">= 12" + "node": ">=22.12.0" } }, "node_modules/keyv": { @@ -16469,7 +16479,7 @@ "hast": "^1.0.0", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "mdast": "^3.0.0", "pele": "1.12.0", "prettier": "^3.8.2", diff --git a/package.json b/package.json index 649a45e6..f26da876 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@mermaid-js/parser": "1.2.1", "nanoid": "5.1.16" }, + "katex": "^0.19.1", "vite": "$vite" }, "scripts": { diff --git a/packages/app-core/package.json b/packages/app-core/package.json index e835dfaf..9ab926f1 100644 --- a/packages/app-core/package.json +++ b/packages/app-core/package.json @@ -65,7 +65,7 @@ "hast": "^1.0.0", "highlight.js": "^11.10.0", "jsxgraph": "^1.12.2", - "katex": "^0.16.15", + "katex": "^0.19.1", "mdast": "^3.0.0", "pele": "1.12.0", "prettier": "^3.8.2", diff --git a/packages/app-core/src/lib/cm-math-render.test.ts b/packages/app-core/src/lib/cm-math-render.test.ts index 0b5e6ed6..f0734397 100644 --- a/packages/app-core/src/lib/cm-math-render.test.ts +++ b/packages/app-core/src/lib/cm-math-render.test.ts @@ -82,7 +82,7 @@ describe('mathRenderExtension', () => { ].join('\n') ) expect( - Array.from(view.dom.querySelectorAll('.katex-html .tag')).map((node) => + Array.from(view.dom.querySelectorAll('.katex-html .katex-tag')).map((node) => node.textContent?.replace(/[\s\u200b]/g, '') ) ).toEqual(['(1)', '(2)']) diff --git a/packages/app-core/src/lib/markdown.test.ts b/packages/app-core/src/lib/markdown.test.ts index 6e18032f..795cf7d0 100644 --- a/packages/app-core/src/lib/markdown.test.ts +++ b/packages/app-core/src/lib/markdown.test.ts @@ -365,7 +365,7 @@ describe('currency vs inline math (reading view matches the editor)', () => { const host = document.createElement('div') host.innerHTML = html expect( - Array.from(host.querySelectorAll('.katex-html .tag')).map((node) => + Array.from(host.querySelectorAll('.katex-html .katex-tag')).map((node) => node.textContent?.replace(/[\s\u200b]/g, '') ) ).toEqual(['(1)', '(2)']) diff --git a/tooling/scripts/editor-improvements-smoke.mjs b/tooling/scripts/editor-improvements-smoke.mjs index 7f7daaa4..5dd744a8 100644 --- a/tooling/scripts/editor-improvements-smoke.mjs +++ b/tooling/scripts/editor-improvements-smoke.mjs @@ -585,7 +585,7 @@ async function main() { const equationTags = await evaluate( client, - `Array.from(document.querySelectorAll('.cm-math-block .katex-html .tag')).map((node) => (node.textContent ?? '').replace(/[\\s\\u200b]/g, ''))` + `Array.from(document.querySelectorAll('.cm-math-block .katex-html .katex-tag')).map((node) => (node.textContent ?? '').replace(/[\\s\\u200b]/g, ''))` ) check( 'live editor numbers equation environments in document order', @@ -621,7 +621,7 @@ async function main() { check('Preview mode opens', !!previewReady) const previewTags = await evaluate( client, - `Array.from(document.querySelectorAll('.prose-zen .katex-html .tag')).map((node) => (node.textContent ?? '').replace(/[\\s\\u200b]/g, ''))` + `Array.from(document.querySelectorAll('.prose-zen .katex-html .katex-tag')).map((node) => (node.textContent ?? '').replace(/[\\s\\u200b]/g, ''))` ) check( 'Preview uses the same equation numbering', From b1895548261e5ed3550d76921daae1cb4f3cd500 Mon Sep 17 00:00:00 2001 From: Adib Hanna Date: Fri, 20 Nov 2026 15:32:20 -0600 Subject: [PATCH 8/8] Fix(tests): the connections hover-preview test waits up to 5 s On the 2.90.0 gate's second full run, 'opens no preview under a finger, and still does under a pointer' found no preview within vi.waitFor's default 1 s. The preview appears in about 190 ms on an idle machine and 270 ms with every core busy, and the test passed five times alone and in two more full app-core runs; the failing run shared the CPU with the desktop suite in one turbo run. The wait now allows 5 s, so a slow runner still proves the preview opens under a pointer. The touch half is unchanged: it advances fake timers and expects no preview. --- packages/app-core/src/components/ConnectionsPanel.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/app-core/src/components/ConnectionsPanel.test.ts b/packages/app-core/src/components/ConnectionsPanel.test.ts index 0b05cc47..7e6bcbea 100644 --- a/packages/app-core/src/components/ConnectionsPanel.test.ts +++ b/packages/app-core/src/components/ConnectionsPanel.test.ts @@ -174,6 +174,8 @@ describe('ConnectionsPanel: a row where nothing can hover', () => { } finally { vi.useRealTimers() } - await vi.waitFor(() => expect(preview()).not.toBeNull()) + // The preview takes about 200 ms here, but sharing the CPU with the + // desktop suite in one turbo run pushed it past waitFor's 1 s default. + await vi.waitFor(() => expect(preview()).not.toBeNull(), { timeout: 5000 }) }) })