Skip to content

fix: update meeting title component on meetingTitleUpdate - #195

Merged
ravindra-cloudflare merged 1 commit into
stagingfrom
ak/room-title-update-ui
Nov 2, 2026
Merged

ravindra-cloudflare merged 1 commit into
stagingfrom
ak/room-title-update-ui

Conversation

@thisisamank

Copy link
Copy Markdown
Contributor

Description

This PR makes the meeting title component udpate itself on the event meetingTitleUpdate

Screenshots

@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 bc4e3341.

This review, of dd393cb8

💬 Approved with comments — The fix is small and correct. There is one optional robustness suggestion about duplicate listener registration, and the new subscription logic has no spec test.

Findings: 1 info · 1 suggestion

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


📋 Code Quality: 💬 1 info · 1 suggestion

The listener wiring is correct on the normal connect, update and disconnect path. Two minor points: a missing regression test, and a possible duplicate listener in an edge case.

Recommendation: 💬 Optional Nits

  • [INFO] No spec test covers the new meetingTitleUpdate subscription: the title updating, the meeting prop swap, and listener removal on disconnect. (packages/core/src/components/rtk-meeting-title/rtk-meeting-title.tsx:45)
  • [SUGGESTION] If meeting changes while the component is detached and it is then attached again, the same listener is registered twice and one copy is never removed. Removing the listener from the current meeting before addListener would make this safe. (packages/core/src/components/rtk-meeting-title/rtk-meeting-title.tsx:49)
View full review

On the normal path the listener wiring is correct:

  • connectedCallback sets the initial title and adds the listener.
  • The meeting watcher moves the listener from the old meeting to the new one.
  • disconnectedCallback removes the listener.

Possible duplicate listener (rtk-meeting-title.tsx:33-50)

  • meetingChanged adds a listener and never removes one from the current meeting first.
  • If meeting is replaced while the component is detached, the watcher adds a listener to the new meeting. When the component is attached again, connectedCallback adds the same listener a second time.
  • EventEmitter-style APIs allow the same handler to be registered twice, and each removeListener call removes only one copy, so one copy stays behind after the next disconnect.
  • The handler only sets the title, so registering it twice changes nothing on screen, but the leftover copy is a small leak.
  • Fix: call meeting?.meta?.removeListener('meetingTitleUpdate', this.titleUpdateListener) before the addListener call. The rtk-clock component's watcher does the same by disconnecting first.

No spec test for the new subscription. A spec could mount the component with a mock meeting.meta, emit meetingTitleUpdate, and check two things: that the rendered title changes, and that the listener is removed when meeting is swapped or the component is detached.


✅ All other checks passed

📝 Documentation: ✅ LGTM

No documentation issues found.


Reviewed commit: dd393cb8

@ask-bonk

ask-bonk Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@thisisamank
thisisamank force-pushed the ak/room-title-update-ui branch from dd393cb to bc4e334 Compare November 1, 2026 21:51

@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 — The fix is correct and the earlier duplicate-listener suggestion is resolved. One INFO note remains: no spec test covers the new subscription.

Findings: 1 info

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


📋 Code Quality: 💬 1 info

The duplicate-listener issue is fixed. The meetingTitleUpdate subscription still has no spec test.

Recommendation: 💬 Optional Nits

  • [INFO] No spec test covers the new meetingTitleUpdate subscription: the title updating, the meeting prop swap, and listener removal on disconnect. (packages/core/src/components/rtk-meeting-title/rtk-meeting-title.tsx:45)
View full review
  • Fixed: meetingChanged now calls removeListener on the current meeting (rtk-meeting-title.tsx:49) before it calls addListener (line 50). Attaching the component again after meeting changed while it was detached no longer registers the handler twice. disconnectedCallback removes the listener, so every addListener has a matching removeListener.
  • Still open (INFO): there is no spec in packages/core/src/components/rtk-meeting-title/. A spec with a mock meeting.meta could check three things:
    • the title re-renders when meetingTitleUpdate is emitted;
    • the listener moves to the new meeting when the meeting prop is swapped;
    • the listener is removed on disconnect.
  • The @cloudflare/realtimekit version bump is the same in packages/core/package.json and package-lock.json.

✅ All other checks passed

📝 Documentation: ✅ LGTM

No documentation issues found.


Reviewed commit: bc4e3341

@ask-bonk

ask-bonk Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@ravindra-cloudflare
ravindra-cloudflare merged commit b1425c6 into staging Nov 2, 2026
7 checks passed
@ravindra-cloudflare
ravindra-cloudflare deleted the ak/room-title-update-ui branch November 2, 2026 04:28
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.4-staging.3 🎉

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