From 7983382ec116e29a3d5ab205bb7f67b4b98fc9ac Mon Sep 17 00:00:00 2001 From: Sam Kujovich Date: Mon, 19 Oct 2026 14:25:38 -0700 Subject: [PATCH] refactor(integrations): stop listing the community designation No toolkit is assigned the community type any more: Bright Data, Clickhouse, MongoDB and Postgres are Arcade toolkits. The type stays in the design system, so the index keeps handling it, but it no longer lists Community as a designation or offers it as a type filter. A ?type=community URL falls back to all types. Part of GRO-615 --- .../integrations/components/filter-params.ts | 17 +++++--- .../integrations/components/filters-bar.tsx | 33 +++++++--------- .../components/toolkits-client.tsx | 39 ++++++++----------- .../integrations/components/type-config.tsx | 14 ++++--- .../integrations/components/use-filters.ts | 5 ++- tests/filter-params.test.ts | 4 +- 6 files changed, 58 insertions(+), 54 deletions(-) diff --git a/app/en/resources/integrations/components/filter-params.ts b/app/en/resources/integrations/components/filter-params.ts index 71e4722c3..c32690631 100644 --- a/app/en/resources/integrations/components/filter-params.ts +++ b/app/en/resources/integrations/components/filter-params.ts @@ -9,6 +9,12 @@ const TOOLKIT_CATEGORIES: readonly ToolkitCategory[] = CATEGORIES.map( (category) => category.id ); +/** + * The designations the index presents. `community` is still a design-system + * ToolkitType, but no toolkit is assigned it. + */ +export type ListedToolkitType = Exclude; + // ToolkitType has no runtime export from the design system, so this list is // hand-maintained. `satisfies` turns a missing or extra entry into a // compile error the next time the union changes, instead of a silent drop. @@ -16,11 +22,12 @@ const TOOLKIT_TYPE_MEMBERSHIP = { arcade: true, arcade_starter: true, verified: true, - community: true, auth: true, -} satisfies Record; +} satisfies Record; -const TOOLKIT_TYPES = Object.keys(TOOLKIT_TYPE_MEMBERSHIP) as ToolkitType[]; +const TOOLKIT_TYPES = Object.keys( + TOOLKIT_TYPE_MEMBERSHIP +) as ListedToolkitType[]; export const PARAM_CATEGORY = "category"; export const PARAM_TYPE = "type"; @@ -38,7 +45,7 @@ export function isLabel(value: string): value is Label { export type FilterState = { selectedCategory: ToolkitCategory; - selectedType: ToolkitType | "all"; + selectedType: ListedToolkitType | "all"; filterByPro: boolean; filterByByoc: boolean; searchQuery: string; @@ -52,7 +59,7 @@ export const DEFAULT_FILTER_STATE: FilterState = { searchQuery: "", }; -export function isToolkitType(value: string): value is ToolkitType { +export function isToolkitType(value: string): value is ListedToolkitType { return (TOOLKIT_TYPES as readonly string[]).includes(value); } diff --git a/app/en/resources/integrations/components/filters-bar.tsx b/app/en/resources/integrations/components/filters-bar.tsx index c3460f809..85555f0e2 100644 --- a/app/en/resources/integrations/components/filters-bar.tsx +++ b/app/en/resources/integrations/components/filters-bar.tsx @@ -11,11 +11,10 @@ import { DropdownMenuTrigger, Input, Separator, - type ToolkitType, } from "@arcadeai/design-system"; import { Check, Filter, FolderOpen, Layers, Search, X } from "lucide-react"; import type React from "react"; -import { TYPE_CONFIG } from "./type-config"; +import { LISTED_TYPE_CONFIG, TYPE_CONFIG } from "./type-config"; import { useFilters } from "./use-filters"; type FiltersBarProps = { @@ -138,21 +137,19 @@ export function FiltersBar({ resultsCount }: FiltersBarProps) { )} All Types - {Object.entries(TYPE_CONFIG).map( - ([key, { label, icon: Icon }]) => ( - setSelectedType(key as ToolkitType)} - > - {selectedType === key ? ( - - ) : ( - - )} - {label} - - ) - )} + {LISTED_TYPE_CONFIG.map(([key, { label, icon: Icon }]) => ( + setSelectedType(key)} + > + {selectedType === key ? ( + + ) : ( + + )} + {label} + + ))} @@ -254,7 +251,7 @@ export function FiltersBar({ resultsCount }: FiltersBarProps) { )} {selectedType !== "all" && ( - {TYPE_CONFIG[selectedType as ToolkitType].label} + {TYPE_CONFIG[selectedType].label}