From 0d4153e6decc7fd8636ed6ad47ab9ee47d26f2e5 Mon Sep 17 00:00:00 2001 From: Jure <44338+hoornet@users.noreply.github.com> Date: Fri, 15 May 2026 20:50:47 +0200 Subject: [PATCH] =?UTF-8?q?Bump=20to=20v0.12.13=20=E2=80=94=20union=20lega?= =?UTF-8?q?cy=20+=20cloud=20on=20first=20podcast=20hydrate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 6 ++++++ PKGBUILD | 2 +- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- src/stores/podcast.ts | 24 +++++++++++++++++++++++- 7 files changed, 34 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a903a19..1eca0a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,6 +69,12 @@ jobs: > **Windows note:** The installer is not yet code-signed. Windows SmartScreen will show an "Unknown publisher" warning — click "More info → Run anyway" to install. + ### v0.12.13 — Podcast subscription merge on first upgrade + + Fixes a data-loss edge case introduced by v0.12.12. If you'd been using Vega on **multiple machines before v0.12.12**, the first machine to upgrade would publish its list to the relay; the second machine to upgrade would then silently overwrite its own local-only additions with the cloud list. The first-time hydrate now **unions** the pre-upgrade local list with the cloud list and re-publishes the merger, so subscriptions you'd added on any pre-upgrade machine all survive. Subsequent hydrates keep the cloud-wins behavior — removals on one machine still propagate everywhere as expected. + + This only matters for the upgrade window. Once your subscription list has fully synced across all your devices, behavior is identical to v0.12.12. + ### v0.12.12 — Podcasts that follow your account Your "My Podcasts" list now lives on Nostr, keyed to your pubkey. Reinstall the app on a new machine, switch devices, wipe local storage — your subscriptions come back automatically as long as you sign in with the same key. diff --git a/PKGBUILD b/PKGBUILD index 6b0cb0f..b6e7814 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: hoornet pkgname=vega-nostr -pkgver=0.12.12 +pkgver=0.12.13 pkgrel=1 pkgdesc="Cross-platform Nostr desktop client with Lightning integration" arch=('x86_64') diff --git a/package.json b/package.json index e93b950..7bd45f0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vega", "private": true, - "version": "0.12.12", + "version": "0.12.13", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index f4531a9..56ae737 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5429,7 +5429,7 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vega" -version = "0.12.12" +version = "0.12.13" dependencies = [ "futures-util", "hex", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 11a83b3..aa61237 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vega" -version = "0.12.12" +version = "0.12.13" description = "Cross-platform Nostr desktop client with Lightning integration" authors = ["hoornet"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 757eb3c..1fa274f 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "Vega", - "version": "0.12.12", + "version": "0.12.13", "identifier": "com.hoornet.vega", "build": { "beforeDevCommand": "npm run dev", diff --git a/src/stores/podcast.ts b/src/stores/podcast.ts index b4356bc..91c6db0 100644 --- a/src/stores/podcast.ts +++ b/src/stores/podcast.ts @@ -285,7 +285,29 @@ export const usePodcastStore = create((set, get) => ({ if (get().activePubkey !== pubkey) return; if (result && result.shows.length > 0) { - // Cloud wins: replace local cache with relay state. + // Special case: if this is the FIRST hydrate after upgrade AND the user + // had a pre-upgrade local list AND the cloud already has data (from a + // different machine that upgraded first), union the two so the local-only + // additions on this machine aren't silently dropped. Publish the union so + // the first machine picks them up too. Subsequent hydrates keep + // cloud-wins semantics, so removals still propagate. + if (legacy && legacy.length > 0) { + const seen = new Set(result.shows.map((s) => s.feedUrl)); + const localOnly = legacy.filter((s) => !seen.has(s.feedUrl)); + const merged = [...result.shows, ...localOnly]; + saveSubscriptions(pubkey, merged); + set({ subscriptions: merged }); + if (localOnly.length > 0 && getNDK().signer) { + try { + await publishPodcastList(merged); + } catch (err) { + debug.warn("[Vega] Failed to publish merged podcast list:", err); + } + } + return; + } + + // Steady-state: cloud wins, replace local cache with relay state. saveSubscriptions(pubkey, result.shows); set({ subscriptions: result.shows }); return;