Native API for retrieving plugins#2037
Native API for retrieving plugins#2037RohitKushvaha01 wants to merge 7 commits intoAcode-Foundation:mainfrom
Conversation
Greptile SummaryThis PR introduces a native Android API for fetching and filtering Several P1 findings from prior review rounds (unbounded fetch loop, missing pagination state in the buffered path response, Confidence Score: 3/5Not safe to merge — multiple prior P1 findings remain unresolved, leaving the buffered filter path unable to paginate and the non-top_rated orderBy path returning empty results. The orderBy path for values other than top_rated always hits a 404 (the /plugin vs /plugins typo), the buffered filter path never returns filterState so pagination is impossible after the first call, an unbounded HTTP loop can exhaust the thread pool on restrictive filters, and the orderBy value is interpolated directly into the URL without encoding. These are all P1 issues raised in previous review rounds that have not been addressed. src/plugins/auth/src/android/PluginRetriever.java requires the most attention — all unresolved P1 findings are concentrated there. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[JS Caller] -->|getAllPlugins / retrieveFilteredPlugins| B[Authenticator.java]
B --> C[ThreadPool]
C --> D[PluginRetriever.java]
D --> E{filter type}
E -->|orderBy top_rated| F[GET /plugins explore=random]
E -->|orderBy other| G[GET /plugin orderBy=value]
E -->|author / keywords / verified / search| H[Loop: GET /plugins paginated]
F --> I[Return items + hasMore + filterState]
G --> J[Return empty - 404 from URL typo]
H --> K[matchesFilter each plugin]
K --> L[Return items + hasMore only - filterState missing]
Reviews (3): Last reviewed commit: "feat: add filterstate" | Re-trigger Greptile |
Usage
const filter = { "type": "orderBy", "value": "top_rated", "nextPage": 1 } const result = await cordova.exec(console.log, console.error, "Authenticator", "retrieveFilteredPlugins", [filter]);