Enhance Activity Based Tile Prioritization
Overview & Context
Extend the participant activity-swapping logic in useCinemaViewParticipantsOrdering so that camera activation counts as activity (alongside speaking) and apply the same ordering to the SpeakerView ThumbsRow, not just the cinema GridView. Goal: a participant who turns their camera on should float into the visible tiles/strip the same way a speaking participant does.
Technical Design & Interfaces
- Activity score:
max(joinedAt, lastSpokeAt, cameraActivationAt)— most recent wins; smaller = longer inactive = displacement target. cameraActivationAt: timestamp captured when a participant is first seen with camera on; preserved across renders, reset only after a camera off→on toggle.unbounded: true→ ThumbsRow strip (activity-first sort); default → grid (in-place page-1 swaps).
Implementation Notes
- Strip (ThumbsRow) should sort by activity rather than swap-in-place, since a single swap could land outside the visible scroll window.
- Grid keeps stable tiles by only swapping onto page 1, gated by a score comparison to avoid downgrading a more-active slot and to prevent cross-render oscillation.
Implementation Tasks
- Include
cameraActivationAtin the activity score used for swapping. - Persist camera-activation timestamps across renders; refresh only on off→on toggle.
- Apply the activity ordering to ThumbsRow via
unboundedstrip mode. - Ensure camera-on participants on later grid pages are promoted onto page 1.
- Unit tests for camera-driven promotion in both grid and strip modes.
Definition of Done (DoD)
- Code passes linting and type checks.
- Manual verification successful (Tested on Chrome/Firefox).
- No regressions caused to the core video/audio stream pipeline.
- Add unit tests.
- Add release label after merge.