fix(algolia): tighten tools.config, add geo/facet search + task-status tool; icon/color tweaks#5356
Conversation
…arch, task status tool - move all tools.config coercion/remapping out of tool() into a proper params() function so dynamic block references aren't destroyed before variable resolution - wire facets and getRankingInfo into the search tool so those documented outputs are actually reachable - add geo-search (aroundLatLng/aroundRadius/insideBoundingBox/insidePolygon) to search and browse_records, matching delete_by_filter - fix aroundRadius param type (string, not number, since it accepts "all") - sync batch_operations description with the real action set (delete, clear) - consolidate list_indices pagination into the shared page/hitsPerPage fields instead of duplicate listPage/listHitsPerPage - add algolia_get_task_status tool so workflows can poll a taskID instead of guessing when a write is applied - trim indexName/objectID/destination before building request URLs - add ranking-tuning and index-snapshot skills to AlgoliaBlockMeta fix(dropcontact): swap icon to the official wordmark's teal swirl mark, bgColor to match chore(grafana): bgColor to white to match brand tile convention
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Dropcontact and Grafana are presentation-only: official teal swirl icon and Reviewed by Cursor Bugbot for commit 96ad66a. Configure here. |
…Page CI's subblock-id stability check correctly flagged that consolidating list_indices pagination into the shared page/hitsPerPage fields would silently drop values from already-deployed workflows. Add the rename mapping so existing saved state migrates instead of being lost.
Greptile SummaryThis PR is a comprehensive overhaul of the Algolia integration: it fixes a param-remapping bug where the old
Confidence Score: 5/5Safe to merge — the refactoring is mechanically sound, the migration covers existing workflows, and no regressions were found in the new tool or parameter wiring. The No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[AlgoliaBlock\noperation dropdown] -->|tool selector| B["tool: params => `algolia_${params.operation}`"]
A -->|param builder| C[params: strips 'operation',\nfilters empty values,\napplies toBool coercions,\nrenames aliased keys]
C --> D{operation?}
D -->|search| E[algolia_search\n+facets, getRankingInfo,\ngeo-search params]
D -->|browse_records| F[algolia_browse_records\n+geo-search params]
D -->|list_indices| G[algolia_list_indices\nshared page/hitsPerPage\nvia -dsn cluster]
D -->|get_task_status| H[algolia_get_task_status\nGET /task/:taskID\nvia -dsn cluster]
D -->|copy_move_index| I[algolia_copy_move_index\ncopyMoveOperation → operation]
D -->|delete_by_filter| J[algolia_delete_by_filter\ndeleteFilters → filters\naroundRadius as string]
D -->|get_records| K[algolia_get_records\ngetRecordsRequests → requests]
H -->|output| L[status: published\nor notPublished]
E -->|outputs| M[hits, facets,\nfacets_stats,\n_rankingInfo]
subgraph Migration
N[listPage → page\nlistHitsPerPage → hitsPerPage]
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[AlgoliaBlock\noperation dropdown] -->|tool selector| B["tool: params => `algolia_${params.operation}`"]
A -->|param builder| C[params: strips 'operation',\nfilters empty values,\napplies toBool coercions,\nrenames aliased keys]
C --> D{operation?}
D -->|search| E[algolia_search\n+facets, getRankingInfo,\ngeo-search params]
D -->|browse_records| F[algolia_browse_records\n+geo-search params]
D -->|list_indices| G[algolia_list_indices\nshared page/hitsPerPage\nvia -dsn cluster]
D -->|get_task_status| H[algolia_get_task_status\nGET /task/:taskID\nvia -dsn cluster]
D -->|copy_move_index| I[algolia_copy_move_index\ncopyMoveOperation → operation]
D -->|delete_by_filter| J[algolia_delete_by_filter\ndeleteFilters → filters\naroundRadius as string]
D -->|get_records| K[algolia_get_records\ngetRecordsRequests → requests]
H -->|output| L[status: published\nor notPublished]
E -->|outputs| M[hits, facets,\nfacets_stats,\n_rankingInfo]
subgraph Migration
N[listPage → page\nlistHitsPerPage → hitsPerPage]
end
Reviews (5): Last reviewed commit: "fix(algolia): correct batch_operations b..." | Re-trigger Greptile |
Algolia's Get Task Status response (additionalProperties: false) only returns `status` (published | notPublished) — pendingTask belongs to the List Indices response, not this endpoint. Drop it from the tool's output, response type, and block outputs rather than inventing data.
…as from real booleans, not just strings A wired <Block.output> boolean (e.g. true) failed the `=== 'true'` string-only checks and silently flipped to the wrong value. Add a toBool helper that accepts both the dropdown's string values and a genuine boolean passed in via a dynamic reference. fix(dropcontact): render icon with currentColor instead of hardcoded fill The new teal swirl mark's fill (#0ABA9F) matched the block's bgColor exactly, making the icon invisible on its own tile. Use currentColor and set iconColor so the shared tile-contrast logic (getTileIconColorClass) renders it white-on-teal like the rest of the brand icon system.
|
@greptile review |
|
@cursor review |
Greptile caught that search.ts's body-level indexName (sent inside the multi-query POST body, not URL-encoded) wasn't trimmed like every other tool's URL-path indexName. Fixed there and in get_records.ts's per-request indexName default/override, which had the same gap.
|
Fixed in 1a8b0c3 — |
… read host Verified against Algolia's official JS client source (getDefaultHosts + transporter isRead = useReadTransporter || method === 'GET'): every GET request routes to the read (-dsn) host, matching the other 14 tools in this integration (get_record, get_settings, etc). Both tools were incorrectly hitting the write host.
|
@greptile review |
|
@cursor review |
The get_task_status pendingTask output was removed from code in d102129 (fabricated field, not in Algolia's real API response) but docs weren't regenerated at the time, leaving a stale entry. Also syncs the Dropcontact icon's currentColor fill into the docs mirror.
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 08c5f7f. Configure here.
Verified against Algolia's actual batchWriteParams schema (specs/common/schemas/Batch.yml): body is a required property on every batch request item, including index-level delete/clear actions — it isn't omittable. The tool's param description previously said to omit it; corrected to say use an empty object instead.
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 96ad66a. Configure here.
Summary
tools.config.toolwas doing param remapping/coercion (createIfNotExists, forwardToReplicas, copyMoveOperation→operation, deleteFilters→filters, getRecordsRequests→requests, list pagination) at serialization time, before variable resolution — this could destroy dynamic<Block.output>references. Split into a puretool()selector and a properparams()function.facetsandgetRankingInfowere never sent by the search tool, so the documentedfacets/facets_stats/_rankingInfooutputs were permanently unreachable. Wired both through.aroundLatLng/aroundRadius/insideBoundingBox/insidePolygon) only existed on delete_by_filter, not on search/browse_records — added to both.aroundRadius's declared type (wasnumber, but the field legitimately accepts"all").batch_operations' param description with the real action set (was missingdelete/clear, present elsewhere).list_indicespagination into the sharedpage/hitsPerPagefields instead of duplicatelistPage/listHitsPerPagesubBlocks + remapping.algolia_get_task_status(every write op returns ataskIDbut there was no way to poll it — cheap, high-leverage addition per the endpoint audit)..trim()on indexName/objectID/destination before building request URLs.AlgoliaBlockMeta, grounded in existing tools.Endpoints intentionally NOT added (from the audit): synonyms/rules management, API key management, multi-cluster, A/B testing, Recommend — all separate products or lower-value relative to core CRUD/search/settings coverage already in place.
Type of Change
Testing
Tested manually;
bun run lintand targeted typecheck clean.Checklist