From 1e904a6ddb265fd736c6b934d5983dbccbacac48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henrique=20Ara=C3=BAjo?= Date: Fri, 13 Nov 2026 10:00:13 -0300 Subject: [PATCH 1/2] fix(updates): check every minute and keep the found version on offer A new release took up to 10 minutes to show up, and a check that hung (after sleep or a network change) had no timeout, so every later check waited on it until the app restarted. Each native check also left its Update resource open on the Rust side. The checker now runs every minute, like Zynko, and again when the window gains focus or becomes visible (at most once per 15 seconds). Native checks time out after 30 seconds and the background download after 15 minutes; updates that are not kept are closed. After its dialog closes, the found version stays on offer in the title bar (Restart to update / Update available) unless skipped, and a newer release replaces it. Automatic checks wait while the dialog is open. --- CHANGELOG.md | 1 + README.md | 2 +- src/lib/components/TitleBar.svelte | 18 +++++++++- src/lib/i18n/locales/en-US.ts | 1 + src/lib/i18n/locales/es-ES.ts | 1 + src/lib/i18n/locales/pt-BR.ts | 1 + src/lib/state/updates.svelte.ts | 53 +++++++++++++++++++++--------- src/lib/updates.ts | 12 ++++++- src/routes/+page.svelte | 5 ++- tests/e2e/title-bar.pw.ts | 14 ++++++++ tests/updates.test.ts | 18 +++++++++- 11 files changed, 106 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfbd79a..259bb8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Releases up to 0.3.5 are described on the [GitHub releases page](https://github. ### Fixed - **Folders open the way they were left.** The sidebar remembers which folders are collapsed in each vault, in the settings file, instead of opening every folder expanded at each start. Renaming a folder keeps it collapsed; folders deleted since are forgotten. +- **New versions show up within a minute.** The app checks every minute instead of every 10, and again when the window comes back from the tray. A check that hung (after sleep or a network change) no longer blocks the later ones, and checks no longer keep their discarded results in memory. After its dialog closes, a found version stays on offer in the title bar (**Restart to update**), and a newer release replaces it as soon as it is published. ## [0.5.2] - 2026-11-11 diff --git a/README.md b/README.md index 3a42e62..ed7745c 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ In-app updates are signed separately and verified before installation. When you close the window, the app stays in the system tray by default. Opening LowNotes again shows and focuses the existing window, restoring it if minimized. Only one instance runs at a time. You can change the close-to-tray behavior in **Settings → General**; the tray menu also lets you quit completely. -LowNotes checks for a new version every few minutes and when its window regains focus, downloads it in the background and then asks to restart. On Linux, updates follow the installation format. DEB and RPM packages installed from the release files update inside LowNotes with a package of the same format (dpkg or rpm installs it after the administrator password prompt), and unmanaged AppImages in a writable folder replace themselves. The Arch package shows a new-version notice with a download for the matching package; install it with pacman. Repository, AUR, Flatpak and Snap installations should be updated through their original source when the new version becomes available there. Portable `.tar.gz` installations require replacing the application files manually. Native packages never replace their executable with an AppImage. +LowNotes checks for a new version every minute and when its window comes back, downloads it in the background and then asks to restart. On Linux, updates follow the installation format. DEB and RPM packages installed from the release files update inside LowNotes with a package of the same format (dpkg or rpm installs it after the administrator password prompt), and unmanaged AppImages in a writable folder replace themselves. The Arch package shows a new-version notice with a download for the matching package; install it with pacman. Repository, AUR, Flatpak and Snap installations should be updated through their original source when the new version becomes available there. Portable `.tar.gz` installations require replacing the application files manually. Native packages never replace their executable with an AppImage. ## What the app offers diff --git a/src/lib/components/TitleBar.svelte b/src/lib/components/TitleBar.svelte index f8a276a..7729142 100644 --- a/src/lib/components/TitleBar.svelte +++ b/src/lib/components/TitleBar.svelte @@ -7,12 +7,15 @@ import type { createWindowFrame } from '$lib/state/window-frame.svelte'; import MenuList from './MenuList.svelte'; - let { menus, title, detail = '', frame } = $props<{ + let { menus, title, detail = '', frame, update = null, onUpdate } = $props<{ menus: AppMenu[]; title: string; /** Shown dimmed after the title, such as the vault name. */ detail?: string; frame: ReturnType; + /** A newer version waiting for the user; `downloaded` once a restart installs it. */ + update?: { version: string; downloaded?: boolean } | null; + onUpdate?: () => void; }>(); let buttons = $state([]); @@ -153,6 +156,13 @@
+ {#if update && onUpdate} + + {/if} + {#if !IS_MAC}