Skip to content

refactor(connections): remove arbitrary field filtering from list tool#2856

Open
pedrofrxncx wants to merge 3 commits intomainfrom
refactor/connection-list-remove-arbitrary-filtering
Open

refactor(connections): remove arbitrary field filtering from list tool#2856
pedrofrxncx wants to merge 3 commits intomainfrom
refactor/connection-list-remove-arbitrary-filtering

Conversation

@pedrofrxncx
Copy link
Collaborator

@pedrofrxncx pedrofrxncx commented Mar 24, 2026

Summary

  • Remove in-memory where/orderBy evaluation from COLLECTION_CONNECTIONS_LIST tool (~160 lines of query evaluation code deleted)
  • Replace selectAll() with explicit column selection in ConnectionStorage.list() (excludes unused subtype column)
  • Rewrite useConnections hook to call the tool directly instead of routing through generic useCollectionList
  • Move search filtering to client-side in connections.tsx and tool-set-selector.tsx

Test plan

  • bun test apps/mesh/src/tools/connection/connection-tools.test.ts — 8/8 pass
  • bun run check — no new type errors
  • bun run lint — 0 errors
  • Manual: verify connections page search bar filters correctly
  • Manual: verify tool-set-selector search works
  • Manual: verify binding filtering (LLM, ASSISTANTS, OBJECT_STORAGE) still works

🤖 Generated with Claude Code


Summary by cubic

Replace selectAll() with explicit column selection in ConnectionStorage.list() to narrow DB reads, drop the unused subtype, and make the query clearer.

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

Replace server-side where/orderBy filtering with client-side search in
the UI. This removes ~160 lines of in-memory query evaluation code and
allows the storage layer to use explicit column selection instead of
selectAll().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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: Prerelease (2.202.4-alpha.1) — based on refactor: 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).

pedrofrxncx and others added 2 commits March 24, 2026 18:43
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ction list

Keep only the storage-layer change: enumerate columns explicitly in
ConnectionStorage.list() instead of using selectAll(). This excludes
the unused `subtype` column and makes the query self-documenting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

No issues found across 7 files

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.

1 issue found across 6 files (changes from recent commits).

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/tools/connection/list.ts">

<violation number="1">
P2: `not` with multiple conditions yields NAND semantics (`!(A && B)`) rather than the typical logical NOT (`!A && !B`). If `not` is intended to be unary, add a guard ensuring `conditions.length === 1`; otherwise, if intent is "none match", use `!conditions.some(...)` instead.</violation>
</file>

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

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