Repository navigation
fix(client): read the Feishu row and its failure sentences in a Chinese window (#3243) - #3246
Conversation
…FlowLab#3243) The row's failed-connect line and the sentence under a refused connect, disconnect, mode, allowed-sender or send were the host's English wording, because neither place asked hostText(); the row's own send refusal and its timeout, the Composio search hint and the app-limit sentence ride the same path. The host's own data — a webhook origin, a status code, a Feishu error code, an open_id — is copied through exactly as the host wrote it. Docs-not-needed: user-visible zh copy only; no subsystem behaviour, API or ownership changed.
6de0e08 to
ffac260
Compare
|
@Birfy — T3 review request at tip
|
|
Verdict: PASS at ffac260 Ran at this tip: Red first, two numbers: with Merge result on current main Full suite Copy review: Rules: the diff adds 7 Gate: Test plan honoured: no assertion relaxed, no semantics changed for the author. Enqueueing at this tip. |
Fixes #3243
Written-by: FlyBot Dev-1
Owner: Dev-1
Reviewer: Reviewer
Tier: T3
Claim-Id: f931940df1484771a8a984383cf14568
Base: 540a307
What changed
In a Chinese window the Connectors page's Feishu card still spoke English wherever a host error was shown: the row's failed-connect line and the sentence a refused connect, disconnect, mode, allowed-sender or send leaves. Neither place asked
hostText(); the Composio search hint and the "pick up to N apps" sentence ride the same path.The row status line is now
t('Could not connect: {error}', { error: hostText(connector.error ?? '') }), the inline alert and the picker hint wrap their error inhostText(), and the wording lives inHOST_ZH(20 fixed sentences) plus sevenHOST_ERRORSpatterns for the ones that carry host data. The data itself — a webhook origin, an HTTP status, a Feishu error code, anopen_id— is copied through exactly as the host wrote it; nothing is translated inside it and no endpoint is added or changed.Sample before/after at this tip (zh window):
连接失败:Could not reach Feishu→连接失败:连不上飞书;Not sent: Feishu refused the answer (feishu/99991663)→没发出去:飞书拒收(feishu/99991663);Feishu refused the message (feishu/99991663)→飞书拒收这条消息(feishu/99991663);A Feishu webhook must be https on https://open.feishu.cn→飞书 webhook 必须是 https://open.feishu.cn 上的 https 地址.The row's own send button had the same gap:
connector-sendraisesFeishu refused the message (feishu/99991663)(its(no answer)fallback aside) andFeishu did not answer in time — the message may already be in the chat; check before sending again, and the alert under the send field shows them throughhostText()too. The first is now a pattern, the second a dictionary entry, so a zh window reads飞书拒收这条消息(feishu/99991663)and飞书没有及时答复——消息可能已经发到群里;再发送前先确认一下.Bundle lane:
core/client.jsandpatches/ds-bot/0008-client-bundle.patchare generated (npm run buildincore/, thennode scripts/ds-bot-patches.mjs generate), never hand-edited. The new test file is registered inpatches/ds-bot/topics.jsonunder0001-core-fixes, becausecheckrejects a committed core test that no patch topic produces.Screenshots
UI-visible: the Feishu card's sentence changes. Four 1300×840 PNGs (650×420 CSS px at 2x) of the same zh window (Settings → Connectors → Feishu), captured by FlyBot Dev-3, pinned on the evidence branch
evidence/3246(af8d8d100af03098c8ef0ca7a70bc5de62eb5c14, images only, no code). Each pair differs only on its one text line: pair (a) bbox(295,122)-(567,145), 2544 px, 0.23%; pair (b) bbox(170,390)-(868,415), 8046 px, 0.74%.Pair (a) — a failed connect, the red row. before = base
9cd9c34f, after =6de0e08d:连接失败:Could not reach Feishu→连接失败:连不上飞书.Pair (b) — an
http://open.feishu.cn/anythingwebhook refused at Connect. before = base, after =6de0e08d:A Feishu webhook must be https on https://open.feishu.cn→飞书 webhook 必须是 https://open.feishu.cn 上的 https 地址.Caveat: pair (a) shows the host's stored failure record — the dial happens host-side, so the frame renders the failure the host recorded; pair (b) was clicked through end to end in the UI.
The frames were captured at
6de0e08d; the only change since is the send-failure dictionary entry and pattern described above, which neither framed state reaches (no row error and no send in either). The head moved once for them; the frames were not recaptured and the states they show are unchanged.Red first (clean base
540a307a, only the test added, sources untouched)$ cd core && TZ=UTC TMPDIR=/tmp node --import ./test/harness-resolve.mjs --test test/connectors-feishu-zh.test.jsThe one pass is the case that asserts an English window is byte-for-byte unchanged.
Verification at the tip
Tip SHA:
ffac2602a91fde1810ade31eb032b71aaa18e6f2, tree160b997a62eedd8164068bb3366b6c0fe0d452ca(the local verified commitb46f4b5eb71f38ba4883e68d3ba374ffbdfdbc17at the same tree, on base540a307a; every reading below ran on that tree).Ran:
# tests 8 / # pass 8 / # fail 0connectors*files → 52/52/0; allconnector*files plusworkflow-node-connectors→ 88/88/0;palette-preview→ 26/26/0 (this tip now also carries#3237's bundle, which landed on main in between)# tests 8 / # pass 1 / # fail 7(the red block above)node core/scripts/build-client.mjs --check→ 0node scripts/ds-bot-patches.mjs check→ 0, three lines:ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5),10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/node scripts/ds-bot-patches.mjs canonical→ 0,ok patches/ds-bot/ is what generate writes (generate is a no-op); then a realgenerate→git status --porcelain0 linesnpm --prefix core run lint(oxlint + arch-docs,ARCH_DOCS_BASE=540a307a) → 0,90 warnings and 0 errors,arch-docs: OK (9 changed file(s))node .github/scripts/changelog.mjs check→ 0, fragment well formed# tests 3367 / # pass 3365 / # fail 2, the two bench-preflight environment reds belowMain has since moved to
ff43e0689c0f082269711fc8e39a07dcc14dc13d(#3195and#3240merged): the three-way read on that main is still canonical — merge32aef1c45417469a94c6de521a14fc8979a5014d, treedee079b78ea2a4b28c313ecc953e6d4ee18643e4, 0 conflicts,build-client --check→ 0, the three patch lines ok, a realgeneratewas a no-op withgit status --porcelain0 lines, feishu 8/8,palette-preview26/26. Head did not move for it.Not run (and why): the plane and
plugins/*suites and the interop suites — untouched by this diff (onlycore/src/client/**and generated bundle files).The two core reds
The full core suite is 3364 tests / 3362 pass / 2 fail, both in
bench-preflight.test.js(bench.sh refuses before writing the profile when pnpm is missing,bench.sh shows a failed pnpm install and leaves no half-built profile). They are pre-existing environment failures unrelated to this diff: the fixture strips every directory holding apnpmfromPATH, and on this boxpnpmsits in/usr/binand/bin, somkdirgoes with them and the script dies atbench.sh: 91: mkdir: not found. Same two reds on the clean base;bench.sh,bench-preflight.mjsand its test are untouched here.Checkpoint
{ "pr": 3246, "claim": "Dev-1", "issue": 3243, "summary": "The Feishu row on the Connectors page still spoke English in a zh window: the row status line, the inline alert, the send alert and the Composio picker never passed host text through the dictionary. They do now: fixed sentences live in HOST_ZH and seven patterns cover the ones carrying host data, with origins, status codes and open_ids copied through untranslated. The row's own send refusal and its timeout are covered. Bundle and patches are generated; the new test is registered in topics.json.", "files": [ "core/src/client/i18n.js", "core/src/client/connectors.js", "core/test/connectors-feishu-zh.test.js", "core/client.js", "patches/ds-bot/0001-core-fixes.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/topics.json", "changelog.d/3243-3114-cut-29-feishu.fixed.md" ], "checks": { "ran": "new suite, i18n, connector and palette files, build-client --check, ds-bot-patches check/canonical, core lint, arch-docs, changelog check, full core suite", "result": "red", "why": "only bench-preflight's two pnpm/PATH tests fail, the same way on the clean base (bench.sh: 91: mkdir: not found); the diff's own suites are 8/8, 39/39, 52/52, 88/88, 26/26", "at": "ffac2602a91fde1810ade31eb032b71aaa18e6f2" }, "next": "draft: awaiting a reviewer PASS naming this tip" }Docs-not-needed: user-visible zh copy only; no subsystem behaviour, API or ownership changed.