Milestone 7: the app normal people install (macOS)
A Tauri menu-bar app runs the same sync engine as `lunesync run`. It connects from the website with no code typed (lune://join and lune://pair links), shows status in the menu bar, and lets a person resolve held secrets, held big changes and kept-both notes side by side. Uninstall shares and hands over first, then removes only what Lune created. Releases are signed on the hub that holds the key (`lunehub release keygen/publish`); other hubs `release import` them. Apps verify the signature and the signed version. Clients older than the previous release are asked to update and keep saving locally. A device can now be on several hubs at once (own and workplace), each with its own key; the CLI takes --team when it matters. The supervisor and status summary moved into core, shared by the CLI and the app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ use anyhow::{Result, bail};
|
||||
use notify::{EventKind, RecursiveMode, Watcher};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::path::Path;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::mpsc;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
@@ -71,6 +72,9 @@ impl Burst {
|
||||
|
||||
pub type Log<'a> = &'a (dyn Fn(&str, &str) + Sync);
|
||||
|
||||
/// Set to stop every runner in this process (the desktop app uninstalling); each lets go of its vault.
|
||||
pub static STOP: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
/// Runs forever for one vault. `log(vault, message)` prints progress.
|
||||
pub fn run(cfg: &VaultConfig, label: &str, poll: Duration, timing: Timing, log: Log) -> Result<()> {
|
||||
let vault = Vault::open(cfg, label)?;
|
||||
@@ -101,6 +105,9 @@ pub fn run(cfg: &VaultConfig, label: &str, poll: Duration, timing: Timing, log:
|
||||
say("access to this vault ended — stopped syncing it");
|
||||
return Ok(());
|
||||
}
|
||||
if STOP.load(Ordering::Relaxed) {
|
||||
return Ok(());
|
||||
}
|
||||
if nudge.exists() {
|
||||
// Nudged from the canvas: save what has settled and share right away.
|
||||
let _ = std::fs::remove_file(&nudge);
|
||||
|
||||
Reference in New Issue
Block a user