Skip to content

fix(settings): reliably show session replay ID#3843

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/daily-issue-review-885d
Draft

fix(settings): reliably show session replay ID#3843
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/daily-issue-review-885d

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Apr 20, 2026

Why does this PR exist?

Closes #3271

Session recording can be toggled on, but the replay/session ID is often still unavailable on the first immediate lookup. That leaves the Settings UI without the ID users need to share for debugging.

What does this pull request do?

  • Adds getReplaySessionIdWithRetry() in src/app/components/Settings/.
  • Uses the helper in Settings when:
    • enabling session recording (optionally starts replay and retries for ID), and
    • loading existing session info on mount (read-only retry without forcing replay start).
  • Keeps existing failure behavior safe (no hard errors in UI if replay is unavailable).
  • Adds focused unit tests for the helper:
    • returns existing ID immediately,
    • retries until ID becomes available,
    • returns empty string when still unavailable,
    • still retries when start() throws.

Testing this change

  • yarn test src/app/components/Settings/getReplaySessionIdWithRetry.test.ts --runInBand
  • npx eslint src/app/components/Settings/getReplaySessionIdWithRetry.ts src/app/components/Settings/getReplaySessionIdWithRetry.test.ts

Additional Notes (if any)

This is intentionally scoped to ID retrieval robustness and does not change Sentry replay initialization semantics outside the Settings interaction path.

Open in Web View Automation 

cursoragent and others added 2 commits April 20, 2026 08:11
Co-authored-by: Jan Six <six.jan@gmail.com>
Co-authored-by: Jan Six <six.jan@gmail.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 20, 2026

⚠️ No Changeset found

Latest commit: e66f676

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

⤵️ 📦 ✨ The artifact was successfully created! Want to test it? Download it here 👀 🎁

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 20, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 18 complexity · 0 duplication

Metric Results
Complexity 18
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@github-actions
Copy link
Copy Markdown
Contributor

Commit SHA:82c3abc9c67229c4d9c89922496e4537ac62aa25

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: cursor/daily-issue-review-885d 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 61.52 (0.05) 52.96 (0.06) 59.33 (0.04) 61.91 (0.04)
🟢 packages/tokens-studio-for-figma/src/app/components/Settings/Settings.tsx 61.76 (2.31) 30 (-1.25) 71.42 (0) 61.76 (2.31)
✨ 🆕 packages/tokens-studio-for-figma/src/app/components/Settings/getReplaySessionIdWithRetry.ts 100 100 100 100

@github-actions
Copy link
Copy Markdown
Contributor

Commit SHA:82c3abc9c67229c4d9c89922496e4537ac62aa25
Current PR reduces the test coverage percentage by 1 for some tests

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.

No ID Displayed When Enabling Session ID

1 participant