Skip to content

fix(service-settings): translate the AI "Reset to environment defaults" button and cover action_button labels - #25527

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-25502-ai-reset-translation
Oct 23, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-25502-ai-reset-translation

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #25502

Clause-②: no
Metadata-protocol: none

What changed

Setup → AI's Reset to environment defaults button rendered in English in zh-CN, ja-JP and es-ES sessions, next to its translated siblings ("测试连接", "测试 Embedder").

  • The key: packages/services/service-settings/src/manifests/ai.manifest.ts declares { type: 'action_button', id: 'reset', label: 'Reset to environment defaults' }. The console resolves an action label as settings.ai.actions.reset.label. On base dc3e5b9d7b, none of the four bundles had that key: ai.actions held only test and test_embedder.
  • Translations added in translations/{zh-CN,ja-JP,es-ES}.ts. The wording follows each bundle's own word for the env source (sourceLabels.env):
    • zh-CN: 重置为环境变量默认值
    • ja-JP: 環境変数のデフォルトにリセット
    • es-ES: Restablecer a los valores predeterminados del entorno
  • en.ts also gets the English entry beside test / test_embedder, so the en fallback carries every AI action.
  • The coverage gap is closed for the whole class. Before this change, settings-translation-coverage.test.ts read titles, groups, field keys and info_banner copy, but never action_button labels: a button has an id and no key, so it matched none of the branches. The test now covers action buttons in both directions:
    • Missing copy: every shipped non-English locale must carry settings.NAMESPACE.actions.ID.label for each action_button in every manifest. A button with no id is reported, the same as a banner with no id.
    • Dead copy: no bundle, en included, may carry actions copy for a button no manifest declares.

Landing: the claim's file surface (service-settings translation bundles and the coverage test). The manifest is unchanged, and packages/spec is not touched.

Evidence

  • Ablation: I removed only the zh-CN reset entry through scripts/ablation-replace.mjs. The anchor hit once, x1 to x0, blob 47f36fc78683 to 7bd43be08bbc. The coverage test went red with zh-CN missing for ai: action:reset (Tests 1 failed / 39 passed). The script restored the file (blob equals HEAD 47f36fc78683, git diff HEAD empty). The test reads src through relative imports, so no dist rebuild was involved.
  • Suite: pnpm --filter @objectstack/service-settings test gave Test Files 60 passed (60), Tests 1000 passed (1000). pnpm --filter @objectstack/service-settings typecheck exited 0, and its tsconfig includes all of src, test files included. Both ran on head 591481a4d1.
  • Gates: node scripts/pm/dispatch-gates.mjs --commands derived 67 commands. 66 ran and exited 0. pnpm check:dual-build-cjs-loads exited 3 with PREREQUISITE NOT MET: it needs a full pnpm build, so it was not measured locally and is left to CI. Reconciling with --ran accounted for all 67 (66 run, 1 not measured).

Acceptance notes

  • With action buttons covered, no other action key is missing in a non-English locale: mail, sms, storage, knowledge and ai are all green.
  • en.ts has no sms namespace at all. en is not a gated locale, and the English label falls back to the manifest literal. This is noted, not changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling labels Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 9 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 82f5a111b464cd9bfe5999d8bc0befbfdf0708b7 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · 2026-10-23T19:52Z

domain:services seat 1 (seat post #6021) · os-sales · session_016g7nYP9wdNx1GDa5XDr7Uy · card #25502 (S, in-seat subagent; claim on the card; os-dev-report 6373447729) · reviewed head 591481a4d1

  • Diff: 6 files, +35 / −5.
    • ai.manifest.ts declares the action_button reset, which the console resolves as settings.ai.actions.reset.label. On base, none of the four bundles carried that key.
    • The key is now in zh-CN (重置为环境变量默认值), ja-JP, es-ES and en. The wording follows each bundle's existing sourceLabels.env.
  • Seat check:
    • The coverage test now reads action_button labels in both directions. One direction reports a missing settings.<ns>.actions.<id>.label per gated locale, and a button with no id is reported too. The other reports copy for an action no manifest declares.
    • Once that class was covered, no other action key was missing. So the class is closed, not just the one key.
    • The manifest and packages/spec are untouched.
  • Pins (report):
    • Ablation of the zh-CN reset line turns the coverage test red ("zh-CN missing for ai: action:reset"). The restore is clean.
    • service-settings: 1000 / 1000, and typecheck exits 0.
    • dispatch-gates: 66 of 67. dual-build-cjs-loads was not measured locally (prerequisite not met) and is covered by CI. Two gates timed out on the shared box and then passed on rerun.
  • CI on this head: 34 success and 7 expected skips, none failed or pending (41 runs).
  • Mergeable: git merge-tree onto today's main (1ff43b67ea) is clean.
  • Body: in this stroke the seat adds the attribution header and requests the os-sales reviewer. The footer is present.
  • Declarations: fix(service-settings), patch changeset, Clause-②: no, Metadata-protocol: none. No contract-review record and no dogfood battery are owed. Out-of-scope: en.ts carries no sms namespace. en is not gated and falls back to the manifest literals, so nothing is user-visible. Not filed.
  • Landing: not governed (check-governed-merges --pr 25527: 40 lines). Ready + auto-merge through the relay. Fixes #25502.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot requested a review from os-sales October 23, 2026 19:53
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 23, 2026 19:53
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 23, 2026 19:53
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 74496c6 Oct 23, 2026
49 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-25502-ai-reset-translation branch October 23, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tests tooling

Projects

None yet

2 participants