ZenNotes 2.34.0: folder sessions behave
Two
zn openfixes from @rrpolanco's first day with the CLI. Opening a folder from the terminal after closing every window no longer brings the previous vault window back next to it, and Move to Trash inside a temporary folder session now does something visible: the note goes to the system Trash, the folder stays clean, and the app says so.
🐛 Fixes
-
zn openopens one window, not two. (#649, reported by @rrpolanco) On macOS, ZenNotes keeps running after its last window closes. Handing it a folder from the terminal in that state opened the folder and resurrected the last vault's window, because the running instance always raised its main window after queuing the paths it had been given. Forwarded paths now open or focus their own windows, and a default window is only created when nothing could be opened and no workspace window is left. How to test locally: open ZenNotes on a vault, close every window (⌘W), then runzn open .in any folder; exactly one window appears, showing that folder. -
Move to Trash works in a temporary folder session. (#650, reported by @rrpolanco) A folder opened with
zn open .(or dropped on the app) is a temporary session that deliberately never writes atrash/folder into someone's project directory. The refusal was silent, though: right-click → Move to Trash left the note in place and the reason only reached the developer console. The note now goes to the operating system's Trash instead (recoverable from there, nothing new written into the folder), with a toast that says where it went. Every Move to Trash surface also reports a refusal as an error toast from now on, instead of a console line. How to test locally:zn open .in a scratch folder, create a quick note with the+next to Quick Notes, right-click it in the sidebar, Move to Trash, confirm; the note disappears, the toast reads "Moved to the system Trash", andlsshows notrash/folder.
🧰 For contributors
-
CloudSyncHostService.deleteLinkedVault(shared-domain) is the portable twin of the desktop delete, so the mobile shells can honor the Delete Cloud vault button that 2.33.0 put in the shared settings UI. -
second-instancenow waits for the file-open flush it triggered (settleFileOpens) before deciding whetherensureMainWindowis needed;handleStartupMarkdownArgsreturns the number of queued paths.hasWorkspaceWindow()is shared with theactivatehandler. -
trashNoteToSystem(root, rel)invault.tswrapsshell.trashItemand invalidates the meta and search caches; the IPC handler routes ephemeral roots through it.lib/trash-note.ts(moveNoteToTrash) is the single renderer entry point for Move to Trash;humanIpcErrormoved tolib/ipc-error.tsso the helper stays free of the store.
Local-first and keyboard-first, as always.