Skip to content

fix(media-toggles): hiding speakers for safari to be consistent, added permission hints - #229

Merged
ravindra-cloudflare merged 3 commits into
stagingfrom
fix/device-selection-permission-hints
Dec 1, 2026
Merged

ravindra-cloudflare merged 3 commits into
stagingfrom
fix/device-selection-permission-hints

Conversation

@ravindra-cloudflare

@ravindra-cloudflare ravindra-cloudflare commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  1. We do not show speaker list for Safari (list is always empty). To be consistent, hiding speaker list when it is empty matching rtk-speaker-selector.
  2. Added permission hints when device permission is missing and user tries to select a not-permitted device.
  3. Speaker related defaultLanguage keys are kept for future purposes.

@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 102feda7.

This review, of 31131460

💬 Approved with comments — The change is small and correct and comes with tests. The only note is an optional SUGGESTION about the hint wording for permission states other than not-granted.

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.

🔧 Fix with your agent

Paste the following into your coding agent to investigate and fix these issues.

Fix the following code review issues found in pull request #229.

Before making changes, review each issue and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g., the fix would require disproportionate changes
  for minimal ROI, or the finding is factually incorrect), explain why
- If you need to clarify something before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

## SUGGESTION (1)

### [Code Quality] The 'permission needed' hint shows for every non-ACCEPTED state, including COULD_NOT_START (same pattern in rtk-camera-toggle.tsx:324)
- **File:** packages/core/src/components/rtk-mic-toggle/rtk-mic-toggle.tsx:328

📋 Code Quality: 💬 1 suggestion

Correct and well tested; one optional note on hint wording.

Recommendation: 💬 Optional Nits

  • [SUGGESTION] The 'permission needed' hint shows for every non-ACCEPTED state, including COULD_NOT_START (same pattern in rtk-camera-toggle.tsx:324) (packages/core/src/components/rtk-mic-toggle/rtk-mic-toggle.tsx:328)
View full review
  • The hint is chosen with permission === 'ACCEPTED' ? not_found_* : device_selector_permission_needed_*, so every state other than ACCEPTED shows "permission needed". That includes COULD_NOT_START, which the component already treats as its own case (couldNotStart, line 240). This is cosmetic.
  • Hiding the speaker section when speakerDevices is empty removes the divider and the old "No speaker found" row together, so the menu stays consistent.

✅ All other checks passed

🔒 Security: ✅ LGTM

No security concerns in this UI-only change.


📝 Documentation: ✅ LGTM

The new language keys are clear, and the comment explaining the speaker-hiding logic is helpful.


Reviewed commit: 31131460

@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 — The earlier suggestion about the hint wording is fixed and tests cover it; no issues remain.

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


✅ All checks passed

🔒 Security: ✅ LGTM

No security concerns in this UI-only change.


📖 AGENTS.md: ✅ LGTM

The change follows the repository conventions.


📋 Code Quality: ✅ LGTM

The hint now appears only when the permission is NOT_REQUESTED, or when hasPermissionError() is true, which covers DENIED and SYSTEM_DENIED. COULD_NOT_START and ACCEPTED fall through to the "not found" text. The specs for both toggles cover every one of these states.


⚡ Performance: ✅ LGTM

No performance concerns.


📝 Documentation: ✅ LGTM

The new language keys are clear.


Reviewed commit: 102feda7

@ravindra-cloudflare
ravindra-cloudflare merged commit 27e3de9 into staging Dec 1, 2026
6 checks passed
@ravindra-cloudflare
ravindra-cloudflare deleted the fix/device-selection-permission-hints branch December 1, 2026 17:45
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2026
# [2.2.0-staging.12](https://github.com/cloudflare/realtimekit-ui/compare/@cloudflare/realtimekit-ui-v2.2.0-staging.11...@cloudflare/realtimekit-ui-v2.2.0-staging.12) (2026-12-01)

### Bug Fixes

* **media-toggles:** hiding speakers for safari to be consistent, added permission hints ([#229](#229)) ([27e3de9](27e3de9))

skip-checks: true
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

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

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions Bot pushed a commit that referenced this pull request Dec 2, 2026
# [2.2.0](https://github.com/cloudflare/realtimekit-ui/compare/@cloudflare/realtimekit-ui-v2.1.0...@cloudflare/realtimekit-ui-v2.2.0) (2026-12-02)

### Bug Fixes

* **audio:** silence removed remote tracks in Chromium ([#228](#228)) ([ac8f737](ac8f737))
* **firefox:** device list was not refreshed, speakers were never there ([#224](#224)) ([d9d0978](d9d0978))
* **logs:** upgrading realtimekit for proper type ([d8fc02b](d8fc02b))
* **media-toggles:** hiding speakers for safari to be consistent, added permission hints ([#229](#229)) ([27e3de9](27e3de9))
* **notifications:** do not emit notifications for reconnecting participants ([#218](#218)) ([c77533b](c77533b))
* **notifications:** ensure backward compatibility for existing users ([#226](#226)) ([2857659](2857659))
* **pip:** showing hls player for livestream viewer ([#225](#225)) ([fd117fb](fd117fb))
* **rtk-screenshare-view:** when a viewer reconnects, they do not inform sharer of their state ([#227](#227)) ([02996eb](02996eb))
* **screenshare:** added override to disable screenshare tracking, if customers want to ([#222](#222)) ([c8bcf73](c8bcf73))
* **sdk-version-reporting:** report ui kit sdk name and versions ([8d87b6b](8d87b6b))

### Features

* **device-list-alongside-media-toggles:** rtk-mic-toggle & rtk-camera-toggle now have device dropdowns and slots for noise cancellation and video effects ([#214](#214)) ([bb71819](bb71819))
* **notifications:** ability to customize notification sound, duration, and toggle ([#220](#220)) ([5869c2d](5869c2d))
* **pip:** added screenshare support in PIP, fixed every known pip bug ([#213](#213)) ([d7b28b4](d7b28b4))
* **screenshare:** answering the question that gets asked in every meeting - can you see my screen ([#217](#217)) ([33a08b4](33a08b4))

skip-checks: true
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.2.0 🎉

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