While someone is screensharing, the spotlight's back/forward arrows and dots now cover cameras too:
All screenshares, first, as before.
The host-pinned camera, if there is one. It's in the same place as before and still shown with its video off.
Every other remote camera that is on, in join order, so the dots don't reshuffle.
Each camera appears once. Your own camera is left out because the PiP and the grid already show it. With no screenshare nothing changes: the spotlight follows the active speaker as upstream does.
Default view and fallback: when a share starts, the view goes to the share. If the camera you're viewing turns off or its owner leaves, the view goes back to the first share.
How
src/lotus/lotusSpotlight.ts: new pure spotlightCameras(), plus a live set of which remote cameras are on, used in the share branch of overrideSpotlight$. PiP logic (#29) is unchanged. CallViewModel is untouched.
src/lotus/lotusSpotlightView.ts (new): the useLotusSpotlightFallback hook. It sets visibleId directly as well as scrolling, because the tile's IntersectionObserver doesn't fire when the target is already in view. That would otherwise leave the arrows and dots pointed at an item that's gone.
src/tile/SpotlightTile.tsx: a 3-line hook call, and data-kind on the dots. The screenshare-indicator test id is kept so the upstream Playwright test and future rebases still match.
playwright/widget/screen-share.test.ts: counts updated (cameras are on in that test). Our Gitea CI doesn't run Playwright, so this hasn't been run.
Tests
New unit tests for spotlightCameras (order, pin once, pin with video off, own camera left out), for live camera on/off and leave, for the no-share path being unchanged, and for the fallback logic.
A SpotlightTile test: flip to a camera, the camera goes away, the view lands back on the share. Checked that it fails with the hook disabled.
Local runs: src/lotus and src/tile 185/185 passing; tsc, oxlint, knip and oxfmt all clean. The full local suite has the same 111 failures as untouched lotus; all come from local Node 20 lacking Promise.withResolvers.
Still to check live
Adaptive stream should pause video for cameras scrolled out of view in the carousel. The check is chrome://webrtc-internals while viewing the share.
Closes #67.
## What changes
While someone is screensharing, the spotlight's back/forward arrows and dots now cover cameras too:
1. All screenshares, first, as before.
2. The host-pinned camera, if there is one. It's in the same place as before and still shown with its video off.
3. Every other **remote** camera that is on, in join order, so the dots don't reshuffle.
Each camera appears once. Your own camera is left out because the PiP and the grid already show it. With no screenshare nothing changes: the spotlight follows the active speaker as upstream does.
**Default view and fallback:** when a share starts, the view goes to the share. If the camera you're viewing turns off or its owner leaves, the view goes back to the first share.
## How
- `src/lotus/lotusSpotlight.ts`: new pure `spotlightCameras()`, plus a live set of which remote cameras are on, used in the share branch of `overrideSpotlight$`. PiP logic (#29) is unchanged. `CallViewModel` is untouched.
- `src/lotus/lotusSpotlightView.ts` (new): the `useLotusSpotlightFallback` hook. It sets `visibleId` directly as well as scrolling, because the tile's IntersectionObserver doesn't fire when the target is already in view. That would otherwise leave the arrows and dots pointed at an item that's gone.
- `src/tile/SpotlightTile.tsx`: a 3-line hook call, and `data-kind` on the dots. The `screenshare-indicator` test id is kept so the upstream Playwright test and future rebases still match.
- `playwright/widget/screen-share.test.ts`: counts updated (cameras are on in that test). Our Gitea CI doesn't run Playwright, so this hasn't been run.
## Tests
- New unit tests for `spotlightCameras` (order, pin once, pin with video off, own camera left out), for live camera on/off and leave, for the no-share path being unchanged, and for the fallback logic.
- A `SpotlightTile` test: flip to a camera, the camera goes away, the view lands back on the share. Checked that it fails with the hook disabled.
- Local runs: `src/lotus` and `src/tile` 185/185 passing; `tsc`, oxlint, knip and oxfmt all clean. The full local suite has the same 111 failures as untouched `lotus`; all come from local Node 20 lacking `Promise.withResolvers`.
## Still to check live
Adaptive stream should pause video for cameras scrolled out of view in the carousel. The check is `chrome://webrtc-internals` while viewing the share.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
During a screenshare the spotlight carousel now holds the shares first,
then the host-pinned camera (as before), then every other remote camera
that is on, in join order. Viewers use the same arrows/dots as between
shares. With no share nothing changes (upstream speaker-follows).
SpotlightTile gets a small lotus hook that keeps the share as the
default view when a share starts and falls back to the first item when
the visible camera turns off or its owner leaves (the IntersectionObserver
alone leaves visibleId stale when the target is already in view).
Indicator dots get data-kind so tests can tell shares from cameras.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared
scheduled this pull request to auto merge when all checks succeed 2026-11-09 01:06:29 -05:00
jared
merged commit f793523e03 into lotus2026-11-09 01:10:34 -05:00
jared
deleted branch feat/spotlight-cameras2026-11-09 01:10:39 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #67.
What changes
While someone is screensharing, the spotlight's back/forward arrows and dots now cover cameras too:
Each camera appears once. Your own camera is left out because the PiP and the grid already show it. With no screenshare nothing changes: the spotlight follows the active speaker as upstream does.
Default view and fallback: when a share starts, the view goes to the share. If the camera you're viewing turns off or its owner leaves, the view goes back to the first share.
How
src/lotus/lotusSpotlight.ts: new purespotlightCameras(), plus a live set of which remote cameras are on, used in the share branch ofoverrideSpotlight$. PiP logic (#29) is unchanged.CallViewModelis untouched.src/lotus/lotusSpotlightView.ts(new): theuseLotusSpotlightFallbackhook. It setsvisibleIddirectly as well as scrolling, because the tile's IntersectionObserver doesn't fire when the target is already in view. That would otherwise leave the arrows and dots pointed at an item that's gone.src/tile/SpotlightTile.tsx: a 3-line hook call, anddata-kindon the dots. Thescreenshare-indicatortest id is kept so the upstream Playwright test and future rebases still match.playwright/widget/screen-share.test.ts: counts updated (cameras are on in that test). Our Gitea CI doesn't run Playwright, so this hasn't been run.Tests
spotlightCameras(order, pin once, pin with video off, own camera left out), for live camera on/off and leave, for the no-share path being unchanged, and for the fallback logic.SpotlightTiletest: flip to a camera, the camera goes away, the view lands back on the share. Checked that it fails with the hook disabled.src/lotusandsrc/tile185/185 passing;tsc, oxlint, knip and oxfmt all clean. The full local suite has the same 111 failures as untouchedlotus; all come from local Node 20 lackingPromise.withResolvers.Still to check live
Adaptive stream should pause video for cameras scrolled out of view in the carousel. The check is
chrome://webrtc-internalswhile viewing the share.🤖 Generated with Claude Code
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA