Skip to content

Migrate FetchAllDomainsUseCase and domain management UI from FluxC to wordpress-rs#22900

Draft
oguzkocer wants to merge 2 commits into
trunkfrom
integrate-wordpress-rs-all-domains
Draft

Migrate FetchAllDomainsUseCase and domain management UI from FluxC to wordpress-rs#22900
oguzkocer wants to merge 2 commits into
trunkfrom
integrate-wordpress-rs-all-domains

Conversation

@oguzkocer
Copy link
Copy Markdown
Contributor

Description

Replace FluxC's SiteStore.fetchAllDomains() and related domain management types with direct wordpress-rs API calls:

  • Fetch all domains via WpComApiClient.domains().allDomains()
  • FetchAllDomainsUseCase now uses wordpress-rs instead of SiteStore
  • DomainManagementViewModel uses AllDomainItem instead of AllDomainsDomain
  • DomainsDashboardViewModel updated for the shared FetchAllDomainsUseCase change
  • DomainLocalSearchEngine and GetDomainDetailsUrl adapted for AllDomainItem
  • Status color mapping uses DomainListItemStatusType instead of StatusType
  • Compose previews updated for wordpress-rs types
  • Bump wordpress-rs to include SiteRedirect subtype and Alert/Neutral/Premium status type variants

Testing instructions

  • Compare the Me > Domains list screen before and after this change.

@oguzkocer oguzkocer added this to the 26.9 milestone May 27, 2026
@dangermattic
Copy link
Copy Markdown
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Copy Markdown
Contributor

Project dependencies changes

list
! Upgraded Dependencies
rs.wordpress.api:android:trunk-99776d6504632951fe57fa044d26612d13a1629b, (changed from trunk-e72723b903746f1505c8f0df1e3634dfa50e2d36)
rs.wordpress.api:kotlin:trunk-99776d6504632951fe57fa044d26612d13a1629b, (changed from trunk-e72723b903746f1505c8f0df1e3634dfa50e2d36)
tree
 +--- project :libs:fluxc
-|    \--- rs.wordpress.api:android:trunk-e72723b903746f1505c8f0df1e3634dfa50e2d36
-|         +--- 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:trunk-e72723b903746f1505c8f0df1e3634dfa50e2d36
-|         |    +--- 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:trunk-99776d6504632951fe57fa044d26612d13a1629b
+|         +--- 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:trunk-99776d6504632951fe57fa044d26612d13a1629b
+|         |    +--- 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:trunk-e72723b903746f1505c8f0df1e3634dfa50e2d36 (*)
+\--- rs.wordpress.api:android:trunk-99776d6504632951fe57fa044d26612d13a1629b (*)

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented May 27, 2026

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

App NameJetpack Android
Build TypeDebug
Versionpr22900-e048efc
Build Number1489
Application IDcom.jetpack.android.prealpha
Commite048efc
Installation URL1ve8o66fj6sdg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented May 27, 2026

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

App NameWordPress Android
Build TypeDebug
Versionpr22900-e048efc
Build Number1489
Application IDorg.wordpress.android.prealpha
Commite048efc
Installation URL6i1s49ku1g388
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

❌ Patch coverage is 25.53191% with 140 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.33%. Comparing base (c45547a) to head (e048efc).

Files with missing lines Patch % Lines
...s/android/ui/domains/management/DomainsListCard.kt 0.00% 54 Missing ⚠️
...s/android/ui/domains/management/DomainStatusRow.kt 0.00% 40 Missing ⚠️
...ui/domains/management/DomainManagementViewModel.kt 29.78% 33 Missing ⚠️
...ss/android/ui/domains/DomainsDashboardViewModel.kt 37.50% 5 Missing and 5 partials ⚠️
...roid/ui/domains/usecases/FetchAllDomainsUseCase.kt 85.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #22900      +/-   ##
==========================================
- Coverage   37.33%   37.33%   -0.01%     
==========================================
  Files        2319     2319              
  Lines      124674   124746      +72     
  Branches    16951    16963      +12     
==========================================
+ Hits        46551    46571      +20     
- Misses      74361    74416      +55     
+ Partials     3762     3759       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

oguzkocer added 2 commits May 29, 2026 17:13
…to wordpress-rs

Replace FluxC's `SiteStore.fetchAllDomains()` with direct wordpress-rs
API call via `WpComApiClient.domains().allDomains()`.

- `FetchAllDomainsUseCase` now uses wordpress-rs instead of `SiteStore`
- `DomainManagementViewModel` uses `AllDomainItem` instead of `AllDomainsDomain`
- `DomainsDashboardViewModel` updated for the shared `FetchAllDomainsUseCase` change
- `DomainLocalSearchEngine` and `GetDomainDetailsUrl` adapted for `AllDomainItem`
- Status color mapping uses `DomainListItemStatusType` instead of `StatusType`
- Compose previews updated for wordpress-rs types
- Bump wordpress-rs to include `Alert`/`Neutral`/`Premium` status type variants
Bump wordpress-rs to pick up the `SiteRedirect` variant and replace
the `Other("redirect")` workaround in `GetDomainDetailsUrl`.
@oguzkocer oguzkocer force-pushed the integrate-wordpress-rs-all-domains branch from 97f07de to e048efc Compare May 29, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants