fix(frontend): stop the playbook editor flagging per-repo git tools as unknown - #90
Conversation
…ll picker The tool catalog lists each git tool once under the logical server "triagent-git", but every linked repo runs its own server named triagent-git-<alias>, and that aliased form is what a playbook's suggested_calls carry. The picker matched server/name exactly against the logical catalog, so every git call in a real playbook showed the "unknown" badge, the dropdown could not offer the aliased tools, and the input hints never appeared for them. Expand the catalog in the editor with one copy of each git tool per linked repo alias, fed by the existing /api/repos endpoint. The logical entry stays so system playbooks written against the template form still resolve. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The fix is localized, covered by unit tests, and the remaining feedback is a minor optimization rather than a correctness issue.
Pull request overview
Updates the playbook editor’s tool catalog handling so per-repo git MCP aliases (triagent-git-<alias>) resolve as known tools in the suggested-call picker, fixing “unknown” badges and restoring dropdown/input-hint behavior while keeping the logical triagent-git entries intact for template/system playbooks.
Changes:
- Expand the logical
triagent-gittool catalog into per-linked-repo alias entries inside the playbook editor. - Add unit tests covering alias expansion, alias dedupe, and no-repos passthrough.
- Clarify the “unknown tool” tooltip to include the “repo isn’t linked” case.
File summaries
| File | Description |
|---|---|
| frontend/lib/mcps.ts | Adds expandRepoAliases to expand logical git tools into per-repo alias tool entries for the editor. |
| frontend/lib/mcps.test.ts | Adds focused unit tests validating alias expansion and deduping behavior. |
| frontend/components/playbooks/ToolPicker.tsx | Updates the unknown-tool tooltip to reflect unlinked-repo scenarios. |
| frontend/components/playbooks/PlaybookEditor.tsx | Fetches linked repos and passes an expanded catalog to the node editor tool picker. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The change is localized to the editor catalog resolution, includes targeted unit tests, and preserves existing logical triagent-git behavior while fixing per-repo tool matching.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
Description
Every git call in a real playbook showed the "unknown" badge in the editor's suggested-call picker, the dropdown could not offer those tools, and their input hints never appeared. The catalog lists each git tool once under the logical server
triagent-git, but every linked repo runs its own server namedtriagent-git-<alias>, and that aliased form is whatsuggested_callscarry, so the picker's exact match never hit. This PR expands the catalog inside the editor with one copy of each git tool per linked repo, fed by the existing repos endpoint. A call against a repo that isn't linked in this launcher still reads as unknown, which is the honest answer, and the badge's tooltip now says so.Changes
triagent-git-<alias>/<tool>for every linked repo and lists those tools in its dropdown.triagent-gitentries stay in the catalog so system playbooks written against the template form still resolve.Testing
expandRepoAliaseshas unit tests for the per-alias expansion, alias dedupe, and the no-repos passthrough. Full frontend vitest (244 tests) andnpm run typecheckpass. The MCP catalog page is untouched: it reads the same endpoint but groups by logical server on purpose, so the expansion lives in the editor only.🤖 Generated with Claude Code