fix: copy current session share URL#2324
Conversation
|
@AjTheSpidey is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 68d9d8c The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deep Review✅ No critical issues found. The fix replaces render-time URL capture with a click-time read, adds a synchronous ref-based duplicate-click guard, and tracks mount state so async resolution after unmount is a no-op. Tests cover the URL-freshness, error, rejection, duplicate-click, unmount, and StrictMode paths. 🔵 P3 nitpicks (7)
Reviewers (6): correctness, kieran-typescript, julik-frontend-races, testing, maintainability, reliability. Testing gaps: the new |
130d313 to
b1fe133
Compare
016f943 to
a62b13e
Compare
a62b13e to
be021e5
Compare
Fixes #2313.
Found the share button could copy an older URL if the side panel rendered before the session params finished landing in the address bar.
Changed it so the button reads
window.location.hrefwhen you click it, not during render. I also kept the success/error toast behavior, blocked duplicate clicks while the copy is running, and added tests around the fresh URL + retry cases.Checked locally: