Skip to content

Conversation

@mattwbeard
Copy link
Contributor

@mattwbeard mattwbeard commented Dec 22, 2025

Description

Removed clean up code causing the widget to disappear

Type of change

  • Fixes

Note

Remove cleanup in useZendesk so the Zendesk widget persists across page navigations instead of disappearing.

Written by Cursor Bugbot for commit e015839. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Dec 22, 2025

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

Project Deployment Review Updated (UTC)
codat-docs Ready Ready Preview, Comment Dec 22, 2025 0:03am

@github-actions
Copy link

Link check results for preview deployment (https://codat-docs-git-fix-zendesk-messenger-disappearing-codat.vercel.app):

[]

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

script.onload = () => setIsLoaded(true);

document.body.appendChild(script);

Copy link

Choose a reason for hiding this comment

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

Duplicate script elements added on each page navigation

Removing the cleanup function without adding a guard check causes duplicate Zendesk script elements to be appended to the document body on every page navigation. When the DocItemLayout component remounts after page change, the useEffect runs again and appends a new script since no check exists for whether a script with id="ze-snippet" already exists in the DOM. This can lead to multiple script loads and potential issues with the Zendesk widget.

Fix in Cursor Fix in Web

@pzaichkina pzaichkina merged commit e31f40e into main Dec 22, 2025
6 of 8 checks passed
@pzaichkina pzaichkina deleted the fix-zendesk-messenger-disappearing branch December 22, 2025 12:06
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