-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Media search by title #22471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Media search by title #22471
Conversation
Media search now includes FILE_NAME in addition to TITLE, CAPTION, and DESCRIPTION. This allows users to find media by searching for the original filename. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, media search only worked on locally cached media. Now the search term is passed to the WordPress.com REST API via the "search" parameter, allowing users to find media that hasn't been loaded yet. Changes: - Add searchTerm field to FetchMediaListPayload - Pass search parameter to WordPress.com media API endpoint - Update MediaLibraryDataSource to pass filter to network request Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Generated by 🚫 Danger |
|
Claude finished @nbradbury's task in 1m 11s —— View job Code Review CompleteI've reviewed the PR implementing server-side media search functionality. This is a well-structured change that properly threads the search parameter through the architecture layers. Here's my detailed feedback: Tasks
OverviewThe implementation successfully adds server-side search support for media by:
Code Quality ✅Strengths:
Minor Observations:
Security ✅No issues found:
Performance 📊Good practices observed:
Potential consideration:
Testing
|
|
| App Name | WordPress | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22471-e65762a | |
| Commit | e65762a | |
| Direct Download | wordpress-prototype-build-pr22471-e65762a.apk |
|
| App Name | Jetpack | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22471-e65762a | |
| Commit | e65762a | |
| Direct Download | jetpack-prototype-build-pr22471-e65762a.apk |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #22471 +/- ##
==========================================
+ Coverage 39.12% 39.14% +0.02%
==========================================
Files 2205 2205
Lines 106684 106702 +18
Branches 15138 15140 +2
==========================================
+ Hits 41741 41772 +31
+ Misses 61445 61424 -21
- Partials 3498 3506 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add MediaRestClientTest with tests verifying search parameter is passed to the WordPress.com REST API endpoint - Add FILE_NAME search tests to MediaStoreTest to verify local database search includes file names Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added in a7fbc3c |
adalpari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfectly working for WP sites, which I guess is the scope.
I just left a comment about self-hosted sites.
![]()
The search term was only being passed to the WordPress.com REST client. Self-hosted sites use different clients that weren't receiving the search term. Changes: - Add searchTerm parameter to MediaRSApiRestClient.fetchMediaList() - Add searchTerm parameter to BaseWPV2MediaRestClient.fetchMediaList() - Pass searchTerm to all REST API clients in MediaStore Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Thanks for catching that! It hadn't occurred to me that self-hosted uses a different endpoint. Fixed in e65762a |
|
Thank you for the fix! |






Fixes CMM-1128
Previously, media search only worked on locally cached media. In addition, the network request failed to pass along the search query.
Now the search query is passed to the WordPress.com REST API via the "search" parameter, allowing users to find media that hasn't been loaded yet. I also added
filenameto the local search.To test: