From da3f097b64c8d21c70ab49aa503cf73f22dda4d3 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Wed, 3 Jun 2026 14:43:52 -0400 Subject: [PATCH] =?UTF-8?q?zebra-report:=20deploy=20=E2=80=94=20preserve?= =?UTF-8?q?=20mute=20across=20leave+rejoin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zebra-report/zebra-spaces.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/zebra-report/zebra-spaces.html b/zebra-report/zebra-spaces.html index 62db2e4..3ccdc65 100644 --- a/zebra-report/zebra-spaces.html +++ b/zebra-report/zebra-spaces.html @@ -4106,8 +4106,13 @@ $('btn-leave').addEventListener('click', async () => { $('btn-enter').disabled = false; $('btn-leave').disabled = true; $('btn-mute').disabled = true; - $('btn-mute').textContent = 'mute'; $('btn-mute').className=''; muted = false; - try { sessionStorage.removeItem(MUTE_STATE_KEY); } catch(_){} + $('btn-mute').textContent = 'mute'; $('btn-mute').className=''; + /* Preserve the user's last mute choice across leave+rejoin — + * fox: 'when I leave and rejoin the mic state is unmuted'. Don't + * touch MUTE_STATE_KEY here; the next promotion / bless-reclaim + * reads it back via applyMuteState. The local `muted` variable + * still resets so the in-page UI is clean while disconnected. */ + muted = (function(){ try { return sessionStorage.getItem(MUTE_STATE_KEY) === '1'; } catch(_){ return false; } })(); logLine('', 'left the space'); }); @@ -4117,8 +4122,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');