From 4a96a86f822ea0dbf3fc6c6e2b0c22979a58f997 Mon Sep 17 00:00:00 2001 From: Ghost Scripter Date: Tue, 11 Aug 2026 17:48:56 +0530 Subject: [PATCH] docs(composio): name the OpenCompany twin of mapComposioCategory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `mapComposioCategory` has a second copy in `frontend/src/lib/composio-catalog.ts` in tinyhumansai/opencompany, whose operator console buckets the same Composio catalog off the same free-form category strings (opencompany#600 ported it from here). Nothing mechanical detects a divergence between them: edit one and both consoles keep looking correct in isolation while bucketing the same provider differently. Raised in review on opencompany#639, which asks for a notice on each side; this is the OpenHuman half. Also records that the branch ORDER is as load-bearing as the substrings. Both copies return on the first hit, so an entry carrying several categories depends on Chat → Social → Productivity → Platform, and reordering here alone is the subtlest available drift. Comment-only: no code, no behaviour, no new dependency. Co-Authored-By: Claude Opus 5 (1M context) --- app/src/components/composio/toolkitMeta.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/src/components/composio/toolkitMeta.tsx b/app/src/components/composio/toolkitMeta.tsx index ad69dcd5f1..07e669b241 100644 --- a/app/src/components/composio/toolkitMeta.tsx +++ b/app/src/components/composio/toolkitMeta.tsx @@ -302,6 +302,25 @@ function guessCategory(slug: string, name: string): SkillCategory { * `"crm"`, `"developer-tools"`), so we match on substrings and return the * first hit. Returns `undefined` when nothing matches so the caller can * fall back to the slug/name keyword heuristic. + * + * ## This function has a twin. Edit both. + * + * The other copy is `mapComposioCategory` in + * `frontend/src/lib/composio-catalog.ts` in **tinyhumansai/opencompany**, + * where the operator console buckets the same Composio catalog off the same + * free-form strings (opencompany#600). Nothing mechanical detects a + * divergence: edit one and both consoles keep looking correct in isolation + * while bucketing the same provider differently. + * + * The branch **order** is as load-bearing as the substrings — both copies + * return on the first hit, so an entry carrying several categories depends on + * Chat → Social → Productivity → Platform. Reordering here alone is the + * subtlest way the two can drift. + * + * There is no shared package to hoist this into, so the guard is social and + * deliberately cheap: this notice, the matching one on the OpenCompany side, + * and that repository's `mapComposioCategory keeps the buckets its OpenHuman + * twin produces` test, which pins the table case-by-case. */ function mapComposioCategory(categories?: string[]): SkillCategory | undefined { if (!categories || categories.length === 0) return undefined;