zebra-spaces: hide rendezvous-code + enter button while joined (over-the-shoulder privacy)

Fox 2026-06-04: 'on join the space name and enter button should be
hidden it should only show when disconnected. this prevents people
without the password or link to be able to see it on the screen.'

The rendezvous code is the join secret — anyone reading it off the
host's screen can join the space (or rejoin under a fresh identity
to bypass moderation).

Added id="row-entry" to the existing entry row, then hide it in the
'welcome' case (alongside the existing reveal of sec-room), and
restore it on:
- leave (btn-leave click → cleanup block)
- handleBlocked (banned / signal block)
- peer-booted (self) — so a kicked listener can read the code to
  manually re-enter

Same hidden-utility pattern as the mute/leave buttons. No FSM yet
for the entry-row visibility — its only state is "joined? yes/no",
which is already captured by the call FSM. Future cleanup could
hang the toggle off a callState observer rather than scattered
classList writes.
This commit is contained in:
Russell Ballestrini 2026-06-04 13:12:08 -04:00
parent f4dbc5cc6c
commit 1449f40954
No known key found for this signature in database

View file

@ -707,7 +707,7 @@ try {
<section id="sec-call">
<h2>space</h2>
<div class="row">
<div class="row" id="row-entry">
<input type="text" id="rdv-code" placeholder="rendezvous code — same string for everyone in the space">
<button id="btn-enter" class="invert">enter</button>
</div>
@ -3766,6 +3766,11 @@ async function handleSignal(raw){
$('btn-leave').classList.remove('hidden');
$('btn-mute').classList.remove('hidden');
$('sec-room').classList.remove('hidden');
/* Hide the rendezvous code + enter button once joined — fox
* 2026-06-04: "prevents people without the password or link
* from being able to see it on the screen" (over-the-shoulder
* privacy). The row reappears on leave / kick / WS-tear. */
$('row-entry').classList.add('hidden');
/* remember which space this tab is in so a hard refresh auto-rejoins.
* sessionStorage is per-tab so tab A in space X + tab B in space Y
* stay independent and clear cleanly on tab close. */
@ -4087,6 +4092,9 @@ async function handleSignal(raw){
$('btn-mute').classList.add('hidden');
$('btn-mute').disabled = true;
$('btn-enter').disabled = false;
/* Bring the entry row back so the kicked user can re-enter
* a different (or same) rendezvous code manually. */
$('row-entry').classList.remove('hidden');
}
/* Authoritative tile teardown by pubkey — booted users can't be
* publishing anything anymore by definition. The SFU side eviction
@ -5168,6 +5176,8 @@ function handleBlocked(source){
$('btn-leave').classList.add('hidden');
$('btn-mute').classList.add('hidden');
$('btn-enter').disabled = false;
/* re-expose the entry row so the user can read it / type a new code */
$('row-entry').classList.remove('hidden');
}
$('btn-accept-mic').addEventListener('click', () => {
@ -5526,6 +5536,8 @@ $('btn-leave').addEventListener('click', async () => {
$('sec-share').classList.add('hidden');
$('sec-screen-share').classList.add('hidden');
$('sec-spotlight').classList.add('hidden');
/* bring the rendezvous-code + enter row back when leaving */
$('row-entry').classList.remove('hidden');
spotlight = null;
roomMachines.call.send('DONE');
hideNotice();
@ -5552,8 +5564,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');
<footer style="margin:2.2rem auto 0;font-size:0.65rem;color:#999;line-height:1.7;word-break:break-all;font-family:monospace">
<span id="pi-seal" style="color:#777;cursor:default;user-select:none" title="">page integrity</span> &nbsp;·&nbsp; built <span class="stamp-date">2026-06-04</span><br>
md5 <span class="stamp-md5">12a9280b3fcf75a793ad9b6a1b0ebcd1</span><br>
sha256 <span class="stamp-sha">1562148740ec1d0ca0211574d03f5670757f86c663abd98aee47f951eddc3c48</span><br>
md5 <span class="stamp-md5">5b381f795d544a2b593dd2b27ff065b8</span><br>
sha256 <span class="stamp-sha">ff9598d4a1588c76c01fae4fef3333a38b7af8ddd092239af234e7dc54bffe11</span><br>
<span style="color:#bbb">hashes are of this page with these two fields zeroed — to verify, blank them and re-hash</span><br>
<span style="color:#bbb">one self-contained file — <strong>save a copy</strong> and verify against these hashes; point at your own servers with ?signal= and ?turncred=, or <a href="host-your-own.html" style="color:#999">host your own community</a></span>
</footer>