fix(react-dogfood): include all query params in the invite QR code - #2430
Conversation
The invite QR code was rebuilt from the current location, which meant it only carried whatever params happened to be on the URL at render time and made it easy to lose call-critical ones such as `encryption_key`. Build the QR value through a single `buildQrCodeUrl()` helper that copies every param from `location.search`, preserves the hash, and then adds `from_qr=true`. Both `InvitePopup` and `InvitePanel` now share it instead of duplicating the URL construction.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe invite components now use a shared helper to build QR code URLs as strings. The helper preserves the current origin, path, query parameters, and hash while setting ChangesQR code URL handling
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to Invite QR codes now retain the current connection parameters and hash while marking QR-based entry. Both invite surfaces render the resulting URL string consistently, with no current merge-blocking risk identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bundle sizeBuilt package output. Sizes in KB; delta vs
|
💡 Overview
The invite QR code in the dogfood app is rebuilt from the current location on every render, so it only ever carried the params that happened to be on the URL at that moment. That made it easy to drop call-critical ones - most notably
encryption_key, which a phone scanning the code needs in order to join an encrypted call.The QR value is now built through a single
buildQrCodeUrl()helper that copies every param fromlocation.search(encryption_key,environment,coordinator_url, ...), preserves the hash, and then addsfrom_qr=true.InvitePopupandInvitePanelshare it instead of duplicating the URL construction.📝 Implementation notes
Worth flagging for review: the previous
new URL(window.location.toString())already included the full query string, soencryption_keywas only missing when the URL had not been rewritten yet at render time.useLobbyCall.replaceUrlsets that param viahistory.replaceState, which does not trigger a React re-render. This change makes the param handling explicit and deduplicated, but if a stale key shows up again the real fix belongs at the render-trigger level - lifting the encryption key into state that both the lobby and the invite UI read.Sample-app only; no SDK surface is touched.
🎫 Ticket: n/a
Summary by CodeRabbit