Skip to content

Fix support conversations that ask for a human in the first message - #26404

Merged
jkmassel merged 4 commits into
trunkfrom
jkmassel/wordpress-rs-trunk-zendesk-fix
Nov 18, 2026
Merged

jkmassel merged 4 commits into
trunkfrom
jkmassel/wordpress-rs-trunk-zendesk-fix

Conversation

@jkmassel

@jkmassel jkmassel commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes "Response couldn't be parsed" when the first message of a new support conversation asks for a human. The server creates a Zendesk ticket and returns its ID as a number, which wordpress-rs expected as a string, so the app showed the error even though the ticket was created. Each retry created another ticket.

The fix is in wordpress-rs (Automattic/wordpress-rs#1744) and shipped in 0.11.0. This PR updates wordpress-rs from 0.9.1 to 0.11.0.

Changes

  • Modules/Package.swift, Package.resolved: wordpress-rs 0.9.1 → 0.11.0.
  • CommentDetail.swift, CommentListItem.swift, CommentServiceRemoteCoreRESTAPI.swift: authorAvatarUrls is now optional in wordpress-rs, because WordPress omits it when a site turns off "Show Avatars". Use optional chaining; the avatar URL was already optional.

None of the other breaking changes in 0.10.0 and 0.11.0 (CloudflareError, menu_order as Int64?, optional WPComSite fields, the new ReaderSavedPost shape) affected the app's build.

What I ran

  • I built this change and ran the affected tests locally

The whole WordPressUnitTests plan against 0.11.0, with trunk (67c9031f6b) merged in: 4638 passed, 0 failed, 2 skipped, 1 expected failure (4641 tests), on an iPhone 18 Pro simulator (iOS 27.2).

Testing instructions

Both checks were run on a Jetpack Debug build with wordpress-rs 0.11.0, on an iPhone 18 Pro simulator (iOS 27.2) with the New Support flag on.

  • New conversation that asks for a human. Get help → New conversation → "From Claude app test please disregard I want to talk to a human". The conversation opened and the assistant said it opened a ticket; no parse error. On trunk, the same message shows "Response couldn't be parsed: invalid type: integer …, expected a string".

    New conversation that asked for a human, opened without an error
  • Reply with attachments to that conversation (a GIF and a video) sent and showed both. Replies use the unified support endpoint, which this PR doesn't change; checked because the wordpress-rs update touches it.

    Reply with a GIF and a video, both shown in the conversation

Pins wordpress-rs to its trunk-build snapshot of 39cefd51, which reads a
numeric zendesk_ticket_id when creating a support bot conversation.
Comment author avatar URLs are now optional in wordpress-rs, so use
optional chaining where the app reads them.
@jkmassel jkmassel added this to the 27.5 milestone Nov 13, 2026
@jkmassel jkmassel added Support [Type] Bug dependencies Pull requests that update a dependency file labels Nov 13, 2026
@jkmassel jkmassel self-assigned this Nov 13, 2026
@wpmobilebot

Copy link
Copy Markdown
Contributor

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

trunk-build is force-pushed on every wordpress-rs trunk merge, so the
previous commit is no longer on any branch and CI can't fetch it.
@jkmassel
jkmassel marked this pull request as ready for review November 13, 2026 23:18
Comment thread Modules/Package.swift Outdated
.package(
url: "https://github.com/automattic/wordpress-rs",
exact: "0.9.1"
revision: "8e619ff1dfed123d9d321ac73285048fa9f627a4"

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.

This needs to be updated before merging.

0.11.0 is the first release with the support ticket ID fix, so pin to it
instead of the trunk-build snapshot. Nothing else in the release needed
changes in the app.
@jkmassel
jkmassel requested a review from crazytonyli November 18, 2026 02:36
@jkmassel
jkmassel added this pull request to the merge queue Nov 18, 2026
Merged via the queue into trunk with commit 145c36f Nov 18, 2026
22 checks passed
@jkmassel
jkmassel deleted the jkmassel/wordpress-rs-trunk-zendesk-fix branch November 18, 2026 03:37
jkmassel added a commit that referenced this pull request Nov 18, 2026
wordpress-rs 0.11.0 (from #26404) is the first release with
`ReaderSavedService`, which this branch used from PR builds.

- `importSaves` replaces `importLocalSaves` and imports whenever it's
  asked, so the app records the launch import per account in
  `UserDefaults`, clears the record on sign-out, and runs one import at a
  time.
- JSON import sends the file's posts in one `importSaves` call, with the
  file's title, excerpt, image and site, rather than one save per post.
- A tap past the account's 1,000-save cap fails with `TooManySaves`, and
  the notice says the account is at its limit. A sync that leaves saves
  waiting for room logs it rather than warning.
- `ReaderPost.tags` is optional. Core Data can't tell a post without tags
  from one whose tags it doesn't have, so it sends `nil` for none.
- The store takes the notification center it observes, so parallel tests
  don't sync each other's stores.
jkmassel added a commit that referenced this pull request Nov 20, 2026
wordpress-rs 0.11.0 (from #26404) is the first release with
`ReaderSavedService`, which this branch used from PR builds.

- `importSaves` replaces `importLocalSaves` and imports whenever it's
  asked, so the app records the launch import per account in
  `UserDefaults`, clears the record on sign-out, and runs one import at a
  time.
- JSON import sends the file's posts in one `importSaves` call, with the
  file's title, excerpt, image and site, rather than one save per post.
- A tap past the account's 1,000-save cap fails with `TooManySaves`, and
  the notice says the account is at its limit. A sync that leaves saves
  waiting for room logs it rather than warning.
- `ReaderPost.tags` is optional. Core Data can't tell a post without tags
  from one whose tags it doesn't have, so it sends `nil` for none.
- The store takes the notification center it observes, so parallel tests
  don't sync each other's stores.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Support [Type] Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants