Fix ZendeskWindowTitle for updated Zendesk agent UI - #8
Merged
Merged
Conversation
- use data-test-id selectors for tab title, requester and org - pick the visible workspace (#main_panes is no longer unique, cached workspaces are hidden via visibility) - derive section from location.pathname instead of Zd.section - recompute the title on every tick and track title changes by zendesk - wrap in IIFE, no more page globals Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation is consistent with the described UI changes and has no identified blocking defects.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the userscript for Zendesk’s current agent UI and removes reliance on jQuery and the undocumented Zd global.
Changes:
- Uses current workspace and requester/organization selectors.
- Derives ticket context from the URL and preserves Zendesk title updates.
- Encapsulates the script and bumps its version.
| File | Description |
|---|---|
ZendeskWindowTitle.user.js |
Modernizes title generation for the updated Zendesk interface. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
#main_panesis no longer unique, cached workspaces are hidden viavisibilityinstead ofdisplay:none, and requester/org are now read viadata-test-id(tabs-nav-item-users/tabs-nav-item-organizations).Zdglobal and jQuery; the section is derived fromlocation.pathname.Why
The script stopped updating the title after Zendesk's UI update.
Notes for reviewers
Verified against the live
timecockpit.zendesk.comagent UI by running the script logic in the page console (resulting title:Ticket: … – Zendesk - #16442 - David Kinnander - Snille). Not yet tested through a userscript manager or by switching between multiple real ticket tabs. No@updateURL/@downloadURLadded.🤖 Generated with Claude Code