From 54cd0ed499e843706b518edf11b8fb10c13127a5 Mon Sep 17 00:00:00 2001 From: Ritik Mangal <107031511+RITIKMANGAL@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:29:35 +0530 Subject: [PATCH 1/2] Fix: support multiple filters in Supabase realtime liveProvider --- packages/supabase/src/liveProvider/index.ts | 35 ++++++++++++--------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/packages/supabase/src/liveProvider/index.ts b/packages/supabase/src/liveProvider/index.ts index 19200da1de4c..fd2f0a761785 100644 --- a/packages/supabase/src/liveProvider/index.ts +++ b/packages/supabase/src/liveProvider/index.ts @@ -49,28 +49,33 @@ export const liveProvider = ( } }; - const mapFilter = (filters?: CrudFilters): string | undefined => { - if (!filters || filters?.length === 0) { - return; + const mapFilter = ( + filters?: CrudFilters, + meta?: any + ): string | undefined => { + // Use custom override if provided + if (meta?.realtimeFilter) { + return meta.realtimeFilter; } - return filters - .map((filter: CrudFilter): string | undefined => { - if ("field" in filter) { - return `${filter.field}=${mapOperator(filter.operator)}.${ - filter.value - }`; - } - return; - }) - .filter(Boolean) - .join(","); + if (!filters || filters.length === 0) return; + + if (filters.length > 1) { + console.warn( + "[liveProvider] Supabase Realtime does not support multiple filters. Using the first filter only." + ); + } + + const firstFilter = filters.find((f) => "field" in f); + if (!firstFilter) return; + + return `${firstFilter.field}=${mapOperator(firstFilter.operator)}.${firstFilter.value}`; }; const events = types .map((x) => supabaseTypes[x]) .sort((a, b) => a.localeCompare(b)); - const filter = mapFilter(params?.filters); + const filter = mapFilter(params?.filters, meta); const ch = `${channel}:${events.join("|")}${filter ? `:${filter}` : ""}`; let client = supabaseClient.channel(ch); From 41d77cad50eef26348641393a744b41bf67a055d Mon Sep 17 00:00:00 2001 From: Alican Erdurmaz Date: Wed, 4 Jun 2025 10:17:10 +0300 Subject: [PATCH 2/2] Merge branch 'next' into fix/multiple-filters-supabase --- .../blog/2025-06-02-purpose-built-ai-agents.md | 15 +++++++-------- documentation/blog/authors.yml | 1 + 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/documentation/blog/2025-06-02-purpose-built-ai-agents.md b/documentation/blog/2025-06-02-purpose-built-ai-agents.md index f3afb5e7018a..abae9c247ad3 100644 --- a/documentation/blog/2025-06-02-purpose-built-ai-agents.md +++ b/documentation/blog/2025-06-02-purpose-built-ai-agents.md @@ -21,14 +21,13 @@ Internal enterprise applications represent a distinct category where a high leve In this article, I want to explore whether the previously discussed agentic tools and vibe-coding platforms—despite their general-purpose approach—are suitable for creating high-quality internal software, or if we need solutions that are more specialized and tailored to specific domains. Below are the topics I want to cover: -- [Introduction](#introduction) - - [The Fragility of Generic AI](#the-fragility-of-generic-ai) - - [Meet the Specialist](#meet-the-specialist) - - [Why Refine AI Works Differently](#why-refine-ai-works-differently) - - [Real-World Thinking, Built In](#real-world-thinking-built-in) - - [A Clear Difference](#a-clear-difference) - - [Not Just Fast. Reliable.](#not-just-fast-reliable) - - [Looking Ahead](#looking-ahead) +- [The Fragility of Generic AI](#the-fragility-of-generic-ai) +- [Meet the Specialist](#meet-the-specialist) +- [Why Refine AI Works Differently](#why-refine-ai-works-differently) +- [Real-World Thinking, Built In](#real-world-thinking-built-in) +- [A Clear Difference](#a-clear-difference) +- [Not Just Fast. Reliable.](#not-just-fast-reliable) +- [Looking Ahead](#looking-ahead) ## The Fragility of Generic AI diff --git a/documentation/blog/authors.yml b/documentation/blog/authors.yml index b47fd34e5a8a..74f7d85eb4a9 100644 --- a/documentation/blog/authors.yml +++ b/documentation/blog/authors.yml @@ -16,6 +16,7 @@ civan: url: https://www.linkedin.com/in/civan-özseyhan-1ab48814/ image_url: https://media.licdn.com/dms/image/v2/C4D03AQE-_wQd8hyrZQ/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1655223925589?e=1754524800&v=beta&t=0YVbcPUo20AUfRxVD5F_sWw7GkOBH49kIjxaMoyfrmI github: https://github.com/mlhekincifeat + ege: name: Ege Aytın title: Software Developer