CMM-2390 Fetch all terms in post editor picker - #23292
Open
nbradbury wants to merge 4 commits into
Open
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
|
|
Contributor
|
|
This comment was marked as resolved.
This comment was marked as resolved.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #23292 +/- ##
==========================================
+ Coverage 37.93% 38.03% +0.10%
==========================================
Files 2352 2352
Lines 128925 128873 -52
Branches 17940 17934 -6
==========================================
+ Hits 48907 49021 +114
+ Misses 76012 75830 -182
- Partials 4006 4022 +16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nbradbury
marked this pull request as draft
September 3, 2026 19:12
loadFirstPage() launched a fresh coroutine on every call — init, retry, after creating a term, and after a debounced search — without cancelling the previous one. Now that a load walks every page, two loads can easily overlap: the newer one clears loadedTerms while the older one is still suspended mid-fetch, and the older one then appends its remaining pages into the list, mixing unfiltered terms into search results. Track the load as a Job and cancel it at the top of loadFirstPage(). fetchAllPages only touches loadedTerms after resuming from withContext, which throws CancellationException once the job is cancelled, so the abandoned load can no longer publish. No onCleared() override is needed — viewModelScope already cancels its children.
nbradbury
marked this pull request as ready for review
September 3, 2026 21:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes CMM-2390
The Problem
The new wordpress-rs Compose term picker loads terms 100 at a time and only advances when the user taps a "Load more" row. On a site with more than 100 categories or tags, the picker shows exactly 100 and looks truncated.
The Solution
Testing
Verify: