Milestone 6: canvas for health and leaving

Devices report freshness per vault every 30 s (counts only); the canvas
shows current / behind / offline, held secrets in red, and a Nudge that
reaches the device at its next check-in. Notes kept in two versions can
be compared side by side and tidied on the hub's copy. Handovers are
reviewed in the vault panel; people can be removed from the team and
restored with a one-time link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 09:47:28 +07:00
parent 193cb06f85
commit 8be559817c
15 changed files with 744 additions and 57 deletions

View File

@@ -95,11 +95,18 @@ pub fn run(cfg: &VaultConfig, label: &str, poll: Duration, timing: Timing, log:
let mut was_read_only = false;
let mut announced: HashSet<String> = HashSet::new();
let leaving = state::lune_dir(&vault.git_dir).join("leaving");
let nudge = state::lune_dir(&vault.git_dir).join("nudge");
loop {
if leaving.exists() {
say("access to this vault ended — stopped syncing it");
return Ok(());
}
if nudge.exists() {
// Nudged from the canvas: save what has settled and share right away.
let _ = std::fs::remove_file(&nudge);
rescan_at = Instant::now();
sync_at = Instant::now();
}
let first = rx.recv_timeout(Duration::from_millis(250));
for ev in first.into_iter().chain(rx.try_iter()) {
match ev {