Skip to content

docs(composio): name the OpenCompany twin of mapComposioCategory - #5496

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
CodeGhost21:docs/composio-category-twin
Aug 13, 2026
Merged

docs(composio): name the OpenCompany twin of mapComposioCategory#5496
senamakel merged 1 commit into
tinyhumansai:mainfrom
CodeGhost21:docs/composio-category-twin

Conversation

@CodeGhost21

@CodeGhost21 CodeGhost21 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a doc comment to mapComposioCategory (app/src/components/composio/toolkitMeta.tsx) naming its second copy in tinyhumansai/opencompany, at frontend/src/lib/composio-catalog.ts.
  • Records that the branch order is as load-bearing as the substring list, which was previously unstated on both sides.
  • Comment-only: no code, no behaviour, no new dependency, 19 added lines and nothing removed.

Problem

mapComposioCategory here and mapComposioCategory in OpenCompany's operator console bucket the same Composio catalog off the same free-form category strings — opencompany#600 ported this function to fix a flat 123-provider list there.

Nothing mechanical detects a divergence between the two. They live in different repositories with no shared package, so edit one and both consoles keep looking correct in isolation while bucketing the same provider differently. The failure is silent on both sides and only visible to someone comparing two products.

Raised in review on tinyhumansai/opencompany#639, which asks for a notice on each side. This is the OpenHuman half; the OpenCompany half ships in that PR.

Solution

The cheap, honest guard rather than machinery that does not exist yet:

  • This notice, naming the twin by repository and path so a future edit at least knows a sibling exists.
  • The matching notice on the OpenCompany copy, pointing back here.
  • A pinned table on the OpenCompany side (mapComposioCategory keeps the buckets its OpenHuman twin produces) asserting the substring mapping case-by-case, plus one asserting the first-hit branch order. Editing the table without editing the list fails that suite — which is the moment the editor is told a twin exists.

One thing the comment adds beyond the review's ask: both copies return on the first match, so an entry carrying several categories depends on Chat → Social → Productivity → Platform. Reordering the branches on one side only is the subtlest way these can drift, and neither copy said so.

Hoisting the function into a shared package would be the real fix. That is a cross-repository dependency decision well beyond a review nit, so it is not attempted here.

Submission Checklist

  • Tests added or updated — N/A: comment-only change, no executable line added or altered. The behavioural pinning this review item asked for lands with the OpenCompany copy (three tests in connections: categorised, searchable connector grid (#600) opencompany#639), where the function's tests already live.
  • Diff coverage ≥ 80%N/A: every changed line is a comment, so no changed line is instrumentable.
  • Coverage matrix updated — N/A: behaviour-only change (in fact not even that — documentation only).
  • All affected feature IDs from the matrix are listed under ## RelatedN/A: no feature row is affected.
  • No new external network dependencies introduced — none; nothing executable changed.
  • Manual smoke checklist updated if this touches release-cut surfaces — N/A: does not alter any runtime surface.
  • Linked issue closed via Closes #NNNN/A: no OpenHuman issue exists. This originates from review feedback on a PR in another repository, linked below.

Impact

None at runtime. The bundle is unchanged apart from a comment stripped at build time; no desktop, mobile, web, or CLI behaviour is touched, and there are no performance, security, migration, or compatibility implications.

Related


AI Authored PR Metadata

Linear Issue

Commit & Branch

  • Branch: docs/composio-category-twin
  • Commit SHA: 4a96a86f8

Validation Run

  • pnpm --filter openhuman-app format:check — passes: "All matched files use Prettier code style!", plus the cargo fmt half. Prettier parsing the file is also proof it remains syntactically valid TSX.
  • pnpm typecheck — passes clean (tsc --noEmit, no output). Run at this branch's own base in a dedicated worktree with its own pnpm install --frozen-lockfile; an earlier attempt to reuse a checkout 53 commits behind was discarded because its baseline already failed on an unrelated file, which would have been a meaningless signal.
  • Focused tests: N/A — no executable line changed; there is no test that can distinguish this commit from its parent.
  • Rust fmt/check (if changed): N/A — no Rust touched.
  • Tauri fmt/check (if changed): N/A — no Tauri shell code touched.

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: N/A — nothing blocked. The checklist item above was initially left unticked because the command had not been run, which failed the PR Submission Checklist gate. The fix was to run it rather than to tick it: deps were installed in a worktree at this branch's base and both pnpm typecheck and pnpm --filter openhuman-app format:check now pass.

Behavior Changes

  • Intended behavior change: none.
  • User-visible effect: none.

Parity Contract

  • Legacy behavior preserved: entirely — mapComposioCategory's body, signature and branch order are byte-identical.
  • Guard/fallback/dispatch parity checks: N/A — no guard, fallback, or dispatch path is touched. The comment documents the existing first-hit branch order; it does not change it.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): none.
  • Canonical PR: this one.
  • Resolution: N/A

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added developer documentation explaining category assignment behavior and branch ordering.
    • Documented the relationship to the corresponding implementation and parity test.

`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) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request adds documentation to mapComposioCategory. It records the matching OpenCompany implementation, the required category evaluation order, and the parity test.

Changes

Category Mapping

Layer / File(s) Summary
Document category mapping parity
app/src/components/composio/toolkitMeta.tsx
Documents the matching OpenCompany implementation, the Chat → Social → Productivity → Platform evaluation order, and the parity test.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: senamakel

Poem

A rabbit reads the mapping lines,
And checks the order, neat and bright.
Chat hops first, then Social sings,
Productivity follows light.
Platform waits, the tests agree—
Parity bounds the category tree.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the documentation change that names the corresponding OpenCompany implementation.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel merged commit 0627b64 into tinyhumansai:main Aug 13, 2026
26 of 28 checks passed
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.

2 participants