Unify bot and HE support into a single Get help conversations flow#22946
Unify bot and HE support into a single Get help conversations flow#22946adalpari wants to merge 20 commits into
Conversation
Adopts the new WpService(SiteInfo, delegate, cache) constructor in place of the removed WpService.wordpressCom / WpService.selfHosted factories, and wraps UserWithEditContext.extraCapabilities in UserCapabilitiesMap to match the updated type. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wires a new parallel entry point on the Support screen that drives list/detail/reply through the new wordpress-rs unifiedConversations() endpoint, merging HE tickets and AI bot chats into a single chat-style view branching UI on UnifiedMessage.authorRole. Reply UX is an inline input bar gated on UnifiedConversationSummary.canAcceptReply, and a successful reply replaces local state with the server response per the new API contract. The existing HE and AI Bot flows are left unchanged so they can still create new tickets/chats. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
In the unified support detail screen, choose the reply affordance based on the conversation's status: - Bot conversations (status == "bot") keep the always-on inline chat input. - HE conversations that can accept a reply show a Reply button that opens a modal reply sheet reusing the HE TicketMainContentView form. - HE conversations that cannot accept a reply show a closed banner. The unified reply API only accepts a message string, so the reply sheet greys out the screenshots and app-logs controls. To support this without changing existing HE call sites, TicketMainContentView gains optional attachmentsEnabled/appLogsEnabled params that default to its enabled flag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replicate the bot send/receive UX from the AI Bot support screen in the unified detail screen, for bot conversations only (status == "bot"): - Show an animated "bot is typing" indicator while a reply is in flight. - Disable the send button while sending or loading, keeping the input field editable (ChatInputBar now takes canSendMessage). - Auto-scroll to the bottom when the bot starts typing. HE conversations are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make the unified conversations list match the Ask the Happiness Engineers screen and support creating new conversations: - List items now show a status badge, title, timestamp, and description. HE conversations use their ticket status; bot conversations show an "Assistant" chip. - Show a "+" action and an empty-state Create button (the shared list screen renders these when a create callback is provided). - Creating a new conversation starts a bot chat: the first message is created via the AI bot endpoint (createBotConversation) and mapped into a UnifiedConversation, mirroring the Ask the Bots flow. - Centralize the "bot" status as UnifiedConversation.STATUS_BOT/isBot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
For non-bot conversations, the unified detail screen now mirrors the Ask the Happiness Engineers screen instead of the chat-bubble layout: - Status badge + "Last updated" header and a title card (empty top bar). - Full-width message items with an author + timestamp header. - Attachments rendered as a thumbnail grid (auth-header image loading, video first-frame with a play overlay, icon for other files) that open: image -> in-app fullscreen zoom preview, video -> in-app player, other -> system DownloadManager. Bot conversations keep their chat-bubble UI and typing indicator. Reuses the HE fullscreen preview/player composables, VideoDownloadState, ConversationStatusBadge, and AttachmentType. Adds video download + auth header to the unified ViewModel, injects ReaderFileDownloadManager in the Activity, and derives an attachment type on UnifiedAttachment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adapts repository tests to the WpRequestResult.UnknownError statusCode type change (UShort -> UInt). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wires attachment uploads into the unified conversation reply endpoint, which now accepts multipart attachments like HE replies. The reply bottom sheet gets the same screenshot picker and app logs switch as the HE reply sheet, with the form state held in the ViewModel so drafts survive configuration changes and failed sends. Extracts the attachment size validation from HESupportViewModel into a shared AttachmentStateValidator used by both flows, and removes the now-unused attachmentsEnabled/appLogsEnabled flags from TicketMainContentView. Like HE replies, the app logs switch is UI-only until the RS layer supports encrypted log ids for replies. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bumps wordpress-rs to 1379-919351b, which adds encryptedLogIds to ReplyToUnifiedConversationParams. The Include app logs switch in the unified reply form now encrypts and uploads the app logs and sends the resulting UUIDs with the reply, matching the HE new-ticket flow. Extracts the log upload logic from HESupportViewModel into a shared EncryptedAppLogsUploader used by both flows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New bot conversations in the unified screen now show the Ask the Bots welcome header (reused from AIBotConversationDetailScreen), and the first bot reply no longer drops the optimistic user question - the create endpoint only returns the bot messages, so local messages are kept like the Ask the Bots flow does. Bot conversations are labeled Oddie bot in the list pill and above bot message bubbles, with the pill using the same soft green as the user chat bubble. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Removes the old Ask the Bots (support/aibot) and Ask the Happiness Engineers (support/he) screens, superseded by the unified conversations section, now titled "Get help". HE ticket creation is removed: bot conversations get escalated to HE server-side and then show up as HE conversations in the combined list. - Moves the shared models, utils, and UI components from the he/aibot packages into support/unified (attachment state/validation, encrypted logs uploader, temp attachments, fullscreen attachment previews, status badge, ticket content view, relative time formatting). - Merges bot conversation creation into UnifiedSupportRepository, mapping the bot endpoint response directly to UnifiedConversation and dropping the BotConversation/BotMessage models. - Trims the main Support screen to a single Get help option and updates its strings, removing the now-unused activity registrations and ai_bot_/he_support_ strings. - Replaces the deleted tests with UnifiedSupportRepositoryTest and AttachmentStateValidatorTest, and updates SupportViewModelTest. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Removes leftovers flagged in review: the dead NavigateToNewConversation navigation path, the unused nullable create-conversation callback in the shared list components, the duplicate video cache cleanup, and unread model fields (UnifiedMessage.rawText, UnifiedAttachment.size). Simplifies the detail screen by passing the authorization header as a plain string instead of threading a getter lambda through the composable layers, deduplicates the reply sheet dismiss logic, and reuses the shared back/send strings and the Uri.fileSize() extension instead of local duplicates. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Consolidated combined-conversations build; no API adaptations needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Recalculate the attachment total size when removing an attachment so the size meter stays accurate - Surface conversation list API errors as the Error state instead of rendering an empty list - Preserve the bot chat input across configuration changes - Derive the scroll-to-bottom index from the conversation data instead of potentially stale lazy list layout info Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generated by 🚫 Danger |
|
|
|
|
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
…combined-conversations-support # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/postsrs/data/WpServiceProvider.kt # WordPress/src/test/java/org/wordpress/android/support/aibot/repository/AIBotSupportRepositoryTest.kt # WordPress/src/test/java/org/wordpress/android/support/he/repository/HESupportRepositoryTest.kt # gradle/libs.versions.toml
Project manifest changes for WordPressThe following changes in the --- ./build/reports/diff_manifest/WordPress/jetpackRelease/base_manifest.txt 2026-06-08 10:57:15.524394374 +0000
+++ ./build/reports/diff_manifest/WordPress/jetpackRelease/head_manifest.txt 2026-06-08 10:57:20.444419740 +0000
@@ -729,11 +729,6 @@
android:label="@string/subscribers"
android:theme="@style/WordPress.NoActionBar" />
<activity
- android:name="org.wordpress.android.support.aibot.ui.AIBotSupportActivity"
- android:label="@string/ai_bot_conversations_title"
- android:theme="@style/WordPress.NoActionBar"
- android:windowSoftInputMode="adjustResize" />
- <activity
android:name="org.wordpress.android.support.main.ui.SupportActivity"
android:label="@string/support_screen_title"
android:theme="@style/WordPress.NoActionBar" />
@@ -742,8 +737,8 @@
android:label="@string/support_screen_application_logs_title"
android:theme="@style/WordPress.NoActionBar" />
<activity
- android:name="org.wordpress.android.support.he.ui.HESupportActivity"
- android:label="@string/support_screen_title"
+ android:name="org.wordpress.android.support.unified.ui.UnifiedSupportActivity"
+ android:label="@string/unified_support_conversations_title"
android:theme="@style/WordPress.NoActionBar"
android:windowSoftInputMode="adjustResize" /> <!-- Reader Activities -->
<activityGo to https://buildkite.com/automattic/wordpress-android/builds/26752/canvas?sid=019ea6d8-62c7-4014-9c5e-cacd900f8bb9, click on the |
Project manifest changes for WordPressThe following changes in the --- ./build/reports/diff_manifest/WordPress/wordpressRelease/base_manifest.txt 2026-06-08 10:55:33.498021006 +0000
+++ ./build/reports/diff_manifest/WordPress/wordpressRelease/head_manifest.txt 2026-06-08 10:55:38.288062811 +0000
@@ -541,11 +541,6 @@
android:label="@string/subscribers"
android:theme="@style/WordPress.NoActionBar" />
<activity
- android:name="org.wordpress.android.support.aibot.ui.AIBotSupportActivity"
- android:label="@string/ai_bot_conversations_title"
- android:theme="@style/WordPress.NoActionBar"
- android:windowSoftInputMode="adjustResize" />
- <activity
android:name="org.wordpress.android.support.main.ui.SupportActivity"
android:label="@string/support_screen_title"
android:theme="@style/WordPress.NoActionBar" />
@@ -554,8 +549,8 @@
android:label="@string/support_screen_application_logs_title"
android:theme="@style/WordPress.NoActionBar" />
<activity
- android:name="org.wordpress.android.support.he.ui.HESupportActivity"
- android:label="@string/support_screen_title"
+ android:name="org.wordpress.android.support.unified.ui.UnifiedSupportActivity"
+ android:label="@string/unified_support_conversations_title"
android:theme="@style/WordPress.NoActionBar"
android:windowSoftInputMode="adjustResize" /> <!-- Deep Linking Activity -->
<activityGo to https://buildkite.com/automattic/wordpress-android/builds/26752/canvas?sid=019ea6d8-62c5-447b-bf8a-03bfc7e029ec, click on the |
Project dependencies changeslist! Upgraded Dependencies
rs.wordpress.api:android:1288-85a8554663835627ec1980dabd91166ce71bf270, (changed from 0.4.0)
rs.wordpress.api:kotlin:1288-85a8554663835627ec1980dabd91166ce71bf270, (changed from 0.4.0)tree +--- project :libs:fluxc
-| \--- rs.wordpress.api:android:0.4.0
-| +--- com.squareup.okhttp3:okhttp:5.3.2 (*)
-| +--- com.squareup.okhttp3:okhttp-tls:5.3.2
-| | +--- com.squareup.okhttp3:okhttp:5.3.2 (*)
-| | +--- com.squareup.okio:okio:3.16.4 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib:2.2.21 -> 2.3.21 (*)
-| +--- net.java.dev.jna:jna:5.18.1
-| +--- rs.wordpress.api:kotlin:0.4.0
-| | +--- com.squareup.okhttp3:okhttp:5.3.2 (*)
-| | +--- com.squareup.okhttp3:okhttp-tls:5.3.2 (*)
-| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2 -> 1.11.0 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.3.21 (*)
-| \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.3.21 (*)
+| \--- rs.wordpress.api:android:1288-85a8554663835627ec1980dabd91166ce71bf270
+| +--- com.squareup.okhttp3:okhttp:5.3.2 (*)
+| +--- com.squareup.okhttp3:okhttp-tls:5.3.2
+| | +--- com.squareup.okhttp3:okhttp:5.3.2 (*)
+| | +--- com.squareup.okio:okio:3.16.4 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib:2.2.21 -> 2.3.21 (*)
+| +--- net.java.dev.jna:jna:5.18.1
+| +--- rs.wordpress.api:kotlin:1288-85a8554663835627ec1980dabd91166ce71bf270
+| | +--- com.squareup.okhttp3:okhttp:5.3.2 (*)
+| | +--- com.squareup.okhttp3:okhttp-tls:5.3.2 (*)
+| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2 -> 1.11.0 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.3.21 (*)
+| \--- org.jetbrains.kotlin:kotlin-stdlib:2.1.21 -> 2.3.21 (*)
-\--- rs.wordpress.api:android:0.4.0 (*)
+\--- rs.wordpress.api:android:1288-85a8554663835627ec1980dabd91166ce71bf270 (*) |
- Extract the bottom bar and attachment preview overlay into their own composables so UnifiedConversationDetailScreen stays under the cyclomatic complexity threshold - Remove stale translations of the support strings deleted by the consolidation, fixing the ExtraTranslation lint errors Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Covers repository initialization, reply sending (success, failure rollback, offline, app logs, attachments and temp file cleanup), new bot conversation creation, reply form state, video downloads with caching, and encrypted log uploads. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…evalidation - Derive scroll-to-bottom from layoutInfo.totalItemsCount via snapshotFlow instead of hardcoded header/typing/spacer counts - Set _isSendingReply synchronously before launching to close the concurrent send race - Use ConcurrentHashMap for the video cache (accessed from IO coroutines and onCleared) - Revalidate rejected attachments in a single pass so the form state is published only once - Document the intentionally-empty bot top-bar title Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixes the AutoboxingStateCreation lint warning in TypingDot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>


Description
This PR consolidates the experimental "Ask the Bots" (
support.aibot) and "Ask the Happiness Engineers" (support.he) features into a single unified support conversations experience, backed by the new combined-conversations endpoints inwordpress-rs.What changed
support.unifiedpackage:UnifiedSupportActivity,UnifiedSupportViewModel, andUnifiedSupportRepositorydrive a single list + detail flow for all support conversations, using theunifiedConversations()andsupportBots()rs APIs (list, detail, reply with attachments / encrypted app log IDs, new bot chat creation).AIBotSupportActivityandHESupportActivityare removed along with their repositories, view models, and screens (~6.9k lines deleted). Shared pieces (attachment previews, status badge, ticket content view, temp attachment utils) moved fromsupport.hetosupport.unified.wordpress-rsbump:alpha-2026-04-20→1288-85a8554, with mechanical adoption of the newWpService/SiteInfoconstructor andUserCapabilitiesMapinWpServiceProviderandSampleUsers.Notes for reviewers
1288-85a8554); it should move to a tagged release before merge.UnifiedSupportViewModel(optimistic send/rollback, attachments) is planned as a follow-up.Testing instructions
Unified conversations list:
New bot conversation:
HE conversation reply:
Error states:
🤖 Generated with Claude Code