Skip to content

Conversation

@arjun-dureja
Copy link
Contributor

@arjun-dureja arjun-dureja commented Mar 17, 2025

Summary

  • When opening the popup, we append some necessary query params to the URL. Since the URL object is re-used, the query params were getting appended again on each popup open.
    • This was fixed by adding a simple check for if the query param already exists

How did you test your changes?

  • Manually and unit tests

Before:

Screen.Recording.2025-03-17.at.3.35.52.PM.mov

After:

Screen.Recording.2025-03-17.at.3.37.25.PM.mov

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Mar 17, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 2/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

await openPopup(url);

const paramCount = url.searchParams.toString().split('&').length;
expect(paramCount).toBe(4);
Copy link
Contributor Author

@arjun-dureja arjun-dureja Mar 17, 2025

Choose a reason for hiding this comment

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

I verified that this test fails without the fix

@arjun-dureja arjun-dureja changed the title Fix query params getting duplicated on each popup open fix: query params getting duplicated on each popup open Mar 17, 2025
Copy link
Contributor

@fan-zhang-sv fan-zhang-sv left a comment

Choose a reason for hiding this comment

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

nice finding!

@arjun-dureja arjun-dureja merged commit ecf5b7e into master Mar 18, 2025
7 checks passed
@arjun-dureja arjun-dureja deleted the arjun/fix-duplicate-query-params branch March 18, 2025 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants