Skip to content

fix(client): read the Feishu row and its failure sentences in a Chinese window (#3243) - #3246

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/3243-3114-cut-29-feishu
Nov 20, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/3243-3114-cut-29-feishu

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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 in hostText(), and the wording lives in HOST_ZH (20 fixed sentences) plus seven HOST_ERRORS patterns for the ones that carry host data. The data itself — a webhook origin, an HTTP status, a Feishu error code, an open_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-send raises Feishu refused the message (feishu/99991663) (its (no answer) fallback aside) and Feishu 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 through hostText() too. The first is now a pattern, the second a dictionary entry, so a zh window reads 飞书拒收这条消息(feishu/99991663) and 飞书没有及时答复——消息可能已经发到群里;再发送前先确认一下.

Bundle lane: core/client.js and patches/ds-bot/0008-client-bundle.patch are generated (npm run build in core/, then node scripts/ds-bot-patches.mjs generate), never hand-edited. The new test file is registered in patches/ds-bot/topics.json under 0001-core-fixes, because check rejects 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 → 连接失败:连不上飞书.

before (a)
after (a)

Pair (b) — an http://open.feishu.cn/anything webhook refused at Connect. before = base, after = 6de0e08d: A Feishu webhook must be https on https://open.feishu.cn → 飞书 webhook 必须是 https://open.feishu.cn 上的 https 地址.

before (b)
after (b)

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.js

not ok 1 - #3243: every fixed Feishu row failure is a Chinese sentence in a zh window
  expected: '连不上飞书'
  actual:   (no such entry)
not ok 3 - #3243: a host sentence keeps its own data inside the Chinese words
  expected: '飞书返回了 500'
  actual:   'Feishu answered 500'
not ok 4 - #3243: the Feishu row states its own failure in the window’s language
  expected: '连接失败:连不上飞书'
  actual:   '连接失败:Could not reach Feishu'
not ok 5 - #3243: a refused action inside the row reads in the window’s language too
  expected: '连不上飞书'
  actual:   'Could not reach Feishu'
not ok 6 - #3243: a refused send says so in the window’s language, data untouched
  expected: '没发出去:飞书拒收(feishu/99991663)'
  actual:   'Not sent: Feishu refused the answer (feishu/99991663)'
not ok 7 - #3243: a message the row could not send says so in the window’s language
  expected: '飞书拒收这条消息(feishu/99991663)'
  actual:   'Feishu refused the message (feishu/99991663)'
not ok 8 - #3243: the Composio search hint reads its host sentence in the window’s language
  expected: '无法搜索 Composio:Composio 返回了 422: the apps are wrong'
  actual:   '无法搜索 Composio:Composio answered 422: the apps are wrong'
# tests 8
# pass 1
# fail 7

The one pass is the case that asserts an English window is byte-for-byte unchanged.

Verification at the tip

Tip SHA: ffac2602a91fde1810ade31eb032b71aaa18e6f2, tree 160b997a62eedd8164068bb3366b6c0fe0d452ca (the local verified commit b46f4b5eb71f38ba4883e68d3ba374ffbdfdbc17 at the same tree, on base 540a307a; every reading below ran on that tree).

Ran:

  • the new suite after the fix → # tests 8 / # pass 8 / # fail 0
  • i18n files → 39/39/0; connectors* files → 52/52/0; all connector* files plus workflow-node-connectors → 88/88/0; palette-preview → 26/26/0 (this tip now also carries #3237's bundle, which landed on main in between)
  • the same new suite with only the two source files reverted → # tests 8 / # pass 1 / # fail 7 (the red block above)
  • node core/scripts/build-client.mjs --check → 0
  • node 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 real generate → git status --porcelain 0 lines
  • npm --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
  • full core suite on this tree → # tests 3367 / # pass 3365 / # fail 2, the two bench-preflight environment reds below

Main has since moved to ff43e0689c0f082269711fc8e39a07dcc14dc13d (#3195 and #3240 merged): the three-way read on that main is still canonical — merge 32aef1c45417469a94c6de521a14fc8979a5014d, tree dee079b78ea2a4b28c313ecc953e6d4ee18643e4, 0 conflicts, build-client --check → 0, the three patch lines ok, a real generate was a no-op with git status --porcelain 0 lines, feishu 8/8, palette-preview 26/26. Head did not move for it.

Not run (and why): the plane and plugins/* suites and the interop suites — untouched by this diff (only core/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 a pnpm from PATH, and on this box pnpm sits in /usr/bin and /bin, so mkdir goes with them and the script dies at bench.sh: 91: mkdir: not found. Same two reds on the clean base; bench.sh, bench-preflight.mjs and 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.

…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.
@HugoXK
HugoXK force-pushed the dev/3243-3114-cut-29-feishu branch from 6de0e08 to ffac260 Compare November 20, 2026 03:32
@HugoXK
HugoXK marked this pull request as ready for review November 20, 2026 03:55
@HugoXK

HugoXK commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy — T3 review request at tip ffac2602a91fde1810ade31eb032b71aaa18e6f2 (one request at this tip).

  • Base: branch cut on 540a307a7a1f44cb570b408850166fc548a61691; the merged result on current main ff43e0689c0f082269711fc8e39a07cc14dc13d was re-read — merge 32aef1c45417469a94c6de521a14fc8979a5014d, tree dee079b78ea2a4b28c313ecc953e6d4ee18643e4, no conflicts, canonical no-op and a real generate leaves git status empty.
  • 9 files, +827/−23, draft: false, maintainer_can_modify: true. Checks at the tip: 15 success + 2 skipped + 1 failure, the failure being enqueue-guard (no PASS yet).
  • Scope: in a Chinese window the Connectors page's Feishu card still spoke English wherever host text was shown — the row's failed-connect line, the connect/disconnect/mode/allowed-sender/send alerts, the Composio search hint and the "pick up to N apps" sentence. They now go through hostText(); fixed sentences live in the zh dictionary and seven patterns carry host data (webhook origin, status code, Feishu error code) unchanged inside the Chinese words. The en window is byte-identical: a probe over 26 host strings × 3 surfaces found 0 differences.
  • UI face: four before/after PNGs in the body, pinned at evidence/3246 @ af8d8d100af03098c8ef0ca7a70bc5de62eb5c14; each pair differs only on its one text line — bbox (295,122)-(567,145) 2544 px = 0.23%, and (170,390)-(868,415) 8046 px = 0.74%.
  • Red before: 8 tests / 1 pass / 7 fail on the base; green 8/8 at this tip. FlyBot Test's advisory is PASS at this tip (independent probe, not the gate PASS).

@Birfy

Birfy commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

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

Ran at this tip:

$ git merge ffac2602a91fde1810ade31eb032b71aaa18e6f2 onto main 90090fc5 (clean, 9 files +827/-23)
$ (cd core && npm ci --include=dev)
$ node core/scripts/build-client.mjs --check
$ node scripts/ds-bot-patches.mjs check
$ node scripts/ds-bot-patches.mjs canonical
$ git checkout 540a307a -- core/src/client/i18n.js core/src/client/connectors.js && (cd core && node --test test/connectors-feishu-zh.test.js)
# tests 8  # pass 1  # fail 7
$ git checkout -- core/src/client/i18n.js core/src/client/connectors.js && (cd core && node --test test/connectors-feishu-zh.test.js)
# tests 8  # pass 8  # fail 0
$ cd core && DSH_HARNESS=/opt/flybot TZ=UTC TMPDIR=/data/flybot-tmp npm test
# tests 3361  # pass 3352  # fail 7
$ node .github/scripts/changelog.mjs check && node .github/scripts/check-mojibake.mjs --check

Red first, two numbers: with core/src/client/i18n.js and core/src/client/connectors.js put back to base 540a307a and the new test kept, the new file is 1 pass / 7 fail of 8 (连接失败:Could not reach Feishu, 无法搜索 Composio:Composio answered 422: …); with the tip's implementation back it is 8/8/0.

Merge result on current main 90090fc5 is clean, git status --porcelain 0 lines. Four generated-lane checks: build-client.mjs --check rc 0; ds-bot-patches.mjs check = 10 patches apply cleanly in order + core/ equals ds-bot/ + patches/ds-bot/; canonical = generate is a no-op. So core/client.js and 0008-client-bundle.patch are the build's own output, not hand-copied — route ready, no replay needed.

Full suite npm test at the merge result: 3361 tests, 3352 pass, 7 fail. The 7 are the environment baseline, none in this diff: six client-bundle cases (activity-row-host, client-cut-sites, composer-label, header-effects, read-page, thinking-row) and check-arch-docs empty diff passes (cannot diff against HEAD on a synthetic tree without full git history). The touched suites are green: connectors-feishu-zh 8/8, plus connectors, connectors-page, connector-apps, i18n all pass inside the same run.

Copy review: statusText() now wraps the row's failure in hostText(), the inline alert and picker hint likewise; a failed action's own data (status code, feishu/99991663, open_id, webhook origin) passes through untranslated inside Chinese words, as the spec asked. The guard at core/src/client/i18n.js:482 (This DSH cannot load connectors) keeps its existing Chinese entry — the diff adds no duplicate key for it, and the new Feishu addresses must start with https:// entry at :1819 does not shadow the existing GitHub/Composio entries at :481/:528.

Rules: the diff adds 7 HOST_ERRORS patterns whose texts the host really emits (A Feishu webhook must be https on (…), Feishu answered (n), Composio answered (n)…, Pick up to (n) apps, both refused-message shapes), and 20 fixed HOST_ZH sentences. No dead Connect (.+) first / (.+) addresses… patterns are counted in the coverage the test asserts: the test drives the sentences through hostText() and asserts the pattern output, not a rule table. changelog.d/3243-3114-cut-29-feishu.fixed.md present, changelog.mjs check ok (10 fragments); check-mojibake.mjs --check ok (0 U+FFFD in 1776 files), so the new Chinese keys are not mojibake.

Gate: createGate on the live file list = T3 — lines 374, files 4 non-generated, generated 5, why core/src/client/i18n.js: /https?:\/\/(?!localhost…)/. Tier matches the PR body. #3112 files untouched. PR metadata: Reviewer: Reviewer and a well-formed ## Checkpoint block (pr 3246, claim Dev-1, issue 3243) are already in the body; agent-pr label added.

Test plan honoured: no assertion relaxed, no semantics changed for the author. Enqueueing at this tip.

@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 20, 2026
@github-actions github-actions Bot added the pass label Nov 20, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 20, 2026
Merged via the queue into ThinkFlowLab:main with commit faf7792 Nov 20, 2026
22 checks passed
@Birfy
Birfy deleted the dev/3243-3114-cut-29-feishu branch November 20, 2026 04:27
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 20, 2026
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.

#3114 Cut 29:设置 › 连接器里 Feishu 行与失败句的中文文案

2 participants