Add new post list powered by wordpress-rs#22585
Conversation
Introduces a new post list feature behind the POSTS_RS_LIST experimental feature flag. When enabled on a site with an application password, tapping Posts in My Site opens the new Compose-based list instead of the existing FluxC-based one. The implementation follows the nav menus architecture: - PostRsRestClient fetches posts via wordpress-rs uniffi bindings - PostRsListViewModel manages per-tab StateFlows with pagination - Compose screens with PrimaryTabRow, PullToRefreshBox, LazyColumn - Tabs: Published, Drafts, Scheduled, Trashed - Tapping a post opens the existing editor via PostStore lookup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use a single consistent empty message across all tabs and add a "Create a post" button below it using existing translated strings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The WP REST API returns dates without timezone info. Normalize them by appending +0000 before parsing so dateUTCFromIso8601 handles them correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove unnecessary mainDispatcher, flatten nested withContext calls, inline single-use loadPosts wrapper, remove duplicate onTabSelected call in onCreate, and drop redundant site null check in onPostClicked. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the experimental feature check from MySiteFragment and MenuActivity into ActivityLauncher.viewCurrentBlogPosts, removing duplicated logic and ExperimentalFeatures injection from both classes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove duplicate ExperimentalFeatures import in ActivityLauncher and rename posts_rs package to postsrs to satisfy detekt PackageNaming rule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move PostRsListContent and TabContent composables into a new PostRsListScreen.kt in the screens package, keeping the activity focused on wiring and navigation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Listen for FluxC OnPostUploaded events via the Dispatcher so the current tab refreshes after a new post is uploaded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generated by 🚫 Danger |
Project manifest changes for WordPressThe following changes in the --- ./build/reports/diff_manifest/WordPress/wordpressVanillaRelease/base_manifest.txt 2026-02-12 14:46:25.109312689 +0000
+++ ./build/reports/diff_manifest/WordPress/wordpressVanillaRelease/head_manifest.txt 2026-02-12 14:46:27.949311028 +0000
@@ -926,6 +926,11 @@
android:name="org.wordpress.android.ui.navmenus.NavMenusActivity"
android:label="@string/menus"
android:launchMode="singleTop"
+ android:theme="@style/WordPress.NoActionBar" />
+ <activity
+ android:name="org.wordpress.android.ui.postsrs.PostRsListActivity"
+ android:label="@string/my_site_btn_blog_posts"
+ android:launchMode="singleTop"
android:theme="@style/WordPress.NoActionBar" /> <!-- Plugins -->
<activity
android:name="org.wordpress.android.ui.plugins.PluginDetailActivity"Go to https://buildkite.com/automattic/wordpress-android/builds/24974/canvas?sid=019c524a-78d7-49b0-9b7f-1bc35dd92a28, click on the |
Project manifest changes for WordPressThe following changes in the --- ./build/reports/diff_manifest/WordPress/jetpackVanillaRelease/base_manifest.txt 2026-02-12 14:46:12.996818181 +0000
+++ ./build/reports/diff_manifest/WordPress/jetpackVanillaRelease/head_manifest.txt 2026-02-12 14:46:16.366847100 +0000
@@ -953,6 +953,11 @@
android:name="org.wordpress.android.ui.navmenus.NavMenusActivity"
android:label="@string/menus"
android:launchMode="singleTop"
+ android:theme="@style/WordPress.NoActionBar" />
+ <activity
+ android:name="org.wordpress.android.ui.postsrs.PostRsListActivity"
+ android:label="@string/my_site_btn_blog_posts"
+ android:launchMode="singleTop"
android:theme="@style/WordPress.NoActionBar" /> <!-- Plugins -->
<activity
android:name="org.wordpress.android.ui.plugins.PluginDetailActivity"Go to https://buildkite.com/automattic/wordpress-android/builds/24974/canvas?sid=019c524a-78da-4836-8c01-7d4c6444d25b, click on the |
|
|
|
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #22585 +/- ##
==========================================
- Coverage 38.17% 37.99% -0.18%
==========================================
Files 2238 2247 +9
Lines 111808 112348 +540
Branches 15591 15642 +51
==========================================
+ Hits 42680 42684 +4
- Misses 65588 66123 +535
- Partials 3540 3541 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
WordPress/src/main/java/org/wordpress/android/ui/postsrs/PostRsListActivity.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/postsrs/screens/ScrollObservers.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/postsrs/PostRsListViewModel.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/postsrs/PostRsListActivity.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/postsrs/PostRsListUiState.kt
Outdated
Show resolved
Hide resolved
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass PostStatus enum through PostRsModel instead of converting to/from strings, eliminating the fragile string matching in mapStatusLabel. Remove the redundant LaunchedEffect that called onTabSelected on every tab recomposition. The initial tab now loads in the ViewModel init block instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This comment was marked as outdated.
This comment was marked as outdated.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolved here: 4493382 |
Resolve merge conflicts in ExperimentalFeatures.kt and strings.xml, keeping the POSTS_RS_LIST flag while removing NAV_MENUS since the nav menus feature no longer needs gating. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from listWithEditContext to listWithViewContext so users without edit_posts capability can use the post list feature. The rendered fields are already HTML-stripped downstream. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Closing this. I misunderstood that the wp-rs post list offers post caching for self-hosted sites, but not wp.com, so this will be redone using caching for just self-hosted. |





Description
Adds a new Compose-based post list screen backed by the
wordpress-rsREST API. The feature is gated behind an experimental feature flag (posts_rs_list) and requires the site to have an Application Password configured.Key changes:
PostRsListActivitywith tabbed post list (Published, Drafts, Scheduled, Trashed)PostRsListViewModelwith pagination, pull-to-refresh, and FluxCOnPostUploadedlistener for auto-refreshPostRsRestClientfetching posts via wordpress-rsWpApiClientpostsrs/screens/package with Material 3 componentsExperimentalFeaturesLimitations
There is a lot of functionality left to implement, notably search, author names, and the dot-dot-dot menu. These will come later, as will tests.
Also note that since the post editor relies on FluxC, with the new post list you can only edit posts that have already been downloaded by FluxC. So before enabling the experimental feature flag, I recommend refreshing the "old" post list to ensure you have the latest posts.
Testing instructions
Enable the experimental feature:
View the new post list:
Create a new post:
Fallback to old list:
posts-rs.mp4