Skip to content

Fix ZendeskWindowTitle for updated Zendesk agent UI - #8

Merged
sopelt merged 2 commits into
masterfrom
claude/zendesk-window-title-fix-0348f5
Sep 30, 2026
Merged

sopelt merged 2 commits into
masterfrom
claude/zendesk-window-title-fix-0348f5

Conversation

@sopelt

@sopelt sopelt commented Sep 30, 2026

Copy link
Copy Markdown
Member

What changed

  • Fixed the selectors that broke with Zendesk's latest UI: #main_panes is no longer unique, cached workspaces are hidden via visibility instead of display:none, and requester/org are now read via data-test-id (tabs-nav-item-users / tabs-nav-item-organizations).
  • Removed the dependency on the undocumented Zd global and jQuery; the section is derived from location.pathname.
  • The window title is recomputed on every tick, and title changes made by Zendesk itself (navigation, notification counts) are respected instead of overwritten.
  • Dropped the ticket subject from the suffix, since Zendesk's own title already contains it (no more duplicated "Old API for Zendesk").
  • Wrapped the script in an IIFE so it no longer leaks globals; bumped to 1.9.

Why

The script stopped updating the title after Zendesk's UI update.

Notes for reviewers

Verified against the live timecockpit.zendesk.com agent 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/@downloadURL added.

🤖 Generated with Claude Code

sopelt and others added 2 commits September 30, 2026 09:59
- 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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@sopelt
sopelt merged commit 0fc3508 into master Sep 30, 2026
1 check passed
@sopelt
sopelt deleted the claude/zendesk-window-title-fix-0348f5 branch September 30, 2026 08:10
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.

2 participants