Repository navigation
fix(knowledge): translate the syncing badge on a scanning source - #33328
Conversation
A source row reads as 'syncing' while its folder scan runs, but the status label table had no entry for it, so the badge showed the raw English word "syncing" in every locale. Add the status.syncing label in all 12 locales.
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the fix fills the missing label-table entry the one caller reads, and screenshots of this revision are attached. [DESIGN-REVIEWED] 20b24dc Description read[DESCRIPTION-READ] c18bf8f1a81a60df7029898a26fd84b601bcb881f50e21e4653ddcde505118aa That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. This fix is one table entry plus one catalog key. The rewritten fallback test used What this change shipsInventory (4 items) — 4 justifiedIntent: A person whose folder source is being scanned sees the "Syncing" badge in their own language instead of the raw lowercase "syncing". This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 20b24dc Description read[DESCRIPTION-READ] ea90c2c8b12022708982e360c8e32ebc20a76977bb7ee2ce2d32d2553ca71a10 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The only change is the badge text, all three screenshots show it, and the blind reader read it as "the app is working on the folder right now." Notes
[UX-REVIEWED] 20b24dc Description read[DESCRIPTION-READ] fce4574897ea37615fb0e380282ab0d47639b46521fc20ac9993498b2f6a57c1 That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsI found nothing that blocks this PR. The prior pass offered no candidates, and on my own read of the diff and the code it touches I found no defect that clears the bar. What I checked:
No findings. [OPUS-REVIEWED] 20b24dc Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: A folder source whose scan is running shows a translated "Syncing" badge in every language, not the raw English word "syncing".
Bug fix: while a folder scan runs,
displaySyncStatusreads the row as'syncing', and the badge text comes fromsyncStatusLabel. Its label tableSYNC_STATUS_LABEL_KEYS(website/src/pages/knowledge/knowledgeUtils.ts) had entries foractive,synced,errorandpausedonly, so the badge fell back to the raw value and showed lowercase "syncing" in every locale. Raised by the Opus 5.5 lane on the 0.12.1 backport #33216.Why it matters
Every user who adds or rescans a folder source sees an untranslated, lowercase status word on the row for as long as the scan runs, in ja, zh-CN, de and every other locale.
Not a goal
What changed (motivation → approach → change)
syncingentry inSYNC_STATUS_LABEL_KEYSand nostatus.syncingcatalog key.knowledgeUtils.tsmapssyncingtopages.knowledge.sourcesList.status.syncing, and that key is added next to the other status labels in all 12 locales, plus the regenerated pseudo-locale. Each translation reuses the wording the catalog already uses for "Syncing" (pages.devFleetPage.syncing).Backwards compatibility
Compatible: one label entry and one catalog key are added; nothing is renamed or removed.
Removes nothing: no key, field or caller is removed.
Tests
website/src/test/SourcesList.syncError.test.tsx: a scanninglocal_folderrow shows the badge text "Syncing" and no raw "syncing".website/src/test/KnowledgeUtilsCov80.test.ts:syncStatusLabel('syncing')resolves to thestatus.syncingkey; the unknown-status fallback is checked with a value that is not a status.syncingentry turns the SourcesList test red; restored afterwards.SourcesList.syncError.test.tsxpassed 3 runs with--sequence.shuffle.tsc --noEmit -p tsconfig.app.json; vitest on the two files above plusSourcesListCoverageandKnowledgeIndexCoverage(105 passed); vitestsrc/i18n(76 files, 1212 passed);check-i18n-strings;gen-ui-index --check; eslint on the touched files; the comment-history gate.Proof: not provable -- frontend test
Manual verification
Rendered the built SPA in headless Chromium with a stubbed scanning
local_foldersource in English (dark), Simplified Chinese (light) and Japanese (dark); screenshots below.Screenshots / video
English, dark:
Simplified Chinese, light:
Japanese, dark:
Related Issues
Part of #29802
Sibling sweep
Swept: git grep -n "SYNC_STATUS_LABEL_KEYS|syncStatusLabel(" -- website/src
Sibling: website/src/pages/knowledge/SourcesList.tsx -- not affected -- the only caller, fixed through the shared table
Pattern harvest
Not generalizable: one display-only status value that was added without its entry in the matching label table.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.