feat: add per-app component search#361
Open
Kateřina Beňová (KatBen-Make) wants to merge 5 commits into
Open
Conversation
Right-click an app in the Custom apps tree -> "Search components..." opens a Quick Pick listing the app's connections, webhooks, modules, RPCs and functions, filterable by label or name (useful when a component's name differs from its label). Selecting a result reveals and selects the component in the tree. Shared fetch/build logic lives in src/libs/app-component-search.ts and is consumed by AppsProvider to avoid duplicating it across tree providers. A failed component fetch is distinguished from a genuinely empty app so the "no components" message is not shown on top of an error. Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot started reviewing on behalf of
Kateřina Beňová (KatBen-Make)
June 26, 2026 14:59
View session
Generated |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a per-app “Search components…” action in the Custom apps tree, enabling a Quick Pick search across an app’s connections/webhooks/modules/RPCs/functions (matching by label or internal name) and revealing the selected component in the tree.
Changes:
- Introduces a shared
src/libs/app-component-search.tshelper to fetch component summaries across multiple endpoints and rebuild reveal-compatible tree items. - Exposes thin delegation methods on
AppsProviderand wires a new command (apps-sdk.app.search-components) into extension activation. - Adds unit tests for response unwrapping, label fallback, and the deterministic tree-id contract; contributes the command + context menu entry in
package.json.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/providers/AppsProvider.js | Adds delegating methods to fetch per-app component summaries and rebuild tree items for reveal. |
| src/libs/app-component-search.ts | New shared helper implementing multi-group fetch + summary mapping + reveal-compatible Item reconstruction. |
| src/libs/app-component-search.test.ts | Unit tests covering id contract, v1/v2 unwrap behavior, and label/type mapping. |
| src/extension.ts | Registers the new app context-menu command: progress fetch → Quick Pick → TreeView.reveal. |
| package.json | Contributes the new command and adds it to the Custom apps view item context menu. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Connections use a string type (e.g. 'oauth') in the tree model (Item.type), not just a numeric module type id. Widen the type and clarify the JSDoc so the summary faithfully mirrors Item.type and connection type info is not misrepresented. Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot started reviewing on behalf of
Kateřina Beňová (KatBen-Make)
June 26, 2026 15:20
View session
The label fallback (`name + args`) in toComponentSummary is not gated on component type; it applies to any type and in practice only functions lack a label. Reword the interface JSDoc and function comment to match the behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot started reviewing on behalf of
Kateřina Beňová (KatBen-Make)
June 26, 2026 15:33
View session
buildComponentTreeItem used the API plural (e.g. "modules") as the Group label,
whereas the real tree humanizes it ("Modules", "Remote procedures"). reveal may
render the passed parent chain, so this could show the wrong label/casing. Map
groupPlural to the same labels as AppsProvider.getChildren while keeping the
deterministic id (groupPlural) reveal matches on.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot started reviewing on behalf of
Kateřina Beňová (KatBen-Make)
June 26, 2026 15:56
View session
- fetchAppComponentsSummary: rpGet already logs the failure at error level via showAndLogError before throwing, so downgrade the per-group catch to warn and guard against non-Error throws (String(err)). - buildComponentTreeItem: rebuild the group/item pending-change subsets from appNode.changes (same group normalization + item filter as getChildren) so a revealed node renders the "changed" marker like the lazily-built tree, instead of always passing changes = []. Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot started reviewing on behalf of
Kateřina Beňová (KatBen-Make)
June 26, 2026 16:58
View session
Artem Khvostyk (KUSTIKs)
left a comment
There was a problem hiding this comment.
In general I see a lot of any types. Is it possible to define them more strictly?
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.
Jira: https://make.atlassian.net/browse/IEN-15704
Summary
Adds a per-app component search. Right-click an app in the Custom apps tree → Search components... opens a Quick Pick listing that app's connections, webhooks, modules, RPCs and functions, filterable by label or name (handy when a component's internal name differs from its label). Selecting a result reveals and selects the component in the tree.
Details
src/libs/app-component-search.ts:fetchAppComponentsSummary()fetches all five component types, faithfully mirroring the level-2 logic inAppsProvider.getChildren(v1/v2 response unwrap, unversioned connection/webhook URIs, tree label fallbacks). Each type is fetched independently so one failing/missing endpoint doesn't break the rest, andfailedGroupslets the caller tell a genuinely empty app from a failed load.buildComponentTreeItem()rebuilds a node with deterministic ids matching the lazy tree, soTreeView.revealresolves it.AppsProviderexposes thin delegating methods (logic kept insrc/libs/to avoid duplication across tree providers, per repo convention).apps-sdk.app.search-components(inextension.ts):withProgressfetch → Quick Pick (matchOnDescription/matchOnDetail) →reveal. Wrapped incatchError, guarded bycontextGuard. Does not callrefresh()(preserves the background icon cache).package.json: command contribution +view/item/contextentry (viewItem =~ /^app/) so it appears on every app variant.Test plan
src/libs/app-component-search.test.ts(id contract, v1/v2 unwrap, label fallback) run in CI.Notes
rpc:/// IML function references is intentionally out of scope; planned as a follow-up branch that will reuse this helper.