Add paging to the new pages parent picker#23000
Conversation
The "Set Parent" picker previously only offered pages already loaded into the tabs, so on large sites you couldn't choose a parent that hadn't been paged in yet. Give the picker its own observable collection so it pages through and server-searches the full list of eligible published pages. 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. |
Merge the two early-return state guards in onLoadMoreParents into one so the function stays under detekt's return-count limit. Behavior-preserving. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #23000 +/- ##
==========================================
- Coverage 37.46% 37.42% -0.04%
==========================================
Files 2325 2325
Lines 125245 125399 +154
Branches 17171 17205 +34
==========================================
+ Hits 46918 46929 +11
- Misses 74520 74656 +136
- Partials 3807 3814 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude pointed out a medium-severity issue:
|
closeParentPickerCollection only closed the collection object; it did not cancel in-flight launchCollectionJob work. On rapid query changes two createParentPickerCollection IO calls could overlap and complete out of order, leaving parentPickerCollection assigned to a stale query's result. Track the init coroutine in a Job and cancel it before launching a new one. A cancelled job hits the existing CancellationException cleanup (closing the half-built collection) and never reaches the assignment, so the field always reflects the latest query. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Thanks! Addressed in 174b931. |
|
Not a blocker, but the search results blink. I found a situation where it started to blink for like a second. Screen_recording_20260618_142543.mp4 |
|
Is this expected to happen? |
Two parent-picker fixes from review: - loadParentPickerItems published every intermediate loadItems() result, including the transient empty/partial sets emitted during a refresh, flipping the sheet to the spinner/"no results" state and back on each one. Skip publishing an empty list while a load is in progress so the list only updates once real results arrive (or the fetch finishes genuinely empty). - onLoadMoreParents treated FetchException.StaleLoadMore as a user-facing error. It is a benign race (a refresh superseded the page request), so swallow it, clear the spinner, and skip the error snackbar. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The sheet sized itself to its content, so it grew and shrank as the content region swapped between the spinner, the "no results" message and the variable-length candidate list during search. Pin the sheet to a fixed fraction of the screen height and host the content in a weighted box so it always fills the same space. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per Claude: Fixed in 5a164bd
I see what you mean. The bottom sheet resizes during search, first to show an empty list while the search results are being fetched, then again when search results are returned. I addressed this in 8ad34cc by making the sheet a fixed size. |
adalpari
left a comment
There was a problem hiding this comment.
Thank you for the changes, LGTM!


Description
The "Set Parent" picker in the new (wp-rs) pages list previously only offered pages that were already loaded into the tabs. On large sites this meant you couldn't choose a parent that hadn't been paged in yet, and its search field only filtered the loaded candidates.
Testing instructions
Requires a site with the experimental pages list enabled and enough published pages to paginate (more than ~20).
Parent picker paging:
Server-side search:
Selecting a parent: