Skip to content

fix(activity): name the workflow tools by an activity.tool key - #90

Open
zereight wants to merge 1 commit into
mainfrom
fix/activity-workflow-tool-labels
Open

zereight wants to merge 1 commit into
mainfrom
fix/activity-workflow-tool-labels

Conversation

@zereight

@zereight zereight commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

What changed

The three workflow tools a bot can call, workflow_info, workflow and delete_workflow, get activity labels like every other tool of the app's own:

  • server/activity.ts: three rows in TEAM_ACTION_KEYS.
  • src/locales/en.json: the three keys, worded exactly as the labels the feed already showed ("Workflow info", "Workflow", "Delete workflow").
  • src/locales/pt-br.json: the same three keys in Brazilian Portuguese, following the pack's wording for Workflows ("Fluxos de trabalho") and for deleting ("Excluir …").

Why

#52 (85f6087, from 4da2845, 2026-11-23) added the workflow tools to the bots' tool catalog (server/drivers/agents-workflow-tools.ts) but no keys in TEAM_ACTION_KEYS. So describedTool returns them without a labelKey. The activity feed then shows the English humanized name in every language (src/lib/activity.ts:109 translates only rows with an activity.tool. key).

server/activity.test.ts checks that every tool in the catalog goldens has such a key, and it has failed on main since #52. The first failing run is dc51643 (2026-11-28): from 2026-11-22 to 2026-11-28 preflight failed and vitest did not run.

FAIL  server/activity.test.ts > describeTool > names this app's own tools by an activity.tool key whose English is exactly the label
TypeError: .toMatch() expects to receive a string, but got undefined

pt-br is in this PR because that pack is held to every English key (src/lib/i18n.test.ts:143, activePackComplete). Adding the English keys alone would have added three more gaps to it.

src/locales/source-hashes.json is not changed. A translated key without a recorded hash counts as current until a release records one (scripts/generate-locale.mjs, validateTranslationHashes). --record-hashes would also have recorded 66 unrelated keys.

How it was verified

macOS, Node 24.22.1 (the CI version). Before is main 8c67e9d. The script calls the real describedTool and reads pt-br.json.

Before shows no key for the three tools; after shows each tool's key, its English label unchanged, and the Portuguese string.

check Before (main 8c67e9d) After (this branch)
describedTool("mcp__agents__workflow_info") label "Workflow info", labelKey null label "Workflow info", labelKey "activity.tool.team.workflowInfo", pt-br "Informações do fluxo de trabalho"
describedTool("mcp__agents__workflow") label "Workflow", labelKey null labelKey "activity.tool.team.workflow", pt-br "Fluxo de trabalho"
describedTool("mcp__agents__delete_workflow") label "Delete workflow", labelKey null labelKey "activity.tool.team.deleteWorkflow", pt-br "Excluir fluxo de trabalho"
pnpm exec vitest run server/activity.test.ts Tests 1 failed | 30 passed (31) Tests 31 passed (31)
English keys missing from pt-br.json 18 the same 18 (none added)
node scripts/generate-locale.mjs --check — locale catalogs valid (16 languages, 11394 English strings)
pnpm exec tsc -p tsconfig.server.json --noEmit, oxlint server/activity.ts — exit 0, exit 0

server/activity.test.ts, src/lib/activity.test.ts, src/lib/i18n.test.ts and src/locales/ together: Test Files 1 failed | 18 passed (19). The failure is activePackComplete, failing on main already because of the 18 keys above. 17 of them are added by the stale-test-expectations PR. The 18th, task.helperGroup, belongs to the "Opened by bots" sidebar group, which needs a product decision.

Not covered

  • The activity feed on screen; the label it renders is the row the script prints.
  • The other 14 language packs. They fall back to English for these keys, as they do for other keys they do not have yet.

Checklist

#52 added workflow_info, workflow and delete_workflow to the bots' own
tools without activity labels, so the activity feed showed the
humanized name in every language. Add their keys in English and
Brazilian Portuguese, the pack that must keep every English key.
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.

1 participant