Skip to content

Read a remote file chip's download title in the window's language (#3114) - #3259

Merged
Birfy merged 1 commit into
mainfrom
dev/3114-remote-file-chip-zh
Nov 20, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3114-remote-file-chip-zh

Conversation

@Birfy

@Birfy Birfy commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev

Fixes #3258
Part of #3114

Owner: Dev
Reviewer: Reviewer
Docs-not-needed: one dictionary entry and one draw site in the chat cells; no architecture change.

What changed

Before: hovering a remote file chip in a zh window read Download log.txt (untrusted file from a remote Bot). After: it reads 下载 log.txt(来自远程 Bot 的不可信文件), and an English window keeps today's sentence byte for byte.

core/src/client/cells.js:463 no longer builds the sentence as a template literal; it draws t('Download {name} (untrusted file from a remote Bot)', { name: file.name }), and core/src/client/i18n.js gains that key right after Download: '下载',. The file name is the sender's data and is filled in untranslated — fill uses a function replacer, so $&, $1 or a literal {name} inside a name stay literal. Downloads (onClick / attachment call / object-URL cleanup), file-name cleaning and other screens are untouched.

Verification at the tip

Tip SHA: 382c70cb035332e8bfb495a2a6684d7aea16896f

Ran:

  • (cd core && TZ=UTC node --test test/empty-message-cell.test.js) — red first on cc885ca4 before the implementation: # tests 5 / # pass 3 / # fail 2 (test 4's actual title was Download log.txt (untrusted file from a remote Bot); test 5 also pinned the missing dictionary value); green at the tip: # tests 5 / # pass 5 / # fail 0.
  • (cd core && TZ=UTC node --test test/i18n.test.js) — 3/3/0 (dictionary gate: every drawn t('…') has an entry).
  • Five i18n gates: test/i18n.test.js test/i18n-missing-entries.test.js test/i18n-template-draws.test.js test/i18n-plugins.test.js test/i18n-plugins-missing-zh.test.js — 39/39/0; three baselines 12 / 9 / 46 ok.
  • (cd core && npm run build) then node scripts/ds-bot-patches.mjs generate twice (idempotent), canonical, check — ok patches/ds-bot/ is what generate writes, ok 10 patches apply cleanly in order, ok core/ equals ds-bot/ + patches/ds-bot/; git status --porcelain empty.
  • node core/scripts/build-client.mjs --check — rc 0; git diff --exit-code -- core/client.js rc 0.
  • node .github/scripts/changelog.mjs check — 12 fragment(s) ... well formed; node .github/scripts/check-mojibake.mjs --check — 0 occurrences of U+FFFD in 1781 text files.
  • ARCH_DOCS_BASE=cc885ca47e13f9754b36eae3842595ece16455ef node core/scripts/check-arch-docs.mjs — arch-docs: OK (9 changed file(s)).
  • risk-gate.judge() over the PR files — T1 0 50 4 5 (tier T1, empty why, 50 handwritten lines, 4 handwritten files, 5 generated).

Generated artifacts: core/client.js (+5/−1), patches/ds-bot/0001-core-fixes.patch (+5/−1), 0003-flybot-api-client.patch (+1/−1), 0008-client-bundle.patch (+6/−2), files/test/empty-message-cell.test.js (+41/−2); patches/ds-bot/topics.json untouched.

Not run (and why):

  • npm run verify — the shared @deepseek-ai harness install is not usable on this machine (core/node_modules is the build-only esbuild install), so the full suite would be red for reasons unrelated to this change. The affected test file, the dictionary gates and every generated-artifact check above were run instead.
  • Smoke test and Desktop — not needed for a client copy change with no host or component structure change.

Checkpoint

{
  "pr": 3259,
  "claim": "Dev",
  "issue": 3258,
  "summary": "Remote file chips in a chat now read their hover title from the dictionary, so a zh window says the file comes from a remote Bot and is untrusted while an English window keeps today's sentence. The file name is the sender's data and is filled into the sentence untranslated. The change is one dictionary entry and one draw point; downloads, file-name cleaning and other screens are untouched.",
  "files": ["core/src/client/i18n.js", "core/src/client/cells.js", "core/test/empty-message-cell.test.js", "changelog.d/3114-remote-file-chip-zh.fixed.md"],
  "checks": { "ran": "cd core && TZ=UTC node --test test/empty-message-cell.test.js (5/5/0), i18n gates (39/39/0), ds-bot-patches generate/canonical/check, build-client --check", "result": "green", "at": "382c70cb035332e8bfb495a2a6684d7aea16896f" },
  "next": "none — ready for review"
}

)

Docs-not-needed: one dictionary entry and one draw site in the chat cells; no architecture change.
@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 20, 2026
@Birfy Birfy self-assigned this Nov 20, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit dd7599d Nov 20, 2026
17 of 19 checks passed
@Birfy
Birfy deleted the dev/3114-remote-file-chip-zh branch November 20, 2026 08:12
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 20, 2026
@Birfy

Birfy commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Chief · 2026-11-20T08:20Z

合入记录(补记,因为本单没有逐 tip 的证据评论):

  • 08:12:11Z 合入,merge commit dd7599d315bd762daa143e68cf622923dceca8ec(base cc885ca4 之后 main 又前进过两次:#3256 → 4128e27a、#3254 → f920d3c7)。
  • 收口单 聊天屏 › 远程文件 chip 的下载提示按窗口语言显示(Cut 32) #3258 已 closed/completed(08:12:12Z)。
  • 合并队列三条全绿:Test merge_group 44700248799、Merge gate 44700248659、Enqueue guard 44700248673… 见 run 列表。
  • main 上 push Test 44700666264 success(08:12:12Z);该 tip 22 项 check 全终态、无 failure。

流程事实(写在这里当记录):这张 PR 走的是 T1 直通路由——inspect 之后 review 节点被 routed 成 skipped、直接进 enqueue,所以派活 brief 里要求的「逐 tip 证据评论(红先两次数 + A13 档位自证)」一步都没执行,这单在合入前没有任何评论。合入本身合规(T1 不需 PASS,队列四项检查都过),但证据记录缺了一环。

处置:以后 T1 的 PR 快线 brief 明写「证据评论由 enqueue 节点负责,review 被跳过时也必须发」,避免同类单子无痕合入。本条不改代码、不改门。

@Birfy

Birfy commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Correction from Chief: 上一条(7034258429)里三个 run id 我写错了两个,以下为准(来源 /actions/runs?head_sha=dd7599d315…,08:14Z 实读):

  • Test merge_group = 44700248799(success)
  • Merge gate merge_group = 44700248809(success)
  • Enqueue guard merge_group = 44700248659(success)
  • main push Test = 44700666264(success,08:12:12Z)

其余内容不变:merge dd7599d315bd762daa143e68cf622923dceca8ec、#3258 closed/completed 08:12:12Z、tip 22 项 check 无 failure、以及「T1 直通没有留证据评论」那条流程事实。

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.

聊天屏 › 远程文件 chip 的下载提示按窗口语言显示(Cut 32)

1 participant