Skip to content

Unified support: combined Get help conversations flow#25720

Draft
adalpari wants to merge 6 commits into
bump/wordpress-rs-unified-supportfrom
feat/unified-support
Draft

Unified support: combined Get help conversations flow#25720
adalpari wants to merge 6 commits into
bump/wordpress-rs-unified-supportfrom
feat/unified-support

Conversation

@adalpari

Copy link
Copy Markdown
Contributor

What

Ports the Android unified "Get help" support flow (WordPress-Android#22946, #23011) to iOS: the two separate "Ask the Bots" and "Ask the Happiness Engineers" screens become a single combined conversations list, backed by the new unifiedConversations rs endpoint.

⚠️ Stacked on #25719 (the wordpress-rs bump). Base this on that branch; it can't build without it. Draft until #25719 lands and a build/device pass is done.

Changes

Data layer

  • UnifiedConversationItem model — a combined bot + HE list entry with isBot branching and server-status → badge mapping.
  • UnifiedConversationDataProvider + loadUnifiedConversations(); WpUnifiedConversationDataProvider calls api.unifiedConversations.getUnifiedConversationList() and maps UnifiedConversationSummary to the combined item. Mock + sample data included.

UI

  • UnifiedConversationListView — one combined list (bot rows badged, HE rows show status), pull-to-refresh, empty/error states, and a + to start a new bot chat.
  • Each row routes into the existing detail experience branched on type — the chat-style bot ConversationView or the ticket-style SupportConversationView — reusing all existing detail/reply code unchanged.
  • RootSupportView now shows a single Get help entry instead of two.

text/html link attachments (#23011)

  • Attachment.isLink for text/html; AttachmentListView renders link/citation attachments as tappable, underlined links that open in the browser instead of file cards that download raw HTML (most visible after a bot conversation is escalated to a Happiness Engineer).

Design note — reuse over rewrite

The combined list uses the new unified endpoint; detail and replies reuse the existing per-type screens and endpoints (supportBots / supportTickets, still present), branched by type. This achieves the user-visible unification with minimal risk and no rewrite of the working bot/HE detail UIs.

The legacy Zendesk flow remains gated behind FeatureFlag.newSupport (shown when the flag is off) and is unchanged.

Not yet done / follow-ups

  • Route detail + replies through replyToUnifiedConversation (with encryptedLogIds) for full endpoint parity, and surface bot citation links inside the bot chat (the reused BotMessage model carries no attachments today — citations currently appear only via the HE attachment path post-escalation).
  • Remove the now-unused separate list screens (ConversationListView, SupportConversationListView) — left in place for now to keep the diff small.
  • Analytics event for the unified list; confirm the bot id (jetpack-chat-mobile vs Android's jetpack-workflow-chat_mobile_support).
  • Verification: not built locally (no Xcode build available in this environment). Needs a build + on-device pass with FeatureFlag.newSupport enabled.

🤖 Generated with Claude Code

adalpari added 3 commits June 30, 2026 16:52
Add the data layer for the unified support conversations list, backed by
the new wordpress-rs `unifiedConversations` endpoint:

- UnifiedConversationItem model (combined bot + Happiness Engineer list
  entry) with isBot branching and server-status mapping.
- UnifiedConversationDataProvider protocol + loadUnifiedConversations() on
  SupportDataProvider.
- WpUnifiedConversationDataProvider using
  api.unifiedConversations.getUnifiedConversationList(), mapping
  UnifiedConversationSummary to the combined item.
- Mock provider + sample data for previews.

Conversation detail and replies continue to use the existing per-type data
sources, branched on the item type.
Replace the two separate "Ask the Bots" and "Ask the Happiness Engineers"
entries in the support hub with a single "Get help" entry that opens the
unified conversations list.

- UnifiedConversationListView shows bot chats and HE tickets in one combined
  list (loaded from the unified endpoint), with bot rows badged and HE rows
  showing their status, plus pull-to-refresh and a + button to start a new
  bot chat.
- Each row routes into the existing detail experience branched on type: the
  chat-style bot ConversationView, or the ticket-style SupportConversationView
  (both reuse the existing per-type detail/reply code unchanged).
- RootSupportView now shows one Get help link instead of two.

The legacy Zendesk support flow remains gated behind FeatureFlag.newSupport
(shown when the flag is off) and is unchanged.
Port WordPress-Android#23011. Bot replies can include text/html "citation"
attachments that are web links to help articles, not downloadable files.
Previously these rendered as file cards; tapping one would try to download
raw HTML. This is most visible after a conversation is escalated to a
Happiness Engineer, where the bot's earlier messages render through the
ticket attachment path.

- Add Attachment.isLink for text/html content types.
- AttachmentListView partitions link attachments out of the file grid and
  renders them as tappable, underlined links that open in the browser.
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number32955
VersionPR #25720
Bundle IDorg.wordpress.alpha
Commit069324d
Installation URL65spnvtp5j970
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number32955
VersionPR #25720
Bundle IDcom.jetpack.alpha
Commit069324d
Installation URL5eoe38h7lcjr8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

adalpari and others added 3 commits June 30, 2026 17:38
The + (new conversation) button in the unified list was disabled unless the
account had the .createChatConversation permission, which reflects Happiness
Engineer / support eligibility. Starting a bot chat shouldn't require that —
on accounts without support eligibility the button was permanently disabled,
so new conversations couldn't be created at all.

Remove the gate so any signed-in user can start a bot chat (matching the
Android unified flow); HE eligibility still applies inside the ticket reply
flow.
- Drop unused stored attributedDescription on UnifiedConversationItem;
  derive plainTextDescription locally in init
- Move displayTitle onto the model where it belongs
- Share a static RelativeDateTimeFormatter instead of allocating one per call
- Refresh the relative timestamp every 60s rather than every second
- Flatten a redundant nested VStack in the row

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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