Add Compose-based RS post list for self-hosted sites#22596
Add Compose-based RS post list for self-hosted sites#22596
Conversation
Introduce a new post list screen powered by wordpress-rs for self-hosted sites with application passwords, gated behind an RS_POST_LIST experimental feature flag. Uses WpSelfHostedService with observable metadata collections for reactive data loading with caching, pagination, and pull-to-refresh across Published, Drafts, Scheduled, and Trashed tabs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…cription - Register DatabaseChangeNotifier with WpApiCache so SQLite update hooks fire and observers get notified when data changes - Load items explicitly after refresh/loadNextPage as a safety net - Clear isLoading on refresh errors to prevent stuck loading state - Use PrimaryScrollableTabRow to prevent tab labels from wrapping - Update experimental feature description to mention application passwords Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All UniFFI/wordpress-rs operations (service creation, collection setup, refresh, loadItems, loadNextPage, listInfo) now run on Dispatchers.IO instead of blocking the main thread. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…button, strip HTML - Reduce shimmer alpha range for a subtler placeholder effect - Use existing per-tab empty state strings from the old post list - Add "Create a post" button on empty state via ActivityLauncher - Strip HTML tags from post excerpts using HtmlCompat Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parse ISO 8601 dates and display as relative time spans (e.g. "5 min ago", "2 days ago", "In 3 hours"). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove PostRsListUiEvent sealed class, unused _events/events SharedFlow, and unused refreshAllTabs() method. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace force-unwraps on site credentials with require() check - Remove unused clearService() method - Fix SimpleDateFormat thread safety by creating per-call instances - Fix date timezone: post.date is site-local, not UTC - Replace all hardcoded strings with string resources: - Status labels use existing post_status_* resources - Error messages use error_generic and existing strings - "(Untitled)" uses untitled_in_parentheses - "Failed to load post" and "Custom" status added as new resources - Inject ResourceProvider into ViewModel for string resolution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bridges from wordpress-rs remote post IDs to FluxC local post IDs by looking up or fetching the post via PostStore before launching the editor. Also adds KDocs to key methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve all detekt issues: suppress TooGenericExceptionCaught for FFI calls, refactor ReturnCount violations, and extract helpers to fix LongMethod in initTab. Also add a FloatingActionButton for creating new posts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use colorOnSurface/surface instead of colorPrimary to match the existing WordPress.FloatingActionButton style used elsewhere. 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/jetpackVanillaRelease/base_manifest.txt 2026-02-14 16:24:54.689960206 +0000
+++ ./build/reports/diff_manifest/WordPress/jetpackVanillaRelease/head_manifest.txt 2026-02-14 16:24:57.379967288 +0000
@@ -599,6 +599,10 @@
android:launchMode="singleTop"
android:theme="@style/WordPress.NoActionBar" />
<activity
+ android:name="org.wordpress.android.ui.postsrs.PostRsListActivity"
+ android:label=""
+ android:theme="@style/WordPress.NoActionBar" />
+ <activity
android:name="org.wordpress.android.ui.pages.PagesActivity"
android:label="@string/my_site_btn_site_pages"
android:launchMode="singleTop"Go to https://buildkite.com/automattic/wordpress-android/builds/25012/canvas?sid=019c5cf2-0588-4c19-99bb-8eec3717cf21, click on the |
Project manifest changes for WordPressThe following changes in the --- ./build/reports/diff_manifest/WordPress/wordpressVanillaRelease/base_manifest.txt 2026-02-14 16:23:42.083478583 +0000
+++ ./build/reports/diff_manifest/WordPress/wordpressVanillaRelease/head_manifest.txt 2026-02-14 16:23:44.193456187 +0000
@@ -405,6 +405,10 @@
android:launchMode="singleTop"
android:theme="@style/WordPress.NoActionBar" />
<activity
+ android:name="org.wordpress.android.ui.postsrs.PostRsListActivity"
+ android:label=""
+ android:theme="@style/WordPress.NoActionBar" />
+ <activity
android:name="org.wordpress.android.ui.pages.PagesActivity"
android:label="@string/my_site_btn_site_pages"
android:launchMode="singleTop"Go to https://buildkite.com/automattic/wordpress-android/builds/25012/canvas?sid=019c5cf2-0587-420a-96b6-15365dac2349, click on the |
…fety - Save/restore pendingPostRemoteId across configuration changes - Show a loading indicator while fetching a post for the editor - Show a toast when post fetch fails - Add @synchronized to getOrCreateCache for thread safety - Document main-thread access invariant on ViewModel maps 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>
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>
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>
…lank line Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…status Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…Model Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scheduled posts show an abbreviated absolute date, posts less than a year old show relative time, and older posts show an absolute date. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The site-local date was being compared against UTC system time, causing incorrect results like "In 4hr." for just-published posts. Now uses post.dateGmt which is already a UTC Date object. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added verticalScroll to EmptyContent and ErrorContent so PullToRefreshBox can detect the pull gesture via nested scrolling. 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>
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>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use snapshotFlow on settledPage instead of LaunchedEffect inside the HorizontalPager content so that only the visible tab is initialized on launch and others are deferred until swiped to. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|





Description
Adds a new Compose-based post list screen powered by wordpress-rs for self-hosted sites with
application passwords enabled, gated behind the "New Post List" experimental feature flag.
This will eventually replace the existing FluxC-based post list with one that uses
WpSelfHostedServicefromthe wordpress-rs library for all data operations.
Limitations
There is a lot of missing functionality which will be added over time:
Also, note that opening a post in the editor only works if the post already exists in FluxC (since the editor loads the local post from FluxC). For this reason I recommend refreshing the "old" post list before enabling the feature flag for the new post list to ensure posts are loaded.
New files
PostRsListActivity— Compose activity with FluxC bridge for opening posts in the editorPostRsListViewModel— manages observable collections per tab via wordpress-rsPostRsListTab— enum defining Published, Drafts, Scheduled, Trashed tabsPostRsListUiState— UI state models and PostItemState-to-UI mappingWpSelfHostedServiceProvider— singleton that creates/caches WpSelfHostedService per sitePostRsListScreen— main Scaffold with tabs, pager, and FABPostRsTabListScreen— per-tab content with pull-to-refresh and paginationPostRsListItem— post row with content, shimmer placeholder, and error statesKey behaviors
!site.isWPComANDsite.hasApplicationPassword()Dispatchers.IOTesting instructions
Enable RS Post List:
Verify post list:
rsposts.mp4