Skip to content

feat(tasks-panel): move task and automation filters server-side#3173

Open
rafavalls wants to merge 2 commits intomainfrom
rafavalls/server-side-task-filters
Open

feat(tasks-panel): move task and automation filters server-side#3173
rafavalls wants to merge 2 commits intomainfrom
rafavalls/server-side-task-filters

Conversation

@rafavalls
Copy link
Copy Markdown
Collaborator

@rafavalls rafavalls commented Apr 24, 2026

What is this contribution about?

Task member/type filters in the tasks panel were filtering already-fetched data client-side in TasksSection. Automation name search in the automations list was also a client-side array filter. Both are now server-side.

  • Tasks panel: memberFilter ("mine"/"all") now drives the owner param of the automation tasks query; typeFilter ("all"/"manual"/"automation") controls which server result-sets are included. Filter state lifted from TasksSection to TasksPanelContent.
  • Automations panel: AUTOMATION_LIST tool now accepts a search param, passed as an ILIKE condition in listWithTriggerCounts. useAutomations hook threads the param through; automations-list.tsx uses useTransition for a responsive input while the query refetches.

Screenshots/Demonstration

No visual change — behavior is identical, filtering now happens at the DB/query level.

How to Test

  1. Open the tasks panel and switch between "Mine only" / "All members" — verify only the correct tasks are shown (network request changes, not JS filter).
  2. Switch the type filter (All / Chats / Automation) — verify the list updates via a new fetch.
  3. Open an agent's Automations tab, type in the search box — verify the query is fired with the search argument rather than filtering the full list client-side.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Moved task and automation filters to the server to fetch only needed data and reduce client-side work. Also fixed member filtering so “All members” applies to both manual and automation queries; no UI changes.

  • Refactors

    • Tasks panel: memberFilter drives owner in useTasks ("me"/"all"); typeFilter chooses included result sets; filter state lifted to TasksPanelContent with useTransition.
    • Removed client-side filtering from TasksSection; now accepts filter and memberFilter props and renders server results as-is.
    • Automations: AUTOMATION_LIST accepts search; storage listWithTriggerCounts applies ILIKE on names.
    • useAutomations accepts search; threads it through with KEYS.automations including search; automations-list.tsx uses a transition-backed search input.
  • Bug Fixes

    • In “All members” mode, manual tasks were limited to the current user; both queries now share owner from memberFilter.

Written for commit 8edba91. Summary will update on new commits.

Task member/type filters now drive useTasks query params instead of
filtering already-fetched data in the component. Automation name search
uses an ILIKE query via the AUTOMATION_LIST tool instead of client-side
array filter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
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
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Release Options

Suggested: Minor (2.273.0) — based on feat: prefix

React with an emoji to override the release type:

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

Current version: 2.272.9

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

myTasks was hardcoded to owner:"me" so in "All members" mode manual
tasks still only showed the current user's chats. Both queries now
share taskOwner derived from memberFilter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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