Local, full Windows search replacement, clipboard manager, and launcher: files, apps, settings and semantic media search with Google's EmbeddingGemma 2.
Rust clipboard-historyembedding-modelsembeddinggemma-2embeddinggemma2embeddingslocal-firstmcp-serversearchsemantic-searchwindows-11
Add Release and Beta update channels for 0.3.25 beta 1
ampersandruf9d40372dd41
diff --git a/.github/workflows/native-windows.yml b/.github/workflows/native-windows.ymlindex 0310f04..7c8f7bb 100644--- a/.github/workflows/native-windows.yml+++ b/.github/workflows/native-windows.yml@@ -17,6 +17,7 @@ jobs:- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249with:toolchain: 1.98.1+ components: rustfmt- name: Build verified native setup and portable packageshell: pwshrun: ./Build-Rust.ps1@@ -48,6 +49,6 @@ jobs:with:name: VectorDash-native-Windowspath: |- dist/installer/VectorDash-Rust-Setup-*.exe+ dist/installer/VectorDash-*Setup-*.exedist/installer/VectorDash-Rust-*.zipdist/installer/RUST-SHA256SUMS.txtdiff --git a/Build-Rust.ps1 b/Build-Rust.ps1index b457b91..76d7902 100644--- a/Build-Rust.ps1+++ b/Build-Rust.ps1@@ -82,8 +82,8 @@ if (Test-Path $taskPortable) { throw 'Portable staging directory already exists.New-Item -ItemType Directory -Force $taskPortable | Out-NullGet-ChildItem -LiteralPath $taskBundle | Copy-Item -Destination $taskPortable -Recurse -ForceSet-Content -LiteralPath (Join-Path $taskPortable 'portable.flag') -Value '' -Encoding ascii-Compress-Archive -Path (Join-Path $taskPortable '*') -DestinationPath 'dist/installer/VectorDash-Rust-0.3.24-x64.zip' -Force-$taskInstaller='dist/installer/VectorDash-Rust-Setup-0.3.24-x64.exe'-$taskZip='dist/installer/VectorDash-Rust-0.3.24-x64.zip'+Compress-Archive -Path (Join-Path $taskPortable '*') -DestinationPath 'dist/installer/VectorDash-Rust-0.3.25-beta.1-x64.zip' -Force+$taskInstaller='dist/installer/VectorDash-Beta-Setup-0.3.25-beta.1-x64.exe'+$taskZip='dist/installer/VectorDash-Rust-0.3.25-beta.1-x64.zip'@($taskInstaller,$taskZip) | ForEach-Object {((Get-FileHash -LiteralPath $_ -Algorithm SHA256).Hash.ToLowerInvariant()+' '+(Split-Path $_ -Leaf))} | Set-Content 'dist/installer/RUST-SHA256SUMS.txt' -Encoding asciiWrite-Output "Native installer and portable ZIP ready."diff --git a/README.md b/README.mdindex 5dd660e..f5b70d9 100644--- a/README.md+++ b/README.md@@ -20,6 +20,7 @@ Search by name or exact words, or describe what you remember. Google's **Embeddi| **Calculations** | `24*1.2`, `20% of 150`, `sqrt(81)` | Get an instant local answer; press **Enter** to copy it. |- **File search:** combine names, exact words and semantic matches. Read PDF, Word, Excel and PowerPoint content; optionally use OCR for screenshot text. Search across 100+ languages and opt into code search.+- **Update channels:** choose Release for full releases, or Beta to include pre-releases, in About → Updates.- **Quick search and previews:** a frosted popup with adjustable color, transparency and gradient. It stays compact until you type. Preview results, drag the divider to resize Search/Clipboard previews, inspect why they matched, and open, copy or reveal files in Explorer.- **Your sources, your choice:** index names only for fast drive-wide search, or fully index selected folders. Nested Full folders override Quick drives. Select multiple search sources, exclude files/types or common Windows cache folders, and see Full/Quick counts and recent additions.- **Advanced and saved searches:** combine filenames, wildcards, size and dates, such as name:dog*.jpg size:>1MB or ext:pdf modified:today. Save queries together with their modes, sources and exclusions; rename or remove them in Settings.diff --git a/native/Cargo.lock b/native/Cargo.lockindex 741e3b9..45a42e5 100644--- a/native/Cargo.lock+++ b/native/Cargo.lock@@ -5716,7 +5716,7 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"[[package]]name = "vectordash"-version = "0.3.24"+version = "0.3.25-beta.1"dependencies = ["anyhow","arboard",@@ -5744,6 +5744,7 @@ dependencies = ["rfd","rusqlite","scraper",+ "semver","serde","serde_json","sha2",diff --git a/native/Cargo.toml b/native/Cargo.tomlindex 98d97f7..3990bb1 100644--- a/native/Cargo.toml+++ b/native/Cargo.toml@@ -1,10 +1,11 @@[package]name = "vectordash"-version = "0.3.24"+version = "0.3.25-beta.1"edition = "2024"license = "MIT"[dependencies]anyhow = "1"+semver = "1"base64 = "0.22"chrono = { version = "0.4", features = ["serde"] }crossbeam-channel = "0.5"diff --git a/native/build.rs b/native/build.rsindex 58ba3ba..572b0e6 100644--- a/native/build.rs+++ b/native/build.rs@@ -10,7 +10,7 @@ fn main() {println!("cargo:rustc-link-arg=/DELAYLOAD:mfreadwrite.dll");}let version = std::env::var("CARGO_PKG_VERSION").unwrap();- let commas = format!("{},0", version.replace('.', ","));+ let commas = format!("{},0", version.split('-').next().unwrap().replace('.', ","));let icon = std::path::Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("assets/vectordash.ico").to_string_lossy()diff --git a/native/docs/0.3.25-beta.1.md b/native/docs/0.3.25-beta.1.mdnew file mode 100644index 0000000..7db347b--- /dev/null+++ b/native/docs/0.3.25-beta.1.md@@ -0,0 +1,18 @@+# VectorDash 0.3.25 Beta 1 — Search and indexing stability++This is a pre-release for testing. Beta installers use a separate asset name so older updaters cannot accidentally offer them as full releases. Install this beta manually once to access the channel selector.++- About → Updates now has Release and Beta channels. Release is the default and offers only full releases; Beta also offers pre-releases. Save the selection to apply it. Beta versions use semantic version ordering, and switching channels discards stale update checks/download offers.++- Search and Clipboard preview panes have draggable dividers with remembered widths. Images fit the available space without changing aspect ratio; double-click the divider to reset.+- Removed sources and exclusions take effect immediately in search and MCP, including when no sources remain. Old index entries are cleaned in small background batches under idle rules.+- Hybrid search shows file names and matching document words before semantic inference finishes. Model outages preserve those results; superseded queries disconnect promptly.+- Small documents and images share bounded embedding batches. Interactive semantic searches get priority between indexing batches.+- PDF indexing reads and releases one page at a time, checks cancellation between pages, and reuses rendered pages for OCR and visual embeddings.+- Interrupted indexing retains completed embedding chunks and pending change paths in the index database. Recovery re-extracts the file but reuses staged vectors. Current-source rules still apply.+- Automatic change retries retain their targeted scope, back off during outages, and preserve explicit cancellation across restarts.+- Embedding responses reject zero, non-finite, inconsistent, or incorrectly mapped vectors. Unsupported media batches fall back to single requests.+- Additional secret filenames and private-key formats are excluded before file reads. Parser processes receive no unrelated server credentials.+- Release builds use the bundled PDF renderer unless explicitly started with `--allow-development-overrides`. Official publication can verify a successful build of current main and package checksums.++Performance measurements and test conditions are in [BENCHMARKS.md](BENCHMARKS.md). Unsigned Windows builds may still prompt SmartScreen.diff --git a/native/scripts/release_gate.py b/native/scripts/release_gate.pyindex 7cc3859..15aa7d5 100644--- a/native/scripts/release_gate.py+++ b/native/scripts/release_gate.py@@ -17,10 +17,11 @@ def file_digest(path):def verify_assets(directory, version):- if not re.fullmatch(r"\d+\.\d+\.\d+", version):- raise ValueError("Expected an official x.y.z version")+ if not re.fullmatch(r"\d+\.\d+\.\d+(?:-beta\.[1-9]\d*)?", version):+ raise ValueError("Expected x.y.z or x.y.z-beta.N")directory = Path(directory)- expected = {f"VectorDash-Rust-Setup-{version}-x64.exe", f"VectorDash-Rust-{version}-x64.zip"}+ installer_name = f"VectorDash-{'Beta' if '-' in version else 'Rust'}-Setup-{version}-x64.exe"+ expected = {installer_name, f"VectorDash-Rust-{version}-x64.zip"}manifest = directory / "RUST-SHA256SUMS.txt"seen = set()for line in manifest.read_text(encoding="ascii").splitlines():@@ -32,7 +33,7 @@ def verify_assets(directory, version):seen.add(name)if seen != expected:raise ValueError("Release manifest is incomplete")- installer = directory / f"VectorDash-Rust-Setup-{version}-x64.exe"+ installer = directory / installer_namewith installer.open("rb") as stream:magic = stream.read(2)if magic != b"MZ":@@ -74,6 +75,8 @@ def main():if not args.publish:print("Release manifest and package verified")return+ if "-" in args.version:+ raise ValueError("Official-release publication requires a stable version")repository = os.environ["GITHUB_REPOSITORY"]token = os.environ["GITHUB_TOKEN"]base = "https://api.github.com/repos/" + repositorydiff --git a/native/scripts/test_release_gate.py b/native/scripts/test_release_gate.pyindex 9002844..44ace2a 100644--- a/native/scripts/test_release_gate.py+++ b/native/scripts/test_release_gate.py@@ -23,6 +23,14 @@ class ReleaseGateTests(unittest.TestCase):with self.subTest(extra=extra),tempfile.TemporaryDirectory() as folder:root=Path(folder);self.bundle(root,extra)with self.assertRaises(ValueError):verify_assets(root,"1.2.3")+ def test_beta_package_is_validated_without_publishing(self):+ with tempfile.TemporaryDirectory() as folder:+ root=Path(folder);self.bundle(root)+ for p in list(root.iterdir()):+ if p.name != "RUST-SHA256SUMS.txt":p.rename(root/p.name.replace("1.2.3","1.2.3-beta.1").replace("Rust-Setup", "Beta-Setup"))+ manifest=root/"RUST-SHA256SUMS.txt"+ manifest.write_text(manifest.read_text().replace("1.2.3","1.2.3-beta.1").replace("Rust-Setup", "Beta-Setup"))+ self.assertEqual(len(verify_assets(root,"1.2.3-beta.1")),3)def test_failed_stale_fork_and_wrong_workflow_cannot_publish(self):run={"status":"completed","conclusion":"success","head_branch":"main","head_sha":"abc","head_repository":{"full_name":"owner/repo"},"path":".github/workflows/native-windows.yml","event":"push"}authorize_run(run,"abc","owner/repo")diff --git a/native/src/app.rs b/native/src/app.rsindex 2bb72d5..e455135 100644--- a/native/src/app.rs+++ b/native/src/app.rs@@ -101,6 +101,7 @@ pub struct App {update_release: Option<crate::updates::Release>,update_installer: Option<PathBuf>,update_busy: bool,+ update_generation: u64,update_status: String,show_changelog: bool,watch_status: String,@@ -393,6 +394,7 @@ impl App {update_release: None,update_installer: None,update_busy: false,+ update_generation: 0,update_status: String::new(),show_changelog: false,watch_status: String::new(),@@ -692,6 +694,14 @@ impl App {match self.s.save(&self.home) {Ok(()) => {self.engine.control.update_settings(self.s.clone());+ if self.saved_settings.update_channel != self.s.update_channel {+ self.update_generation += 1;+ self.update_busy = false;+ self.update_release = None;+ self.update_installer = None;+ self.update_status =+ "Update channel saved. Check for updates to refresh.".into();+ }self.saved_settings = self.s.clone();self.read_aloud = self.s.tts_enabled && self.s.tts_auto;crate::platform::set_game_names(&self.s.game_processes);@@ -1212,13 +1222,16 @@ impl App {self.dirty = false;self.status = result.unwrap_or_else(|e| e);}- Event::Update(result) => {+ Event::Update(generation, result) => {+ if generation != self.update_generation {+ continue;+ }self.update_busy = false;match result {crate::updates::Update::Checked(Ok(Some(release))) => {self.update_status = format!("Version {} available", release.version);self.update_release = Some(release);- if self.s.auto_update && !crate::updates::portable() {+ if self.saved_settings.auto_update && !crate::updates::portable() {self.download_update();}}@@ -1718,13 +1731,22 @@ impl App {if self.update_busy {return;}+ if self.s.update_channel != self.saved_settings.update_channel {+ return;+ }self.update_busy = true;+ self.update_generation += 1;+ let generation = self.update_generation;+ let channel = self.saved_settings.update_channel.clone();self.update_status = "Checking GitHub releases…".into();let tx = self.engine.tx.clone();std::thread::spawn(move || {- let _ = tx.send(Event::Update(crate::updates::Update::Checked(- crate::updates::check().map_err(|e| e.to_string()),- )));+ let _ = tx.send(Event::Update(+ generation,+ crate::updates::Update::Checked(+ crate::updates::check(&channel).map_err(|e| e.to_string()),+ ),+ ));});}fn download_update(&mut self) {@@ -1733,13 +1755,18 @@ impl App {}if let Some(release) = self.update_release.clone() {self.update_busy = true;+ self.update_generation += 1;+ let generation = self.update_generation;self.update_status = "Downloading and verifying update…".into();let home = self.home.clone();let tx = self.engine.tx.clone();std::thread::spawn(move || {- let _ = tx.send(Event::Update(crate::updates::Update::Downloaded(- crate::updates::download(&release, &home).map_err(|e| e.to_string()),- )));+ let _ = tx.send(Event::Update(+ generation,+ crate::updates::Update::Downloaded(+ crate::updates::download(&release, &home).map_err(|e| e.to_string()),+ ),+ ));});}}@@ -5198,10 +5225,20 @@ impl App {ui.label("Developed with AI assistance; verify important results.");ui.separator();ui.heading("Updates");- ui.label(format!(- "Installed version: {} · Official Rust release",- env!("CARGO_PKG_VERSION")- ));+ ui.label(format!("Installed version: {}", env!("CARGO_PKG_VERSION")));+ ui.horizontal(|ui| {+ ui.label("Update channel");+ egui::ComboBox::from_id_salt("update-channel")+ .selected_text(&self.s.update_channel)+ .show_ui(ui, |ui| {+ ui.selectable_value(&mut self.s.update_channel, "Release".into(), "Release");+ ui.selectable_value(&mut self.s.update_channel, "Beta".into(), "Beta");+ });+ });+ ui.weak("Release: official releases only. Beta: official releases and pre-releases.");+ if self.s.update_channel != self.saved_settings.update_channel {+ ui.label("Save your update channel before checking for updates.");+ }ui.checkbox(&mut self.s.auto_check_updates,"Check for updates at startup",@@ -5220,7 +5257,11 @@ impl App {}ui.horizontal(|ui| {if ui- .add_enabled(!self.update_busy, egui::Button::new("Check for updates"))+ .add_enabled(+ !self.update_busy+ && self.s.update_channel == self.saved_settings.update_channel,+ egui::Button::new("Check for updates"),+ ).clicked(){self.check_update();@@ -5787,11 +5828,11 @@ impl eframe::App for App {if self.frames == 2&& self.smoke.is_none()- && (self.s.auto_check_updates || self.s.auto_update)+ && (self.saved_settings.auto_check_updates || self.saved_settings.auto_update){self.check_update();}- if self.s.auto_update+ if self.saved_settings.auto_update&& self.update_installer.is_some()&& !self.engine.control.running.load(Ordering::Relaxed)&& !self.setup_busydiff --git a/native/src/config.rs b/native/src/config.rsindex b7e7333..b8cb08a 100644--- a/native/src/config.rs+++ b/native/src/config.rs@@ -32,6 +32,7 @@ pub struct Settings {pub saved_searches: Vec<SavedSearch>,pub auto_check_updates: bool,pub auto_update: bool,+ pub update_channel: String,pub skip_windows_churn: bool,pub embedding_server: String,pub remote_model: String,@@ -170,6 +171,7 @@ impl Default for Settings {saved_searches: vec![],auto_check_updates: true,auto_update: false,+ update_channel: "Release".into(),skip_windows_churn: true,embedding_server: String::new(),remote_model: String::new(),diff --git a/native/src/engine.rs b/native/src/engine.rsindex 8333609..c49f211 100644--- a/native/src/engine.rs+++ b/native/src/engine.rs@@ -144,7 +144,7 @@ pub enum Event {ClipboardImage(i64, Result<Vec<u8>, String>),CaptureTargets(Result<Vec<crate::capture::Target>, String>),Screenshot(Result<Vec<u8>, String>),- Update(crate::updates::Update),+ Update(u64, crate::updates::Update),AiChunk(u64, String),RemoteCatalog(usize,diff --git a/native/src/updates.rs b/native/src/updates.rsindex 03ce692..066f8d4 100644--- a/native/src/updates.rs+++ b/native/src/updates.rs@@ -38,31 +38,32 @@ fn client() -> ureq::Agent {.into()}fn newer(a: &str, b: &str) -> bool {- fn parts(v: &str) -> Option<(u32, u32, u32)> {- let mut n = v.trim_start_matches('v').split(['.', '-']);- Some((- n.next()?.parse().ok()?,- n.next()?.parse().ok()?,- n.next()?.parse().ok()?,- ))- }- matches!((parts(a),parts(b)),(Some(a),Some(b)) if a>b)+ matches!((semver::Version::parse(a.trim_start_matches('v')), semver::Version::parse(b.trim_start_matches('v'))), (Ok(a), Ok(b)) if a > b)}-pub fn select(data: &Value, current: &str) -> Option<Release> {+pub fn select(data: &Value, current: &str, channel: &str) -> Option<Release> {let mut releases = Vec::new();for r in data.as_array()? {- if r["draft"].as_bool() == Some(true) {+ if r["draft"].as_bool() == Some(true)+ || channel != "Beta" && r["prerelease"].as_bool() == Some(true)+ {continue;}for asset in r["assets"].as_array().into_iter().flatten() {let name = asset["name"].as_str().unwrap_or("");- let Some(version) = name.strip_prefix("VectorDash-Rust-Setup-").and_then(|v| {- v.strip_suffix("-x64.exe")- .map(|v| v.strip_suffix("-preview").unwrap_or(v))- }) else {+ let Some(version) = name+ .strip_prefix("VectorDash-Rust-Setup-")+ .or_else(|| name.strip_prefix("VectorDash-Beta-Setup-"))+ .and_then(|v| {+ v.strip_suffix("-x64.exe")+ .map(|v| v.strip_suffix("-preview").unwrap_or(v))+ })+ else {continue;};- if !newer(version, current) {+ if !newer(version, current)+ || channel != "Beta"+ && semver::Version::parse(version).is_ok_and(|v| !v.pre.is_empty())+ {continue;}let url = asset["browser_download_url"].as_str().unwrap_or("");@@ -125,16 +126,15 @@ pub fn select(data: &Value, current: &str) -> Option<Release> {latest.changes = changes;Some(latest)}-pub fn check() -> Result<Option<Release>> {+pub fn check(channel: &str) -> Result<Option<Release>> {let mut releases = Vec::new();let mut page = 1;loop {let data:Value=client().get(format!("https://api.github.com/repos/ampersandru/VectorDash/releases?per_page=100&page={page}")).header("User-Agent","VectorDash").header("Accept","application/vnd.github+json").call()?.body_mut().read_json()?;let items = data.as_array().context("Invalid release response")?;let count = items.len();- let no_newer = select(&data, env!("CARGO_PKG_VERSION")).is_none();releases.extend(items.iter().cloned());- if count < 100 || no_newer {+ if count < 100 {break;}page += 1;@@ -143,7 +143,11 @@ pub fn check() -> Result<Option<Release>> {"Release history is too large; open GitHub for full history");}- Ok(select(&Value::Array(releases), env!("CARGO_PKG_VERSION")))+ Ok(select(+ &Value::Array(releases),+ env!("CARGO_PKG_VERSION"),+ channel,+ ))}pub fn download(release: &Release, home: &Path) -> Result<PathBuf> {anyhow::ensure!(@@ -211,11 +215,11 @@ mod tests {#[test]fn picks_native_only_and_requires_verified_digest() {let data = serde_json::json!([{"assets":[{"name":"VectorDash-Setup-9.0.0.exe"}]},{"html_url":"https://github.com/ampersandru/VectorDash/releases/tag/v0.3.4-preview.1","assets":[{"name":"VectorDash-Rust-Setup-0.3.4-preview-x64.exe","size":100,"digest":format!("sha256:{}","a".repeat(64)),"browser_download_url":"https://github.com/ampersandru/VectorDash/releases/download/v0.3.4-preview.1/setup.exe"}]}]);- assert_eq!(select(&data, "0.3.3").unwrap().version, "0.3.4");- assert!(select(&data, "0.3.4").is_none());+ assert_eq!(select(&data, "0.3.3", "Release").unwrap().version, "0.3.4");+ assert!(select(&data, "0.3.4", "Release").is_none());let mut unsafe_data = data.clone();unsafe_data[1]["assets"][0]["digest"] = Value::Null;- assert!(select(&unsafe_data, "0.3.3").is_none());+ assert!(select(&unsafe_data, "0.3.3", "Release").is_none());}#[test]fn versions_numeric() {@@ -284,7 +288,8 @@ mod integrity_tests {.body_mut().read_json().unwrap();- let release = select(&data, "0.0.0").expect("Published native release with SHA-256 digest");+ let release = select(&data, "0.0.0", "Release")+ .expect("Published native release with SHA-256 digest");let home = tempfile::tempdir().unwrap();let path = download(&release, home.path()).unwrap();verify(&path, &release).unwrap();@@ -300,7 +305,7 @@ mod changelog_tests {#[test]fn includes_each_newer_native_release_newest_first() {let releases=serde_json::Value::Array(["0.3.4","0.3.6","0.3.5"].iter().map(|version|serde_json::json!({"name":format!("Version {version}"),"published_at":"2026-10-12T00:00:00Z","body":format!("Changes for {version}"),"assets":[{"name":format!("VectorDash-Rust-Setup-{version}-preview-x64.exe"),"size":100,"digest":format!("sha256:{}","a".repeat(64)),"browser_download_url":format!("https://github.com/ampersandru/VectorDash/releases/download/v{version}/setup.exe")}]})).collect());- let release = select(&releases, "0.3.4").unwrap();+ let release = select(&releases, "0.3.4", "Release").unwrap();assert_eq!(release.version, "0.3.6");assert_eq!(release@@ -313,3 +318,82 @@ mod changelog_tests {assert_eq!(release.changes[1].body, "Changes for 0.3.5");}}++#[cfg(test)]+mod channel_tests {+ use super::*;+ fn release(version: &str, prerelease: bool, draft: bool) -> Value {+ serde_json::json!({"prerelease":prerelease,"draft":draft,"assets":[{"name":format!("VectorDash-Rust-Setup-{version}-x64.exe"),"size":100,"digest":format!("sha256:{}", "a".repeat(64)),"browser_download_url":format!("https://github.com/ampersandru/VectorDash/releases/download/v{version}/setup.exe")}]})+ }+ #[test]+ fn release_excludes_betas_and_beta_includes_both() {+ let data = serde_json::json!([+ release("1.0.1", false, false),+ release("1.1.0-beta.2", true, false),+ release("2.0.0-beta.1", true, true)+ ]);+ assert_eq!(select(&data, "1.0.0", "Release").unwrap().version, "1.0.1");+ assert_eq!(+ select(&data, "1.0.0", "Beta").unwrap().version,+ "1.1.0-beta.2"+ );+ assert_eq!(select(&data, "1.0.0", "unknown").unwrap().version, "1.0.1");+ let named_beta = serde_json::json!([{+ "prerelease":true,"assets":[{"name":"VectorDash-Beta-Setup-1.2.0-beta.1-x64.exe","size":100,"digest":format!("sha256:{}", "a".repeat(64)),"browser_download_url":"https://github.com/ampersandru/VectorDash/releases/download/v1.2.0-beta.1/setup.exe"}]+ }]);+ assert_eq!(+ select(&named_beta, "1.0.0", "Beta").unwrap().version,+ "1.2.0-beta.1"+ );+ assert!(select(&named_beta, "1.0.0", "Release").is_none());+ let mislabeled = serde_json::json!([release("2.0.0-beta.1", false, false)]);+ assert!(select(&mislabeled, "1.0.0", "Release").is_none());+ }+ #[test]+ fn beta_numbers_and_final_release_have_semantic_ordering() {+ assert!(newer("1.1.0-beta.10", "1.1.0-beta.2"));+ assert!(newer("1.1.0", "1.1.0-beta.10"));+ assert!(!newer("1.1.0-beta.1", "1.1.0"));+ assert!(!newer("nonsense", "1.0.0"));+ let data = serde_json::json!([+ release("1.1.0-beta.2", true, false),+ release("1.1.0-beta.10", true, false)+ ]);+ assert_eq!(+ select(&data, "1.1.0-beta.1", "Beta").unwrap().version,+ "1.1.0-beta.10"+ );+ assert!(select(&data, "1.1.0-beta.10", "Beta").is_none());+ let stable = serde_json::json!([release("1.1.0", false, false)]);+ assert_eq!(+ select(&stable, "1.1.0-beta.10", "Release").unwrap().version,+ "1.1.0"+ );+ }+ #[test]+ fn beta_changelog_includes_only_versions_newer_than_installed() {+ let data = serde_json::json!([+ release("1.0.0", false, false),+ release("1.1.0-beta.1", true, false),+ release("1.1.0-beta.2", true, false)+ ]);+ let result = select(&data, "1.1.0-beta.1", "Beta").unwrap();+ assert_eq!(result.changes.len(), 1);+ assert_eq!(result.changes[0].version, "1.1.0-beta.2");+ }+ #[test]+ fn legacy_settings_default_to_release_and_choice_survives_saving() {+ let home = tempfile::tempdir().unwrap();+ std::fs::write(home.path().join("settings.json"), "{}").unwrap();+ let mut settings = crate::config::Settings::load(home.path()).unwrap();+ assert_eq!(settings.update_channel, "Release");+ settings.update_channel = "Beta".into();+ settings.save(home.path()).unwrap();+ assert_eq!(+ crate::config::Settings::load(home.path())+ .unwrap()+ .update_channel,+ "Beta"+ );+ }+}diff --git a/packaging/VectorDash-Rust.iss b/packaging/VectorDash-Rust.issindex f0870fb..0141eb1 100644--- a/packaging/VectorDash-Rust.iss+++ b/packaging/VectorDash-Rust.iss@@ -3,7 +3,8 @@ AppId={{C6AC1B4D-A119-4D73-B2C8-6C507DEFE923}AppName=VectorDashAppVerName=VectorDashUninstallDisplayName=VectorDash-AppVersion=0.3.24+AppVersion=0.3.25-beta.1+VersionInfoVersion=0.3.25.0AppPublisher=VectorDash contributorsAppPublisherURL=https://github.com/ampersandru/VectorDashDefaultDirName={localappdata}\Programs\VectorDash@@ -13,7 +14,7 @@ ArchitecturesAllowed=x64compatibleArchitecturesInstallIn64BitMode=x64compatibleMinVersion=10.0.22000OutputDir=..\dist\installer-OutputBaseFilename=VectorDash-Rust-Setup-0.3.24-x64+OutputBaseFilename=VectorDash-Beta-Setup-0.3.25-beta.1-x64SetupIconFile=VectorDash.icoUninstallDisplayIcon={app}\VectorDash.exeLicenseFile=..\LICENSE