Skip to content

fix(knowledge): translate the syncing badge on a scanning source - #33328

Merged
buluoray merged 1 commit into
mainfrom
crew/slack/knowledge-syncing-label
Nov 8, 2026
Merged

buluoray merged 1 commit into
mainfrom
crew/slack/knowledge-syncing-label

Conversation

@buluoray

@buluoray buluoray commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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, displaySyncStatus reads the row as 'syncing', and the badge text comes from syncStatusLabel. Its label table SYNC_STATUS_LABEL_KEYS (website/src/pages/knowledge/knowledgeUtils.ts) had entries for active, synced, error and paused only, 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

  • Changing when a row reads as syncing.
  • Any other status label or badge color.

What changed (motivation → approach → change)

  • Symptom: a scanning folder row shows "syncing" untranslated.
  • Cause: no syncing entry in SYNC_STATUS_LABEL_KEYS and no status.syncing catalog key.
  • Change: knowledgeUtils.ts maps syncing to pages.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 scanning local_folder row shows the badge text "Syncing" and no raw "syncing".
  • website/src/test/KnowledgeUtilsCov80.test.ts: syncStatusLabel('syncing') resolves to the status.syncing key; the unknown-status fallback is checked with a value that is not a status.
  • Mutation check: deleting the syncing entry turns the SourcesList test red; restored afterwards.
  • Determinism: SourcesList.syncError.test.tsx passed 3 runs with --sequence.shuffle.
  • Also ran: tsc --noEmit -p tsconfig.app.json; vitest on the two files above plus SourcesListCoverage and KnowledgeIndexCoverage (105 passed); vitest src/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_folder source in English (dark), Simplified Chinese (light) and Japanese (dark); screenshots below.

Screenshots / video

English, dark:

Scanning folder source, English

Simplified Chinese, light:

Scanning folder source, Simplified Chinese

Japanese, dark:

Scanning folder source, Japanese

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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

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.
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 8, 2026 17:44
@buluoray
buluoray requested a review from tim-finnigan November 8, 2026 17:44
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 20b24dcaaf095f59ceecf9fe3dd1b6a406b86932 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 20b24dcaaf095f59ceecf9fe3dd1b6a406b86932 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. This fix is one table entry plus one catalog key. The rewritten fallback test used 'syncing' only as a sample unknown value, and the description says so.

What this change ships

Inventory (4 items) — 4 justified

Intent: 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.

  1. A scanning folder row's badge now reads a translated "Syncing" instead of the raw "syncing". — justified
  2. The status.syncing catalog key is added in all 12 locales plus the pseudo-locale. — justified
  3. The test of the unknown-status fallback now uses not_a_status instead of syncing. — justified
  4. New tests check that syncStatusLabel('syncing') resolves to the catalog key, and that a scanning row renders "Syncing". — justified

[FIRST-PRINCIPLES-REVIEWED] 20b24dc

Description read

[DESCRIPTION-READ] ea90c2c8b12022708982e360c8e32ebc20a76977bb7ee2ce2d32d2553ca71a10

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 20b24dcaaf095f59ceecf9fe3dd1b6a406b86932 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The English badge renders in a code-like monospace font that the CJK versions don't show, so the blind reader took it for "a different kind of element". This styling was already there before this PR; a follow-up could drop font-mono from the status pill.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 20b24dcaaf095f59ceecf9fe3dd1b6a406b86932 — this comment is updated in place on each push.

Review details

I 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:

  • Label mapping: knowledgeUtils.ts already turns a row that is still scanning into the syncing status. The new entry in SYNC_STATUS_LABEL_KEYS gives that status a translated label instead of the raw string.
  • Catalog coverage: the new key is in en.manual.json (the hand-written English strings), the eleven translated catalogs and the en-XA pseudolocale. en.json doesn't need it, because enCatalog.ts merges en.manual.json in.
  • Tests: the "unknown status" test now uses a different made-up status, since syncing is now a known one.

No findings.

[OPUS-REVIEWED] 20b24dc

Verdict parsed from the review's SHA-scoped output markers for commit 20b24dcaaf095f59ceecf9fe3dd1b6a406b86932.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 20b24dcaaf095f59ceecf9fe3dd1b6a406b86932 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 20b24dcaaf095f59ceecf9fe3dd1b6a406b86932 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 20b24dc

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 20b24dcaaf095f59ceecf9fe3dd1b6a406b86932 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 8, 2026
@buluoray
buluoray merged commit d924344 into main Nov 8, 2026
98 checks passed
@buluoray
buluoray deleted the crew/slack/knowledge-syncing-label branch November 8, 2026 18:59
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
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