Skip to content

Read a paused friend chat's notice in the window's language (#3114) - #3239

Closed
HugoXK wants to merge 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/3238-3114-cut-28
Closed

HugoXK wants to merge 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/3238-3114-cut-28

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Written-by: FlyBot Dev-3

Fixes #3238

Owner: Dev-3
Bot: Dev-3
Claim-Id: 5370712b31d94c53a10c45552f6c7b9c
Tier: T2
Reviewer: Reviewer

What changed

The quiet card a friend chat draws after Bot Social pauses it said three things in bare English in every window: the title Chat paused, the sentence carrying Bot Social's reason, and the Send your message again: it starts a new chat. line. All three now go through the plugin's own tr(); the zh dictionary gains the four keys, and the two i18n baselines lose the draws those English strings held.

Bot Social's reason is server data: it stays as it arrived, inside the sentence, and is not translated. One reason sentence plus one what-to-do-next sentence, as before.

Not changed

social/paused 5s polling, the handle/paused early return, role="status", data-flybot="chat-paused", the fs-hold fs-chat-approval / fs-label / fs-draft classes and the CSS are untouched. A host with no translator still draws today's English word for word.

Red first (clean base, only the new test in the tree)

Base main c0e3a586bf6fb7f7796662a3f200ec34ad7b4d08; node --test plugins/social/test/paused-chat-i18n.test.js, twice, same shape:

# tests 5 / # pass 2 / # fail 3
not ok 1 - #3114 cut 28: the paused friend chat speaks the window’s language, with Bot Social’s reason
  actual  'Chat paused' / 'Bot Social paused the last chat with this Bot (loop detected). Send your message again: it starts a new chat.'
  expect  '聊天已暂停' / 'Bot Social 暂停了与这个 Bot 的上一次聊天(loop detected)。请重新发送消息:这会开始一段新聊天。'
not ok 2 - #3114 cut 28: a pause with no reason still reads as one sentence pair
  actual  'Bot Social paused the last chat with this Bot. Send your message again: it starts a new chat.'
  expect  'Bot Social 暂停了与这个 Bot 的上一次聊天。请重新发送消息:这会开始一段新聊天。'
not ok 5 - #3114 cut 28: the two baselines lose these draws and the dictionary gains the keys
  error: 'missing still pins plugins/social/client.js:Chat paused'

Examples 3 (no translator keeps English) and 4 (only drawn for a friend's Bot chat Bot Social paused) already pass on the red tree — they are the guards this change must not break.

Green

# tests 5 / # pass 5 / # fail 0   (twice, same shape)
check reading
cd plugins/social && npm test # tests 757 / # pass 757 / # fail 0, # skipped 0 (main: 752)
core i18n gates (i18n, i18n-missing-entries, i18n-template-draws, i18n-plugins, i18n-plugins-missing-zh) 39 / 39 / 0
social i18n files (sharing-page, add-friend, face-waiting-room, friend-settings, face-invite-card, room-auto-send, sharing-rooms, paused-chat) 33 / 33 / 0
(cd core && node scripts/build-client.mjs --check) rc 0
node .github/scripts/changelog.mjs check changelog: 2 fragment(s) in changelog.d/ are well formed
(cd core && npm run lint) 605 files / 97 rules / 0 errors, arch-docs: OK
node scripts/ds-bot-patches.mjs check ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70, ok 10 patches apply cleanly in order, ok core/ equals ds-bot/ + patches/ds-bot/
node scripts/ds-bot-patches.mjs canonical ok patches/ds-bot/ is what generate writes (generate is a no-op)
risk gate (createGate) T2, why [], lines 164, files 11, generated 5

Totals: 16 paths — 11 handwritten (+155/−9) and 5 generated (+17/−4).

The local checks above ran on a061f58c9c79b46ec4aec851ba213234b64adb1f; the pushed tip 695cacec3565ba49f6573b7b80b4165771930596 was created through the Git Data API from the same tree f2568c680de2c14f15add3ed20c8132e94a79b1f, so the code under test and the tip are the same tree.

Ran / Not run

Ran: the commands in the table above, plus the red run above, at base c0e3a58 and at this tip. Ran as well: the two evidence renders (headless chromium, real component source from both trees). Not run: npm run verify as one command (its parts were run individually) and the smoke test (no index.js / src/host/ change).

Screenshots

Rendered from the real PausedChat component of both trees — base c0e3a58 and this PR's tree — inside the host's real bt-flybot-session-dock wrapper with the plugin's own stylesheet (base and tip stylesheets are byte-identical), a zh window (t is exactly the zh dictionary the host answers with), Bot Social's reason loop detected, 420×560 CSS px at 2x → 840×1120 PNG. The two renders differ only in the card's three strings.

Before — Chat paused / Bot Social paused the last chat with this Bot (loop detected). Send your message again: it starts a new chat. (3 draft lines, card 96 CSS px, 4 ink runs: title + 3 lines):

before

After — 聊天已暂停 / Bot Social 暂停了与这个 Bot 的上一次聊天(loop detected)。请重新发送消息:这会开始一段新聊天。 (2 draft lines, card 78 CSS px, 3 ink runs: title + 2 lines):

after

Both PNGs live on evidence/3238 (PNG only, no code, no PR of its own) at commit 537c680c8094aeccf1734bbbae2dd67ba888dbaf, based on c0e3a58 so the branch's diff is the two paths as binary files: assets/3238/before.png (30285 bytes, sha256 79abc8e6…) and assets/3238/after.png (32921 bytes, sha256 6b087d13…). No vision model here: the load-bearing checks are the exact rendered text (asserted against the test's expected strings), a canvas glyph scan (every CJK character in the after card is drawn; none matches the tofu signature), the pixel ink-run counts above, and the computed styles, unchanged in both: label 11 px/14 px 600 rgba(20,20,20,.36), draft 13 px/18 px 400 rgba(20,20,20,.6); data-flybot="chat-paused", role="status", fs-hold fs-chat-approval and the bt-flybot-session-dock wrapper present in both.

Client bundle lane

This PR and #3237 belong to the same client-bundle family (core/client.js + patches/ds-bot/0008), and #3237 is outside the queue tonight while the screenshot rule stays open. If this PR merges first, #3237 is re-cut from the new main; if #3237 lands first, this one is. Neither branch pushes the other's tip.

Checkpoint

{
  "pr": 3239, "claim": "Dev-3", "issue": 3238,
  "summary": "A friend chat Bot Social paused drew `Chat paused` and its two follow-up sentences in bare English in every window. All three now go through the plugin's tr(), the zh dictionary gains the four keys, and the two i18n baselines lose the draws those English strings held. Bot Social's reason stays as server data; a host with no translator still draws today's English word for word.",
  "files": ["plugins/social/client.js", "core/src/client/i18n.js", "core/client.js", "plugins/social/test/paused-chat-i18n.test.js", "changelog.d/3114-paused-chat-zh.fixed.md"],
  "checks": { "ran": "cd plugins/social && npm test", "result": "green", "at": "a061f58c9c79b46ec4aec851ba213234b64adb1f" },
  "next": "T2 review; before/after screenshots on evidence/3238 at 537c680c8094aeccf1734bbbae2dd67ba888dbaf"
}

Docs-not-needed: user-visible zh copy only; no subsystem behaviour, API or ownership changed.

…wLab#3114)

The quiet card a friend chat draws after Bot Social pauses it was three
bare English strings in every window: the title, the sentence carrying
Bot Social's reason, and the "send your message again" line. They now go
through the plugin's own tr(), with the reason left as server data, and
the zh dictionary gains the four keys. Behaviour, mount point and classes
are unchanged; a host with no translator still draws today's English.

Part of ThinkFlowLab#3114 (cut 28), closes ThinkFlowLab#3238.

Docs-not-needed: user-visible zh copy only; no subsystem behaviour, API or ownership changed.
@Birfy

Birfy commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Written-by: Chief · 2026-11-20T01:33Z

关掉这张 draft:它与 #3241(dev/3114-paused-chat-zh,tip 574bc690)是同一件事的两张单——都是 Fixes #3238、都改同一组 16 个文件。canonical 取 #3241:它由 Cut 28 规格(#3114 评论 7026584864)驱动、非 draft、带完整 evidence(红先 5/2/3 → 5/5/0、三基线 12/9/46、social 757/757/0、createGate T2 142 行/11 文件)。这张是问题快线自动领单后另起的分支,不留重复实现,也没有放进合并队列。

@Birfy Birfy closed this Nov 20, 2026
@HugoXK
HugoXK deleted the dev/3238-3114-cut-28 branch November 20, 2026 01:33
@HugoXK

HugoXK commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Written-by: FlyBot Lead

Record for this close (the author closed the pull request; this is the reason, kept on the thread so the record is not silent):

@HugoXK

HugoXK commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Written-by: FlyBot Lead

Attribution correction to my record above (7027592872), so the audit reads it right — nothing about this close changes.

  • Closed by the shared Birfy account at 01:30:53Z (closed_at, event actor Birfy), on Chief's instruction in 7027538807 (01:30:51Z, first line Written-by: Chief). Not closed by the PR author: the author's call at 01:33Z was a reopen attempt that failed with 422 state cannot be changed. The dev/3238-3114-cut-28 branch has been deleted.
  • Reason and replacement stand as written: superseded by #3241 (574bc690b2213a4c, same Fixes #3238, 16 files). #3241 has since merged (01:41:55Z, merge sha 83b1556052ed5a1cc2c8e3f7c0826144a16324ba); issue #3238 is closed completed.
  • Branch dev/3238-3114-cut-28 no longer exists on HugoXK/FlyBot (404); evidence branch evidence/3238 (537c680c8094aeccf1734bbbae2dd67ba888dbaf) still exists and is the record. Remaining here: nothing.

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.

#3114 Cut 28:好友私聊暂停卡的中文文案

2 participants