From 73ad8e4eb566fe682107fa7e50ef624591199e99 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Tue, 15 Sep 2026 02:16:39 +0200 Subject: feat(hub): session lifetime is an admin setting, and a browser signs out when idle Browser idle sign-out (media playback counts as activity; not the desktop app), refresh idle window and maximum session length, in hours. Sign-out now revokes on the hub, and the profile has "sign out everywhere". Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01XuNrwLf5EFWCMHzfoEvnpm --- .../meshbay-hub/src/meshbay_hub/static/idle.js | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 packages/meshbay-hub/src/meshbay_hub/static/idle.js (limited to 'packages/meshbay-hub/src/meshbay_hub/static/idle.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/idle.js b/packages/meshbay-hub/src/meshbay_hub/static/idle.js new file mode 100644 index 0000000..e24f758 --- /dev/null +++ b/packages/meshbay-hub/src/meshbay_hub/static/idle.js @@ -0,0 +1,77 @@ +// Signing a browser out after a stretch with nobody at it. +// +// The hub cannot measure this. It hears a token renewal every few hours from +// any open tab, attended or not, and nothing at all while a film plays over +// WebRTC. So the page decides, and the hub only says how long +// (`browser_idle_hours` in /v1/hub/info). +// +// Activity is input, or any