Skip to content

Conversation

@adborbas
Copy link
Contributor

@adborbas adborbas commented Dec 11, 2025

This is a follow-up on HACK Week: Add details for decoding errors in troubleshooting tool

Description

This PR attaches the troubleshooting tool's output as an attachment to the Zendesk issue if you navigate to the Contact Support page.

  • I've updated ZendeskManager to support updating multiple attachments.
  • Improved the sizing of the icon on the Troubleshooting Connection screen.
  • Updated ConnectivityToolViewModel to include the technical details section for generic errors.

Test Steps

⚠️ This is an E2E test. You'll need to resolve the opened issue in Zendesk.

  1. Download the app from the build. You need the PR build as it contains the keys for creating the request.
  2. Login with any store.
  3. Navigate to Settings/Troubleshooting Connection/
  4. [Optional] You can mock any of the network response to fail to see a more detailed report.
  5. Wait for the report to finish.
  6. Tap Contact Support
    7 . Fill out required fields.
  7. Tap "Submit Support Request"
  8. Open Zendesk and locate the issue.
  9. Validate that logs are attached.
  10. Download and the connectivitytest_log attachment and check it.

Screenshots

Before After
Simulator Screenshot - iPhone 17 Pro - 2025-12-10 at 14 35 45 Simulator Screenshot - iPhone 17 Pro - 2025-12-10 at 14 37 01
Screenshot 2025-12-11 at 13 55 53
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@adborbas adborbas added this to the 23.9 milestone Dec 11, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Dec 11, 2025

1 Warning
⚠️ This PR is assigned to the milestone 23.9. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@adborbas adborbas force-pushed the adborbas/zendesk_multiple_attachemnts branch from 326c7a8 to 6db510c Compare December 11, 2025 12:18
@wpmobilebot
Copy link
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16449-6db510c
Version23.8
Bundle IDcom.automattic.alpha.woocommerce
Commit6db510c
Installation URL1tep06qagf7ho
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@adborbas adborbas changed the title Adborbas/zendesk multiple attachemnts [HACK Week] Attach connectivity test log to Zendesk issue Dec 11, 2025
@adborbas adborbas marked this pull request as ready for review December 11, 2025 13:21
@adborbas adborbas requested a review from itsmeichigo December 11, 2025 13:21
@itsmeichigo itsmeichigo self-assigned this Dec 12, 2025
Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! I tested both the happy path and an edge case - I have a question regarding the edge case below 👇

Comment on lines +86 to +88
latestTestResult.append(ConnectivityTestResult(testCase: testCase,
result: testResult,
timeTaken: timeTaken))
Copy link
Contributor

Choose a reason for hiding this comment

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

I tested an edge case:

  • Run the tests and stub one of the request to fail with decoding error.
  • Retry the same test but let it succeed.
  • Result: I see both failure and success in the log:
## 1. Internet Connection
Took: 0ms
Result: Success
## 2. Connecting to WordPress.com Servers
Took: 721ms
Result: Success
## 3. Connecting to your site
Took: 1567ms
Result: Success
## 4. Fetching your site orders
Took: 1940ms
Result: Success
## 5. Fetching products in your store
Took: 12208ms
Result: Operation: Fetching products in your store
Error Type: Decoding Error

Issue: Required Key Not Found
Missing Key: id
Coding Path: data → Index 0
Description: No value associated with key CodingKeys(stringValue: "id", intValue: nil) ("id").
## 6. Fetching products in your store
Took: 1756ms
Result: Success

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. I've intentionally decided to keep every "test run" and not overwrite the original run when retrying a test. This way, we can see the full picture and not just the last "snapshot". And since we are attaching the report, the report size is not a constraint.

Would you prefer overwriting with the retry?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I have mixed feelings about this but it might not be straightforward to replace the results. Sometimes intermittent failures are also a sign of something broken on a site. Let's keep this for now then.

Comment on lines +406 to +413
private var caseName: String {
switch testCase {
case .internetConnection: "Internet Connection"
case .wpComServers: "Connecting to WordPress.com Servers"
case .site: "Connecting to your site"
case .siteOrders: "Fetching your site orders"
case .loadingProducts: "Fetching products in your store"
}
Copy link
Contributor

@itsmeichigo itsmeichigo Dec 12, 2025

Choose a reason for hiding this comment

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

We can simply use testCase.title for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From a technical point of view, yes, we could. But testCase.title is localized, so the HEs would have to translate it to see which step it was. We are making sure the report will have English titles by using caseName here.

Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

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

Approving as the comments above are not blocking.

@adborbas adborbas merged commit cbeddb0 into trunk Dec 12, 2025
17 checks passed
@adborbas adborbas deleted the adborbas/zendesk_multiple_attachemnts branch December 12, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants