Skip to content

fix(ui): replace remaining client-side connection filtering with server-side#2850

Open
viktormarinho wants to merge 1 commit intomainfrom
viktormarinho/server-side-conn-5-remaining-filters
Open

fix(ui): replace remaining client-side connection filtering with server-side#2850
viktormarinho wants to merge 1 commit intomainfrom
viktormarinho/server-side-conn-5-remaining-filters

Conversation

@viktormarinho
Copy link
Contributor

@viktormarinho viktormarinho commented Mar 24, 2026

Summary

  • Replace useConnections() + getConnectionSlug() lookups with useConnections({ filters: [{ column: "app_name", value: appSlug }] }) in connection detail, virtual-mcp detail, workflow hooks, and collection detail
  • Use binding: "WORKFLOW" for workflow binding connection hook
  • Use binding: "LLM" in private-registry plugin components (monitor-configuration, registry-settings)
  • Use server-side binding filtering in binding-selector and mcp-configuration-form for string binding types
  • Add includeVirtual option to tool-set-selector

Stack

PR 5/5 — Remaining filters (base: PR 4)

Test plan

  • Verify connection detail page resolves connections by app_name correctly
  • Verify workflow detail pages still find their parent connections
  • Verify binding selector dropdowns show correct filtered connections
  • Verify LLM connection dropdowns in private-registry plugin work

🤖 Generated with Claude Code


Summary by cubic

Replaced remaining client-side connection filtering with server-side useConnections queries by app_name or binding across connection, virtual MCP, workflow, collection, and private‑registry views to reduce over‑fetching and keep results consistent. Removed Binder‑based filtering and standardized WORKFLOW/LLM lookups.

  • Refactors
    • Use useConnections({ filters: [{ column: "app_name", value: appSlug }] }) in connection, virtual MCP, workflow, and collection views; remove getConnectionSlug() lookups.
    • Use useConnections({ binding: "WORKFLOW" }) in workflow hooks and useConnections({ binding: "LLM" }) in private‑registry components.
    • Update binding-selector and MCP configuration form to use server‑side binding filtering; drop Binder support, fall back to app_name for unknown registry types, and pass bindingName from plugins (project-plugins-form).
    • Remove useBindingConnections and related tests; in connection settings, detect MCP by checking for MCP_CONFIGURATION* tools.
    • In tool-set-selector, pass includeVirtual: !!excludeVirtualMcpId and filter out only the excluded virtual connection.

Written for commit a340e12. Summary will update on new commits.

@github-actions
Copy link
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2026

Release Options

Suggested: Patch (2.202.4) — based on fix: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.202.4-alpha.1
🎉 Patch 2.202.4
❤️ Minor 2.203.0
🚀 Major 3.0.0

Current version: 2.202.3

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: minor).

@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch from 77adb5f to ee185c3 Compare March 24, 2026 19:51
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-4-registry-server-side branch from 26a603d to 2bca2ab Compare March 24, 2026 19:51
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/mesh/src/web/components/binding-selector.tsx">

<violation number="1" location="apps/mesh/src/web/components/binding-selector.tsx:68">
P2: Using the server-filtered query as `allConnections` breaks the “keep selected connection even if filtered out” fallback, since the selected item may no longer be present in the source list.</violation>
</file>

<file name="apps/mesh/src/web/routes/orgs/collection-detail.tsx">

<violation number="1" location="apps/mesh/src/web/routes/orgs/collection-detail.tsx:54">
P1: Filtering connections with `app_name = params.appSlug` mismatches how `$appSlug` is generated (`getConnectionSlug`), so valid detail routes can fail to resolve their connection.</violation>
</file>

<file name="apps/mesh/src/web/components/details/virtual-mcp/index.tsx">

<violation number="1" location="apps/mesh/src/web/components/details/virtual-mcp/index.tsx:144">
P1: Sibling instance matching no longer enforces canonical slug equality, so connections without `app_name` can incorrectly treat all non-virtual connections as siblings.

(Based on your team's feedback about using `getConnectionSlug()` as the canonical sibling identifier.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-4-registry-server-side branch from 2bca2ab to 73aab84 Compare March 24, 2026 19:56
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch from ee185c3 to dfa26f9 Compare March 24, 2026 19:56
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-4-registry-server-side branch from 73aab84 to 1489310 Compare March 24, 2026 20:11
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch from dfa26f9 to 665bcf1 Compare March 24, 2026 20:28
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-4-registry-server-side branch from 1489310 to 2e41d26 Compare March 24, 2026 20:28
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch from 665bcf1 to aa69418 Compare March 24, 2026 20:34
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-4-registry-server-side branch 3 times, most recently from 7566656 to 77e33b5 Compare March 24, 2026 20:44
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch from aa69418 to e81f29c Compare March 24, 2026 20:44
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-4-registry-server-side branch from 77e33b5 to b780ff4 Compare March 24, 2026 20:59
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch 2 times, most recently from d76a990 to 8c4b18a Compare March 24, 2026 21:19
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-4-registry-server-side branch 2 times, most recently from b4a1f37 to 860bdbc Compare March 24, 2026 21:21
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch from 8c4b18a to e32d090 Compare March 24, 2026 21:21
Base automatically changed from viktormarinho/server-side-conn-4-registry-server-side to main March 24, 2026 21:24
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch 4 times, most recently from 64b6271 to 2185826 Compare March 24, 2026 21:51
…er-side filters

Replace useConnections() + getConnectionSlug() lookups with
useConnections({ filters: [{ column: "app_name", value: appSlug }] })
for targeted server-side queries. Use binding: "WORKFLOW" and
binding: "LLM" for binding-based filtering instead of loading all
connections and filtering client-side.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@viktormarinho viktormarinho force-pushed the viktormarinho/server-side-conn-5-remaining-filters branch from 2185826 to a340e12 Compare March 24, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant