Skip to content

fix(react-dogfood): include all query params in the invite QR code - #2430

Merged
oliverlaz merged 1 commit into
mainfrom
fix-invite-qr-query-params
Sep 9, 2026
Merged

fix(react-dogfood): include all query params in the invite QR code#2430
oliverlaz merged 1 commit into
mainfrom
fix-invite-qr-query-params

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Sep 9, 2026

Copy link
Copy Markdown
Member

💡 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 from location.search (encryption_key, environment, coordinator_url, ...), preserves the hash, and then adds from_qr=true. InvitePopup and InvitePanel share 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, so encryption_key was only missing when the URL had not been rewritten yet at render time. useLobbyCall.replaceUrl sets that param via history.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

  • Bug Fixes
    • Improved QR code link generation when inviting others, preserving existing URL parameters while adding the QR source indicator.
    • Ensured QR codes consistently use the correct shareable link format.

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

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 927c7d97-ff2a-4911-aca7-c20713ef4781

📥 Commits

Reviewing files that changed from the base of the PR and between fa23a9d and 09e9401.

📒 Files selected for processing (1)
  • sample-apps/react/react-dogfood/components/InvitePanel/InvitePanel.tsx

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The 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 from_qr=true. QR rendering props now receive the string directly.

Changes

QR code URL handling

Layer / File(s) Summary
Build and render QR code URL
sample-apps/react/react-dogfood/components/InvitePanel/InvitePanel.tsx
The shared helper builds QR code content as a string for InvitePopup and InvitePanel. QR container titles and QRCodeSVG values use the string directly in all rendering branches.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 09e94

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: jdimovska

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: including all query parameters in the React dogfood invite QR code.
Description check ✅ Passed The description includes the required Overview and Implementation notes sections. It explains the problem, implementation, scope, and review considerations. The ticket is marked as not applicable, and…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-invite-qr-query-params

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Bundle size

Built package output. Sizes in KB; delta vs main@3e6b675.

Package Unminified Minified Δ min vs main
@stream-io/video-client 781.8 KB 275.2 KB +10.4 KB (+3.9%)
@stream-io/video-react-bindings 32.9 KB 12.0 KB +2.7 KB (+29.0%)
@stream-io/video-react-sdk 375.3 KB 230.3 KB +139.8 KB (+154.4%)
↳ install total (+ client + react-bindings) 1190.0 KB 517.5 KB +152.9 KB (+41.9%)
@stream-io/video-react-sdk (embedded) (cjs) 209.6 KB 125.5 KB new
@stream-io/video-react-native-sdk 414.5 KB 196.9 KB +2.6 KB (+1.3%)
↳ install total (+ client + react-bindings) 1229.2 KB 484.1 KB +15.7 KB (+3.4%)
@stream-io/react-native-callingx 15.5 KB 7.1 KB +116 B (+1.6%)
@stream-io/video-filters-web 122.4 KB 68.6 KB +3.4 KB (+5.2%)
@stream-io/video-react-sdk (embedded) - 94.8 KB removed

@oliverlaz
oliverlaz merged commit ce8490a into main Sep 9, 2026
16 checks passed
@oliverlaz
oliverlaz deleted the fix-invite-qr-query-params branch September 9, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants