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 diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 72822331..1ee31d6c 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", @@ -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/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=22.12.0" + } + }, "apps/desktop/node_modules/minipass": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", @@ -927,7 +937,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", @@ -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", @@ -1013,7 +1023,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", @@ -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", @@ -1085,7 +1095,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", @@ -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": { @@ -16426,7 +16436,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", @@ -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", @@ -16515,14 +16525,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 +16544,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 +16558,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..f26da876 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": { @@ -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 c410a5c2..9ab926f1 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", @@ -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/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 }) }) }) 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/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( 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', 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/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: [ 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" 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',