When a room admin turns off screen sharing, the sharer gets two contradictory toasts #297

Open
opened 2026-10-04 21:03:51 -04:00 by jared · 1 comment
Owner

What happens (two browsers, local LiveKit): Bob is sharing his screen; the room admin turns off Allow Screen Sharing. Bob's share stops correctly, and he gets two toasts at once (screenshot):

  1. "Screen share — Screen sharing stopped — the shared window was closed." This is the fork's io.lotus.screenshare_notice {kind:"ended"}, shown by useScreenshareNotices.
  2. "Screen sharing was turned off by a room admin." This one comes from useCallPolicyRevokedToast (#223).

The first is wrong: no window was closed.

Fix: when the host stops the share because of the policy, suppress the fork's ended notice that follows within a few seconds. Alternatively, have the fork tell a host-requested stop (io.lotus.set_screenshare {on:false}) apart from the track ending on its own, and send ended only for the latter (element-call src/lotus/lotusScreenshareWatch.ts).

Screenshot

F47-double-toast.png


Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny 30e2dbcd, cinny-desktop 8f67ec7, element-call 3b0050e8.

**What happens** (two browsers, local LiveKit): Bob is sharing his screen; the room admin turns off **Allow Screen Sharing**. Bob's share stops correctly, and he gets **two** toasts at once (screenshot): 1. "Screen share — Screen sharing stopped — **the shared window was closed.**" This is the fork's `io.lotus.screenshare_notice {kind:"ended"}`, shown by `useScreenshareNotices`. 2. "Screen sharing was turned off by a room admin." This one comes from `useCallPolicyRevokedToast` (#223). The first is wrong: no window was closed. **Fix:** when the host stops the share because of the policy, suppress the fork's `ended` notice that follows within a few seconds. Alternatively, have the fork tell a host-requested stop (`io.lotus.set_screenshare {on:false}`) apart from the track ending on its own, and send `ended` only for the latter (element-call `src/lotus/lotusScreenshareWatch.ts`). **Screenshot** ![F47-double-toast.png](https://code.lotusguild.org/attachments/f31b572d-d397-4a12-9750-9919bd548150) --- _Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny `30e2dbcd`, cinny-desktop `8f67ec7`, element-call `3b0050e8`._
jared added the priority: lowuxarea: calls labels 2026-10-04 21:03:51 -04:00
Author
Owner

Same double-toast when the share ends outside the app (the shared window closes, or the browser's own "Stop sharing" bar is used; simulated by ending the display track in the frame). Lotus shows both "You stopped sharing your screen" and the fork's screenshare_notice toast "Screen sharing stopped — the shared window was closed." The first is wrong in this case, since the user didn't stop it. Suppress the generic "You stopped sharing" when a screenshare_notice with kind: ended arrives within ~2 s, as suggested for the policy case.

Same double-toast when the share ends **outside** the app (the shared window closes, or the browser's own "Stop sharing" bar is used; simulated by ending the display track in the frame). Lotus shows both **"You stopped sharing your screen"** and the fork's `screenshare_notice` toast **"Screen sharing stopped — the shared window was closed."** The first is wrong in this case, since the user didn't stop it. Suppress the generic "You stopped sharing" when a `screenshare_notice` with `kind: ended` arrives within ~2 s, as suggested for the policy case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#297