Repository navigation
fix(i18n): code automation run skip and failure reasons - #35666
Conversation
[Medium impact] The PR appears safe to merge, with no new actionable issues found. SummaryAdds translated automation run failure messages while keeping the stored English text for older records and unknown codes.
Reviews (2) · Last reviewed commit: "test: expect legacyTwinHosts code on twi..." · Reviewed by Greptile |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Minor · Preserve the coded refusal after a precheck. · automation-dispatch-request.ts:165
src/main/automations/automation-dispatch-request.ts:165
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winPreserve the coded refusal after a precheck.
If a scheduled run’s precheck finishes after its target changes,
latestTargetcontains a structured failure. This branch throws only its English text.runHeadlessAutomationDispatchthen recordsdispatch_failedwithouterrorCode, so the failure cannot be localized. ThrowAutomationDispatchRefusedErrorwith the structured failure, as the adjacent late-refusal branch does. (raw.githubusercontent.com)

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e4b7d22d-c848-4c92-a1fc-f00558284988
Files selected for processing: 33-
src/main/automations/automation-dispatch-host-fence.test.tssrc/main/automations/automation-dispatch-request.tssrc/main/automations/automation-wsl-move-refusal.test.tssrc/main/automations/dispatch-refusal-wsl-move.test.tssrc/main/automations/dispatch-refusal.tssrc/main/automations/headless-dispatch-runner.tssrc/main/automations/headless-dispatch.tssrc/main/automations/run-completion-watcher.tssrc/main/automations/run-target-resolution.test.tssrc/main/automations/run-target-resolution.tssrc/main/automations/runtime-terminal-run-observer.tssrc/main/automations/service.tssrc/main/persistence/scheduling-automations/automation-run-operations.test.tssrc/main/persistence/scheduling-automations/automation-run-operations.tssrc/renderer/src/components/automations/AutomationDetail.tsxsrc/renderer/src/components/automations/AutomationRunDetailsPage.tsxsrc/renderer/src/components/automations/automation-run-content.tssrc/renderer/src/components/automations/automation-run-error-copy.test.tssrc/renderer/src/components/automations/automation-run-error-copy.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/de.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/ru.jsonsrc/renderer/src/i18n/locales/tr.jsonsrc/renderer/src/i18n/locales/zh-Hant.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/automation-run-failure-copy.tssrc/shared/automations-types.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
Summary
Automation run skip/failure reasons authored in main (dispatch refusals, run-target resolution, runtime terminal observer) now persist an optional
errorCode(+errorParams) beside the unchanged Englisherror, and the Automations run details page / detail "Last run failed" notice show them translated.What Changed
src/shared/automation-run-failure-copy.ts: one English table +automationRunFailure(code, params?); English wire text is byte-identical to before (skip coalescing still keys on it).AutomationRun/AutomationDispatchResultgain optionalerrorCode?/errorParams?(plain strings, not an enum).updateAutomationRunstores the result's code, keeps the existing code when the same English error is re-forwarded (usage writes), and drops it when the error changes.dispatch-refusal.ts,run-target-resolution.ts(incl.projectSetupNotReadywithsetupStateparam),automation-dispatch-request.ts(automation/destination changed),runtime-terminal-run-observer.ts(hooks review, never started, no completion, 6h watch timeout). Codes flow throughAutomationDispatchRefusedError, headless completion and the completion watcher.automation-run-error-copy.ts: narrows withObject.hasOwn;setupStatemaps to one whole sentence per state; unknown codes/states and old records show the stored English.automations.runFailures.*in all 11 catalogs.Why
Refs #32207: these sentences were shown in English regardless of UI language. Records sync to remote clients and may be produced by older/newer hosts, so the English stays authoritative and the code is additive.
Linked Issue
Refs #32207
Visual Proof
N/A — copy/i18n only.
Testing
pnpm sync:localization-runtime-catalog,pnpm verify:localization-catalogs|catalog|extraction|coverage|runtime-catalog— passpnpm tc— passpnpm test src/main/automations src/main/persistence/scheduling-automations src/renderer/src/components/automations— 136 files / 1128 tests passpnpm check:changed --maxWorkers=2— all lint/ratchet/localization/quality steps pass; its unit-test step did not finish within the time budget on the loaded machine (affected tests run directly above)