Skip to content

feat: handle web debugger revert event for nextjs - #1176

Merged
jsalaber merged 1 commit into
mainfrom
COR-3780-web-debugger-revert-user
Nov 6, 2025
Merged

feat: handle web debugger revert event for nextjs#1176
jsalaber merged 1 commit into
mainfrom
COR-3780-web-debugger-revert-user

Conversation

@jsalaber

@jsalaber jsalaber commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Changes

  • added new event from web debugger that identifies the given user for all sdks other than next.js

Copilot AI review requested due to automatic review settings November 6, 2025 20:39
@jsalaber
jsalaber requested a review from a team as a code owner November 6, 2025 20:39
@vercel

vercel Bot commented Nov 6, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
js-sdks-web-elements Ready Ready Preview Comment Nov 6, 2025 8:58pm
js-sdks-with-provider Ready Ready Preview Comment Nov 6, 2025 8:58pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
js-sdks-next-js-page-router Ignored Ignored Nov 6, 2025 8:58pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for reverting to the original user in the DevCycle debugger by introducing a new message type handler DEVCYCLE_REVERT_TO_ORIGINAL_USER.

  • Adds a new message handler for DEVCYCLE_REVERT_TO_ORIGINAL_USER that calls identifyUser with the original user data
  • Includes placeholder for Next.js support with a TODO comment
  • Imports useVariableValue in the React test component

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
lib/web-debugger/src/initializeDevCycleDebugger.ts Adds handler for reverting to original user with identifyUser call and Next.js TODO
e2e/react/src/app/DevCycleExample.tsx Adds unused useVariableValue import to React component
Comments suppressed due to low confidence (1)

e2e/react/src/app/DevCycleExample.tsx:1

  • Unused import useVariableValue.
import { useVariable, useVariableValue } from '@devcycle/react-client-sdk'

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/web-debugger/src/initializeDevCycleDebugger.ts Outdated
Comment thread lib/web-debugger/src/initializeDevCycleDebugger.ts
Comment thread e2e/react/src/app/DevCycleExample.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +285 to +287
this.client.identifyUser(event.data.user).then(() => {
this.updateIframeData()
})

Copilot AI Nov 6, 2025

Copy link

Choose a reason for hiding this comment

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

The identifyUser promise lacks error handling. The existing DEVCYCLE_IDENTIFY_USER handler (line 262-264) has the same issue, but both should include a .catch() block to handle potential errors during user identification.

Copilot uses AI. Check for mistakes.
@jsalaber
jsalaber merged commit f668b03 into main Nov 6, 2025
21 checks passed
@jsalaber
jsalaber deleted the COR-3780-web-debugger-revert-user branch November 6, 2025 21:14
jonathannorris added a commit that referenced this pull request Jul 2, 2026
- js-yaml 3.14.1 -> 3.15.0 (medium, alerts #1175, #1176)
- js-yaml 4.1.0 -> 4.3.0 (medium, alerts #1171, #1172, #1173, #1174)
- webpack-dev-server -> 5.2.5 (medium, alerts #1167, #1168, #1169)
- http-proxy-middleware 2.0.9 -> 2.0.10 (medium, alerts #1164, #1165, #1166)
- @babel/core -> 7.29.7 (low, alerts #1139, #1140, #1163)
- undici -> 6.27.0 (low/medium/high, alerts #1154-#1161)
- tar -> 7.5.16 (medium, alerts #1149-#1152)
- ws 6.x -> 6.2.4, ws 7.x -> 7.5.11, ws 8.x -> 8.21.0 (high, alerts #1141, #1142, #1145)
- form-data 4.0.5 -> 4.0.6 (high, alerts #1143, #1144)
- protobufjs -> 7.6.4 (high/medium, alerts #1135, #1136)
- protobufjs-cli 1.2.2 -> 1.3.3 (high, alert #1132)
- launch-editor -> 2.14.1 (medium, alerts #1134, #1137, #1138)
- markdown-it 12.3.2 -> 14.3.0 (medium, alert #1133)
- joi 17.6.0 -> 17.13.4 (medium, alert #1125)
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.

3 participants