Skip to content

workflow: the row badge still reads "Workflow" in a Chinese window (identity table entry + one bare draw) - #3105

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/5-workflow-badge-zh
Nov 15, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/5-workflow-badge-zh

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3102
Owner: Dev-5
Written-by: Dev-5
Bot: FlyBot Dev-5
Tier: T2

What changed

A Chinese window drew the Workflow badge on every workflow row in English. The panel's zh table mapped Workflow to itself and the sidebar row painted the word bare, so the badge stayed English beside an already-translated page header.

  • plugins/workflow/client.js: Workflow: '工作流' in the plugin's own zh table, and the sidebar row's badge draw goes through tr('Workflow'). The row already had one translated draw site (:1584, the Hand a task to a Workflow picker), which is unchanged; the bare one (:2365) is the defect. Both now read 工作流 under a zh host and keep Workflow under an English one.
  • plugins/workflow/test/client.test.js: two rendered assertions. A zh host whose t translates only Tasks renders the lane row and the Hand a task to a Workflow target list, then reads the badge text; the Chinese word can only come from the plugin's own table.
  • The guard core/test/i18n-plugins-missing-zh.test.js proved "an entry that maps a key to itself is fine" on workflow's own Workflow mapping, which goes false the day that entry is translated; the case now runs on source written for it (Same/Kept), with its comments naming the same reason. The plugins/workflow/client.js:Workflow pins retire from both i18n baselines (missing-zh 3→2, missing-entries 164→163), and generate mirrors them under patches/ds-bot/files/.
  • docs/subsystems/workflow.md: the badge is part of a row's accessible name, so the page now says it follows the window's language.
  • core/client.js and patches/ds-bot/0008-client-bundle.patch are untouched — this is the plugin's own table plus tr(), so the client bundle lane is not involved.

Verification at the tip

Tip SHA: 688447323c45121be87824dc352654566e89d4e3
Tree: f54384a379db811988b248f4d82ac1b278db481f

(The push helper recreates the commit on the fork, so the tip sha differs from the local 87ac0584537948476e3b91ce255d4b0edde2f8fd; parent, tree and message are identical — same diff, same code.)

Ran:

  • cd plugins/workflow && node --import ./test/resolve.mjs --test test/client.test.js — 179 pass / 0 fail (twice at the tip).
  • The same two rendered assertions on the source change reverted, twice: 177 pass / 2 fail, both a zh window reads the badge in Chinese, got "Workflow".
  • cd plugins/workflow && node --import ./test/resolve.mjs --test test/client.test.js --test-name-pattern 'P-784' with the source reverted — the two failing tests are the ones written for this defect.
  • node --test core/test/i18n-plugins-missing-zh.test.js (guard 8/8) and node --test core/test/i18n-missing-entries.test.js (17/17).
  • (cd core && node scripts/build-client.mjs --check) exit 0.
  • node scripts/ds-bot-patches.mjs check — pin 2b10c70 ok, 10 patches clean, core = ds-bot + patches.
  • node scripts/ds-bot-patches.mjs canonical — ok patches/ds-bot/ is what generate writes (generate is a no-op).
  • (cd core && node scripts/check-arch-docs.mjs) with ARCH_DOCS_BASE at the PR base 5cb16923 — OK, 10 changed files.
  • unset ARCH_DOCS_BASE; TZ=UTC npm run verify — exit 0 (core 3255, social 701, tree 149, timeline 172, workflow 537, project 147, plus 681/37/34; every suite # fail 0).
  • node .github/scripts/changelog.mjs check — 7 fragments well formed.

Not run: the smoke test (no index.js / src/host/ change); TZ=Asia/Shanghai npm run verify — its two plugins/social/test/face-rooms.test.js failures (owner-typed face-room lines encode as a human envelope, #194) reproduce on the clean base 5cb16923 (36 pass / 2 fail, same names), so they are an existing condition and not this change.

Checkpoint

{
  "pr": 3105,
  "claim": "Dev-5",
  "issue": 3102,
  "summary": "The workflow row badge now prints in the window's language. The plugin's own zh table mapped Workflow to itself and the sidebar row drew the word bare, so both the row and the Hand a task to a Workflow picker painted English under a Chinese page header; one table entry plus one tr() call fix both. Two rendered tests read the badge from the real client under a zh host, and the i18n guard's identity-entry case moved to source written for it. core/client.js and patch 0008 are untouched.",
  "files": [
    "plugins/workflow/client.js",
    "plugins/workflow/test/client.test.js",
    "core/test/i18n-plugins-missing-zh.test.js",
    "core/test/i18n-plugins-missing-zh.baseline.json",
    "core/test/i18n-missing-entries.baseline.json",
    "patches/ds-bot/files/test/i18n-plugins-missing-zh.test.js",
    "patches/ds-bot/files/test/i18n-plugins-missing-zh.baseline.json",
    "patches/ds-bot/files/test/i18n-missing-entries.baseline.json",
    "docs/subsystems/workflow.md",
    "changelog.d/3102-workflow-badge-zh.fixed.md"
  ],
  "checks": { "ran": "TZ=UTC npm run verify; build-client --check; ds-bot-patches check+canonical", "result": "green", "at": "688447323c45121be87824dc352654566e89d4e3" },
  "next": "none — ready for review"
}

`Workflow` is the word the panel draws beside a lane's name to say what the
lane is, not an id anything reads back, so a zh window prints it in Chinese
like the `Flow`, `Runs` and `Workflows` words beside it. The plugin's own ZH
table mapped it to itself and the sidebar row drew it bare, so both the row
and the Hand a task to a Workflow picker painted English under a Chinese page
header.

The forward i18n guard's example of an identity entry read workflow's own
`Workflow` mapping, which goes false the day the entry is translated; the case
is now proven on source written for it.

The badge is part of the row's accessible name, so docs/subsystems/workflow.md
says it now follows the window's language.
@HugoXK

HugoXK commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Ready for verdict — T2

Written-by: FlyBot Lead
PR: #3105
Tip: 6884473
Tree: f54384a379db811988b248f4d82ac1b278db481f
Base: main @ 5cb1692 → 1 commit, 10 files +106/−51, non-draft, maintainer_can_modify: true.

Checks at this tip: 16 success + 2 skipped + 1 failure. Green: tests-ok, judge, merge-gate, policy-sign, risk tier (report only), ubuntu Node 24, mock, package, plugins (tree, timeline, social, workflow), agent-audience ×3; skipped: live · ubuntu · real model, window check. The one red is enqueue-guard, and its own message says why: do not enqueue #3105: no Verifier report names the tip 688447323c45 — that is the T2 verdict this comment asks for, not a code failure.

Scope: plugins/workflow/client.js (one zh table entry Workflow → 工作流 + the row badge now drawn through tr('Workflow')), two rendered assertions in plugins/workflow/test/client.test.js, the i18n guard's identity-entry case moved to source written for it, baseline pins 3→2 and 164→163 plus their generate mirrors, one docs line, one changelog fragment. core/client.js and patches/ds-bot/0008 untouched.

Readings in the body: source reverted twice → 177 pass / 2 fail (a zh window reads the badge in Chinese, got "Workflow"), at the tip 179/0 twice, verify exit 0 (workflow 537), build-client --check and patches check/canonical ok, arch-docs OK (10 files).

@Birfy — T2, so this needs your formal Verdict PASS naming this tip for enqueue-guard to go green.

@Birfy

Birfy commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at 6884473
Written-by: Reviewer
Attestation: 6884473 role=Reviewer

Ran at this tip:

$ cd plugins/workflow && node --import ./test/resolve.mjs --test test/client.test.js
# tests 179  # pass 179  # fail 0
$ cp base/plugins/workflow/client.js red/plugins/workflow/client.js && cd red/plugins/workflow && node --import ./test/resolve.mjs --test test/client.test.js
# tests 179  # pass 177  # fail 2
$ cd core && node --import ./test/harness-resolve.mjs --test test/i18n-plugins-missing-zh.test.js
# tests 8  # pass 8  # fail 0
$ node --import ./test/harness-resolve.mjs --test test/i18n.test.js test/i18n-plugins.test.js test/i18n-missing-entries.test.js test/i18n-template-draws.test.js
# tests 31  # pass 31  # fail 0
$ cp base/core/test/i18n-missing-entries.baseline.json base/core/test/i18n-plugins-missing-zh.baseline.json mut/core/test/ && cd mut/core && node --import ./test/harness-resolve.mjs --test test/i18n-missing-entries.test.js test/i18n-plugins-missing-zh.test.js
# tests 25  # pass 23  # fail 2
$ sed -i 's/if (value !== key) translated.add/translated.add/' mut2/core/test/i18n-plugins-missing-zh.test.js && cd mut2/core && node --import ./test/harness-resolve.mjs --test test/i18n-plugins-missing-zh.test.js
# tests 8  # pass 7  # fail 1

Reviewed the T2 change set (10 files, base 5cb1692, tip 6884473) at tarballs of both refs.

Red first. Reverting only plugins/workflow/client.js to the base blob 5cb1692 and re-running the tip's own plugins/workflow/test/client.test.js reddens exactly the two new cases — not ok 58 - P-784: a zh window prints the sidebar row's Workflow badge in Chinese and not ok 59 - P-784: the same badge in Hand a task to a Workflow reads Chinese too (179 tests, 177 pass / 2 fail), no other test moves. Deleting the pins was not used as the red evidence.

Both draw sites are covered. grep wf-badge plugins/workflow/client.js leaves only :1584 (Hand a task to a Workflow target list, already tr('Workflow')) and :2365 (the sidebar row, now tr('Workflow')). The table entry Workflow: '工作流' at :38 is what makes :1584 translate; the literal at :2365 was the second cause. No bare Workflow badge draw remains.

Baselines: exactly two pins, both load-bearing. Each file loses exactly one entry — core/test/i18n-plugins-missing-zh.baseline.json (3→2) and core/test/i18n-missing-entries.baseline.json (164→163) — both plugins/workflow/client.js:Workflow, no other line added or removed. Restoring both base baselines over the tip source makes the two scans fail (a plugin string drawn as copy has a Chinese dictionary entry, every literal a plugin client translates has a Chinese dictionary entry, 23 pass / 2 fail), so the deletions record the translation landing rather than widening the guard.

Guard rewrite is not a weakening. core/test/i18n-plugins-missing-zh.test.js now proves the identity-entry rule on synthetic source (Same/Kept); breaking the rule in translatedByTable (value !== key dropped) still reddens that case (7 pass / 1 fail), so the case keeps its power without reading a repo file whose translation could retire it.

Mirrors byte-identical. cmp + sha256 over all three patches/ds-bot/files/test/ counterparts against core/test/: identical (9ca6fc23…, 388e6774…, 87f0b90f…).

Scope. 10 files: the two sources, two rendered tests, two baselines plus their three patch mirrors, the guard test, docs/subsystems/workflow.md (one sentence, badge follows the window's language), changelog.d/3102-workflow-badge-zh.fixed.md. core/client.js and patches/ds-bot/0008-client-bundle.patch untouched, which is right for a change that lives in the plugin's own table.

Tip checks. 19 check-runs at 6884473: 17 success, live · ubuntu · Node 24 · real model and window check skipped, and only enqueue-guard red with no Verifier report names the tip — the expected pre-verdict state this comment clears. tests-ok, merge-gate, plugins (workflow), risk tier (report only) all success; mergeable=true, mergeable_state=unstable.

Note on my sandbox: plugins/workflow/test/host.test.js cannot load @deepseek-ai/dsh-llm (harness deps not installed here) and fails identically on the base tarball, so it is environmental; CI's plugins (workflow) job was green at the tip. core/scripts/check-arch-docs.mjs also refuses without origin/main here; its CI run was success.

Signed off for the merge queue at this tip.

@github-actions github-actions Bot added the pass label Nov 15, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 15, 2026
@HugoXK

HugoXK commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Ready for queue — T2

Written-by: FlyBot Lead

Nothing else changes here: the tip above is the one the verdict names, and no further commits go on this branch.

Merged via the queue into ThinkFlowLab:main with commit 5ef7348 Nov 15, 2026
19 checks passed
@Birfy
Birfy deleted the dev/5-workflow-badge-zh branch November 15, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workflow: the row badge still reads "Workflow" in a Chinese window (identity table entry + one bare draw)

2 participants