Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): dedupe skills in composer menus #8043

MergedAdamulek123(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/8043/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

What Changed

  • Collapse enabled provider skills by case-insensitive name before building composer menu rows.
  • Preserve the provider's first resolved definition and the order of unrelated skills.
  • Apply the same rule to / and $ menus on web and mobile.
  • Add regression coverage for duplicate names separated by another skill.

Why

Codex can report the same skill name from both .codex and .agents. The composer rendered every definition with the same row ID, so duplicate rows highlighted together. Hovering a later duplicate also scrolled the menu to the first row with that ID, skipping entries between them.

Skill invocation is name-based, so multiple same-name rows are not independently selectable. Keeping one row per name makes the menu match what the user can invoke and restores one-to-one highlight and scroll targets.

Original UI Verification

Existing UI evidence from the original PR. It was not rerun during this rebase.

BeforeAfter
Duplicate skills beforeDeduplicated skills after

The after image uses the same duplicated .codex and .agents skill setup. Each skill now has one row and one hover target.

Validation

  • vp test run packages/client-runtime/src/providerSkills.test.ts apps/web/src/providerSkillSearch.test.ts apps/web/src/components/chat/composerSlashCommandSearch.test.ts apps/mobile/src/features/threads/use-composer-command-menu.test.ts (24 tests passed)
  • vp run --filter @t3tools/client-runtime --filter @t3tools/web --filter @t3tools/mobile --concurrency-limit 2 typecheck
  • Targeted vp lint --report-unused-disable-directives on all five changed files
  • Targeted vp fmt --check on all five changed files
  • Original integrated desktop verification with the reported duplicated skill directories: Babysit Pr and Branch Audit each rendered once
  • Original hover verification moved from Branch Audit to Babysit Pr without highlighting another row or jumping the menu
  • Original $ skill menu verification applied the same deduplication

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for the UI change
  • No animation or timing behavior changed

Model: GPT-5.6 Sol Harness: Codex


Note

Low Risk UI-only menu filtering; duplicate same-name skills collapse to the first definition, which matches name-based invocation and fixes incorrect duplicate rows.

Overview Fixes duplicate skill rows in composer autocomplete when the same skill name is reported from multiple paths (e.g. .codex and .agents), which caused shared row IDs, broken hover/highlight, and menu scroll jumps.

Adds dedupeProviderSkillsByName in client-runtime to keep one entry per trimmed, case-insensitive skill name (first occurrence wins, order of other skills unchanged). getProviderSkillsForSlashMenu and web searchProviderSkills now apply that dedup for enabled skills.

Mobile use-composer-command-menu uses getProviderSkillsForSlashMenu for / skill rows and dedupeProviderSkillsByName on the $ skill picker so / and $ behave like web.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3847cd4f4ba3b64535cbaf3ce382016e2154d69b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Dedupe skills by normalized name in composer menus

  • Adds dedupeProviderSkillsByName to providerSkills.ts, which keeps the first resolved skill per trimmed, lowercased name while preserving order
  • Updates getProviderSkillsForSlashMenu to apply this dedup when showSkillsInSlashMenu is true, and updates web searchProviderSkills to dedupe before ranking
  • Mobile composer command menu (use-composer-command-menu.ts) now sources slash-menu skills via getProviderSkillsForSlashMenu and wraps the enabled-skill list with dedupeProviderSkillsByName for $ skill triggers
  • Risk: duplicate skills with the same normalized name now collapse to the first occurrence, so any consumers relying on seeing multiple entries per name will only get one
Macroscope summarized 3847cd4.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 12c1b075-db38-4ff9-8b78-2ac505b16025

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at ce796ea

      Macroscope's review found this PR approvable — This is a small, self-contained composer-menu bug fix that deduplicates enabled skills by normalized name across web and mobile while preserving existing unique-skill behavior. It changes presentation and selection targets only, with focused regression tests and no product-default, schema, deployment, or sensitive-area changes.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.