fix(calls): no "the shared window was closed" toast when an admin turns sharing off (#297) #398

Merged
jared merged 1 commits from fix/screenshare-double-toast into lotus 2026-10-18 04:23:19 -04:00
Owner

Fixes #297.

When a room admin turns off Allow Screen Sharing mid-share, the sharer got two toasts:

  1. "Screen sharing was turned off by a room admin." (useCallPolicyRevokedToast): correct.
  2. "Screen sharing stopped — the shared window was closed." (the fork's io.lotus.screenshare_notice {kind: "ended"}): wrong.

Change: useScreenshareNotices skips the ended notice while the room policy forbids screen sharing (useRoomCallPolicy). It's read through a ref, so it doesn't matter which message arrives first. Other notice kinds (no-frames, alone) are unchanged.

Verified (in a call in the Voice Lounge: set io.lotus.room_quality.allow_screenshare = false, then had the call frame send the fork's ended notice):

  • Before: the "window was closed" toast was shown.
  • After: not shown.

Unit test for the rule. tsc clean · ESLint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #297. When a room admin turns off **Allow Screen Sharing** mid-share, the sharer got two toasts: 1. "Screen sharing was turned off by a room admin." (`useCallPolicyRevokedToast`): correct. 2. "Screen sharing stopped — the shared window was closed." (the fork's `io.lotus.screenshare_notice {kind: "ended"}`): wrong. **Change:** `useScreenshareNotices` skips the `ended` notice while the room policy forbids screen sharing (`useRoomCallPolicy`). It's read through a ref, so it doesn't matter which message arrives first. Other notice kinds (`no-frames`, `alone`) are unchanged. **Verified** (in a call in the Voice Lounge: set `io.lotus.room_quality.allow_screenshare = false`, then had the call frame send the fork's `ended` notice): - **Before:** the "window was closed" toast was shown. - **After:** not shown. Unit test for the rule. `tsc` clean · ESLint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-17 20:55:09 -04:00
fix(calls): no "the shared window was closed" toast when an admin turns sharing off (#297)
CI / Build & Quality Checks (pull_request) Successful in 3m3s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 11s
CI / Playwright smoke (e2e) (pull_request) Successful in 16m14s
7fc42b32d4
When a room admin turned off Allow Screen Sharing, the sharer got two
toasts: the correct "turned off by a room admin" and the fork's
"ended" notice, "the shared window was closed", which was wrong. Skip
the ended notice while the room policy forbids sharing.

Fixes #297

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 397eb7da81 into lotus 2026-10-18 04:23:19 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#398