Skip to content

feat(screenshare): answering the question that gets asked in every meeting - can you see my screen - #217

Merged
ravindra-cloudflare merged 4 commits into
stagingfrom
feat/can-you-see-my-screen
Nov 26, 2026
Merged

ravindra-cloudflare merged 4 commits into
stagingfrom
feat/can-you-see-my-screen

Conversation

@ravindra-cloudflare

Copy link
Copy Markdown
Collaborator

Description

  1. Added Skills to make development faster and reliable.
  2. Answering the question that gets asked in every meeting- "Can you see my screen?". Now a screen-sharer doesn't have to ask this from others. They can see it themselves. Border (with animation & colors) and the text inside screenshare view lets the screen-sharer know the current state.

No one is viewing
image

Everyone is viewing
image

Only some are viewing
image

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of 95a68ca1.

This review, of 272e221e

💬 Approved with comments — No blocking or warning-level problems. Four INFO notes: visibility reports trust the viewerId in the payload, viewer list rebuilds scale with meeting size, one tsconfig exclude matches no files, and a table header in a skill file is duplicated.

Findings: 4 info (4 are inline comments on the diff)

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


🔒 Security: 💬 1 info

Low impact: the viewer identity in visibility reports comes from the payload, not from the message sender.

Recommendation: 💬 Optional Nits

  • [INFO] Visibility reports trust payload.viewerId instead of the message sender, so one participant can mark another as viewing (packages/core/src/components/rtk-screenshare-view/rtk-screenshare-view.tsx:191)
View full review
  • rtk-screenshare-view.tsx:191-211: handleScreenShareVisibilityNotification reads viewerId from the broadcast payload. It checks the id against trackedViewerIds, but never against the participant who actually sent the message. Any participant who knows the producerId can mark another participant as viewing or not viewing. The only effect is a wrong indicator on the sharer's screen; no data is exposed.

📋 Code Quality: 💬 1 info

One harmless tsconfig exclude that matches no files.

Recommendation: 💬 Optional Nits

  • [INFO] src/**/*.test.js exclude in packages/core/tsconfig.json matches no files (packages/core/tsconfig.json:22)
View full review
  • packages/core/tsconfig.json:22: the new src/**/*.test.js exclude matches no files. The new test is scripts/screenshare-visibility.test.js, which is outside src.

⚡ Performance: 💬 1 info

The sharer's viewer bookkeeping rebuilds arrays on every event, which only matters in very large meetings.

Recommendation: 💬 Optional Nits

  • [INFO] Viewer lists are rebuilt as O(n) arrays on every join, leave and visibility message (packages/core/src/components/rtk-screenshare-view/rtk-screenshare-view.tsx:138)
View full review
  • The sharer rebuilds trackedViewerIds and notActivelySeenBy on every participant join or leave and on every visibility message. When a share starts, each of the n viewers sends one message, so the total work is O(n²) plus n re-renders. That is negligible at typical meeting sizes. If large meetings matter, keep the viewer ids in a Set and batch the updates.

📝 Documentation: 💬 1 info

Duplicated table header in the test setup skill.

Recommendation: 💬 Optional Nits

  • [INFO] Duplicated Goal | Command header in the commands table (.opencode/skills/realtimekit-test-setup/SKILL.md:23)
View full review
  • .opencode/skills/realtimekit-test-setup/SKILL.md:23-24 repeats the table header and separator.

✅ All other checks passed

📖 AGENTS.md: ✅ LGTM

The AGENTS.md additions are consistent with the repository conventions.


Reviewed commit: 272e221e

Comment thread packages/core/tsconfig.json Resolved

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of 66df4a8c.

This review, of 95a68ca1

💬 Approved with comments — No blocking or warning-level problems. Two INFO notes remain open: visibility reports trust the viewerId in the payload, and the viewer lists are rebuilt as O(n) arrays on every update.

Findings: 2 info

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


🔒 Security: 💬 1 info

One INFO note from the last review is still open: visibility reports trust the viewerId in the payload

Recommendation: 💬 Optional Nits

  • [INFO] Visibility reports trust payload.viewerId instead of the message sender, so one participant can mark another as viewing (packages/core/src/components/rtk-screenshare-view/rtk-screenshare-view.tsx:191)
View full review
  • rtk-screenshare-view.tsx:191-211: handleScreenShareVisibilityNotification uses payload.viewerId and never checks it against the participant who sent the message. Any participant who knows the producerId can make the sharer's indicator show the wrong state. No data is exposed.

⚡ Performance: 💬 1 info

One INFO note from the last review is still open: viewer lists are rebuilt on every update

Recommendation: 💬 Optional Nits

  • [INFO] Viewer lists are rebuilt as O(n) arrays on every join, leave and visibility message (packages/core/src/components/rtk-screenshare-view/rtk-screenshare-view.tsx:138)
View full review
  • rtk-screenshare-view.tsx:138-160, 198-210: on every join, leave and visibility message, the sharer rebuilds trackedViewerIds and notActivelySeenBy and scans them linearly. When a share starts, the total work is O(n²). This is negligible at typical meeting sizes.

✅ All other checks passed

📖 AGENTS.md: ✅ LGTM

The AGENTS.md additions are consistent with the repository conventions.


📋 Code Quality: ✅ LGTM

The tsconfig exclude note no longer applies, because that file is not changed in this pull request. Every listener added in meetingChanged and participantChanged has a matching remove in cleanup, and the spec tests check this. The generated components.d.ts and Angular wrapper changes match the component source.


📝 Documentation: ✅ LGTM

The commands table in .opencode/skills/realtimekit-test-setup/SKILL.md now has a single header row.


Reviewed commit: 95a68ca1

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of 57c41853.

This review, of 66df4a8c

💬 Approved with comments — No blocking or warning-level problems. Two INFO notes remain open: visibility reports trust the viewerId in the payload, and the viewer lists are rebuilt as O(n) arrays on every update.

Findings: 2 info

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


🔒 Security: 💬 1 info

One INFO note from the last review is still open: visibility reports trust the viewerId in the payload

Recommendation: 💬 Optional Nits

  • [INFO] Visibility reports trust payload.viewerId instead of the message sender, so one participant can mark another as viewing (packages/core/src/components/rtk-screenshare-view/rtk-screenshare-view.tsx:191)
View full review
  • rtk-screenshare-view.tsx:191-211: handleScreenShareVisibilityNotification uses payload.viewerId and never checks it against the participant who sent the message. Any participant who knows the producerId can make the sharer's indicator show the wrong state. No data is exposed.

⚡ Performance: 💬 1 info

One INFO note from the last review is still open: viewer lists are rebuilt on every update

Recommendation: 💬 Optional Nits

  • [INFO] Viewer lists are rebuilt as O(n) arrays on every join, leave and visibility message (packages/core/src/components/rtk-screenshare-view/rtk-screenshare-view.tsx:138)
View full review
  • rtk-screenshare-view.tsx:138-160, 198-210: on every join, leave and visibility message, the sharer rebuilds trackedViewerIds and notActivelySeenBy and scans them linearly. When a share starts, the total work is O(n²). This is negligible at typical meeting sizes.

✅ All other checks passed

📖 AGENTS.md: ✅ LGTM

The AGENTS.md additions are consistent with the repository conventions.


📋 Code Quality: ✅ LGTM

The tsconfig exclude note no longer applies, because that file is not changed in this pull request. Every listener added in meetingChanged and participantChanged has a matching remove in cleanup, and the spec tests check this. The generated components.d.ts and Angular wrapper changes match the component source.


📝 Documentation: ✅ LGTM

The commands table in .opencode/skills/realtimekit-test-setup/SKILL.md now has a single header row.


Reviewed commit: 66df4a8c — same changes as 95a68ca1, so this is that commit's review (no new review was run; line numbers are as of 95a68ca1)

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 Approved with comments — Both notes from the last review are fixed, and no correctness or security problems were found. One suggestion remains: restore the missing final newline in packages/core/package.json.

Findings: 1 suggestion (1 is an inline comment on the diff)

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


📋 Code Quality: 💬 1 suggestion

No correctness problems; one end-of-file newline nit.

Recommendation: 💬 Optional Nits

  • [SUGGESTION] packages/core/package.json no longer ends with a newline, a change unrelated to the SDK version bump. (packages/core/package.json:99)
View full review
  • packages/core/package.json: the diff ends with \ No newline at end of file. The only intended change in this file is the bump of @cloudflare/realtimekit to ^2.2.0-staging.10.
  • Every listener added in meetingChanged and participantChanged is removed again in cleanupMeeting and cleanupParticipant. disconnectedCallback calls both cleanups, and a spec test checks that no listeners remain.
  • The generated components.d.ts and Angular wrapper changes match the component source.

✅ All other checks passed

🔒 Security: ✅ LGTM

handleScreenShareVisibilityNotification now uses the peerId of the broadcastedMessage event instead of a viewer ID in the payload. It also checks four things:

  • sharerId equals meeting.self.id.
  • producerId matches the tracked screen-share producer.
  • visible is a boolean.
  • The sender is in participants.joined.

A participant can now only change its own entry in the sharer's indicator.


📖 AGENTS.md: ✅ LGTM

The skills now live under .agents/skills, as the inline comment requested, and the AGENTS.md additions match.


⚡ Performance: ✅ LGTM

Viewer tracking now keeps a single pendingViewerIds Set, updated in O(1) per message. The render loop stops once it has the avatars it needs to show.


📝 Documentation: ✅ LGTM

No documentation issues.


Reviewed commit: 57c41853

Comment thread packages/core/package.json Resolved
@ravindra-cloudflare
ravindra-cloudflare merged commit 33a08b4 into staging Nov 26, 2026
6 checks passed
@ravindra-cloudflare
ravindra-cloudflare deleted the feat/can-you-see-my-screen branch November 26, 2026 17:41
github-actions Bot pushed a commit that referenced this pull request Nov 26, 2026
# [2.2.0-staging.4](https://github.com/cloudflare/realtimekit-ui/compare/@cloudflare/realtimekit-ui-v2.2.0-staging.3...@cloudflare/realtimekit-ui-v2.2.0-staging.4) (2026-11-26)

### Features

* **screenshare:** answering the question that gets asked in every meeting - can you see my screen ([#217](#217)) ([33a08b4](33a08b4))

skip-checks: true
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.2.0-staging.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants