Skip to content

fix(ci): complete taskTree translations for all locales + mock backfillTaskDepth in single-open spec - #15

Merged
easonLiangWorldedtech merged 1 commit into
main-task-treefrom
pr-6-ci-fixes
Aug 16, 2026
Merged

fix(ci): complete taskTree translations for all locales + mock backfillTaskDepth in single-open spec#15
easonLiangWorldedtech merged 1 commit into
main-task-treefrom
pr-6-ci-fixes

Conversation

@easonLiangWorldedtech

Copy link
Copy Markdown
Owner

fix(ci): complete taskTree translations for all locales + mock backfillTaskDepth in single-open spec

Fixes the four failing CI jobs from the PR #10/#11 runs on main-task-tree.

1. check-translations — 4 missing keys × 17 frontend locales (code fix)

PR-11 added contextManagement.taskTree.{maxNestingDepth,autoFlattenOnLimit}.{label,description} to the English locale but not to the other 17 (ca de es fr hi id it ja ko nl pl pt-BR ru tr vi zh-CN zh-TW). Each of those webview-ui/src/i18n/locales/<loc>/settings.json files now carries a genuine per-language translation of the four keys, inserted before condensingThreshold to match the English file's ordering.

Verified: node scripts/find-missing-translations.js --area webview → all 17 locales "No missing translations", exit 0 (was exit 1 with 4 missing keys per locale).

2. platform-unit-test (ubuntu) — spec mock missing backfillTaskDepth (code fix)

FAIL __tests__/single-open-invariant.spec.ts > History resume path always closes current before rehydration (non-rehydrating case)
TypeError: this.backfillTaskDepth is not a function
    ❯ Object.createTaskWithHistoryItem core/webview/ClineProvider.ts:1319

PR-10 added if (!task.depthAuthoritative) await this.backfillTaskDepth(task) to createTaskWithHistoryItem. The two "History resume path" tests in single-open-invariant.spec.ts build plain-object provider doubles that lacked the method, and their mocked TaskStub has no depthAuthoritative (undefined → falsy → enters the backfill branch) — so the call threw. Added backfillTaskDepth: vi.fn().mockResolvedValue(undefined) to both provider mocks (the non-rehydrating case at ~L168 and the rehydrating/in-place case at ~L267), matching how every other method on those doubles is stubbed.

Verified: vitest run __tests__/single-open-invariant.spec.ts → 5/5 pass (was 3 passed / 2 failed).

3. dependency-review — repo setting, not code (no workflow change)

The job failed with "Dependency review is not supported on this repository" because the fork had Dependency graph disabled. Enabled it via API (PUT repos/easonLiangWorldedtech/Zoo-Code/vulnerability-alerts, now returns 204 instead of 404). The dependency-review job in .github/workflows/code-qa.yml is left untouched — it will run normally on the next PR. No code change needed for this item.

4. platform-unit-test (windows) — cancelled, not a failure

Cancelled ~4s after the ubuntu unit-test job failed (CI cancel-on-failure behavior). Re-running CI with the spec fix above resolves it; no separate change.

Verification

  • vitest run __tests__/single-open-invariant.spec.ts → 5/5
  • node scripts/find-missing-translations.js --area webview → exit 0, all locales clean
  • per-file eslint on the changed spec (--max-warnings=0) → clean; pre-commit full turbo lint (zoo-code + webview-ui) → Tasks: 11 successful
  • All 17 edited locale files re-parsed as valid JSON with contextManagement.taskTree present

@easonLiangWorldedtech
easonLiangWorldedtech merged commit 2c8da5f into main-task-tree Aug 16, 2026
12 checks passed
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.

2 participants