From 45c4dbe120ffc6366c2da2ed1a63e6698a22253f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 23:10:12 +0000 Subject: [PATCH] Family board: look for new chores every 15 seconds instead of every minute Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01UaC9HmtHMdRP8dAbN4wAKj --- public/board.js | 2 +- public/sw.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/board.js b/public/board.js index f2faa56..2c4fa27 100644 --- a/public/board.js +++ b/public/board.js @@ -49,7 +49,7 @@ function pick(p) { paint(); $('#no').onclick = close; box.querySelectorAll('.pad button').forEach(b => b.onclick = async () => { let k = b.dataset.k; $('#e').textContent = ''; if (k === '⌫') pin = pin.slice(0, -1); else if (k !== '✓' && pin.length < 8) { pin += k; if (p.pinLen && pin.length === p.pinLen) k = '✓'; } if (k === '✓') { try { await go(pin); return; } catch (e) { $('#e').textContent = e.message; pin = ''; } } paint(); }); } -clock(); setInterval(clock, 15000); load(); setInterval(() => { if (!document.hidden && $('#ov').hidden) load(); }, 60000); +clock(); setInterval(clock, 15000); load(); setInterval(() => { if (!document.hidden && $('#ov').hidden) load(); }, 15000); // (a chore someone just added shows up within a few seconds) document.addEventListener('visibilitychange', () => { if (!document.hidden) load(); }); // ---- tap a chore: (if it is up for grabs, choose what you are doing), pick your name, PIN if you are not a child, then it happens as you diff --git a/public/sw.js b/public/sw.js index e0eb9a2..e3071bd 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,5 +1,5 @@ // App-shell cache only; Seafile/API traffic always goes to the network. -const CACHE = 'hub-v135'; +const CACHE = 'hub-v136'; const KEEP = /^hub-(offline|share|who|data-)/; // caches that outlive a new version const SHARE = 'hub-share'; // files shared into the app from other apps, held until the person picks a folder const SHELL = ['/icon.svg', '/manifest.webmanifest', '/icons/icon-192.png', '/icons/apple-touch-icon.png'];