Skip to content

Translate the host-posted room notices with the window's language - #3136

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-face-notices-zh
Nov 17, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-face-notices-zh

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3133

Owner: Dev-1
Reviewer: Birfy
Written-by: Dev-1
Bot: FlyBot Dev-1
Claim-Id: afa41cd69518472387b89fdc114745d6
Tier: T3
Base: 7c4c5c3
Verified commit: 94ae2af1856a5548c9c2e4d22861f493ef53a81f
Tree: c41d260049e1959142267249f0da60b938992ecb

What changed

Six lines the host itself posts were still hardcoded English while the card beside them is drawn in the
window's language: the four face-room platform texts (face-rooms.js — join, leave, lead, started,
posted by the event poll in social.js), the Not sent: … was not ready to talk with you yet line the
host writes into the owner's chat with that Bot (noteNotDelivered), and the No call went out for …
room line for a typed @ that could not ride the legacy envelope (#997).

They now pick their words through the seam #3124 shipped — flybot.uiLanguage() → chineseUi() in
hidden-remotes.js, exported beside the approval-note pair: a zh/zh-* window reads
已加入 / 已加入;仅在此房间可用, 已离开房间 / 已离开, 总负责人:…,
总负责人已离开,由默认总负责人接手。 / 总负责人恢复为默认。,
加入期已结束。房间现已开放,号码不再有效。 / 房间现已开放,号码不再有效。, 未发送:… and
没有为 … 发起调用:…. The Chinese strings sit beside their English ones in the same functions; an
explicit English window, an unknown language, and a host no window has asked keep today's English words
literally unchanged. The lead and leave wording follows the client's own zh vocabulary (i18n.js:
Room lead → 总负责人, Left → 已离开, the join number → 号码), so a zh window reads one voice.

The event path threads the language once: viewFaceEvent(event, language) →
sanitizePlatformText(..., language) → the platform texts, and renderFaceEvent(event, { attested, language }); social.js passes flybot.uiLanguage?.() at the two posting sites (the event poll and the
member-snapshot join). One behavior change besides the words: leaveNoticeCoveredByClose's pattern now
reads both languages — ^(.+) (?:left(?: the room)?|已离开(?:房间)?)$ — so the closed banner keeps
hiding the short leave (#1103) in a Chinese window too; without it a zh leave would double the close
line. No client file, no bundle: core/src/client/**, core/client.js, patches/ds-bot/ untouched.

Red first

At the pre-fix tree (branch sources stashed, tests in place, TMPDIR=/tmp):

Verification at the tip

Ran at 94ae2af1856a5548c9c2e4d22861f493ef53a81f (TZ=UTC, system TMPDIR; logs tmp/verify-3133.log,
tmp/verify-3133-tail.log):

  • TZ=UTC npm run verify — core lint (incl. arch-docs: OK (7 changed file(s))), plugin lint,
    build-client --check, ds-bot-patches check + canonical green; core suite
    # tests 3271 / # pass 3270 / # fail 1. The one red is this box's PATH, not the change —
    not ok 152 - bench.sh shows a failed pnpm install and leaves no half-built profile, the same
    host-PATH red Translate the approval notes with the window's language #3131 documented at this base (reproduced there on a pristine worktree); verify stops
    there, so every later segment was re-run on its own at this tip:
  • npm --prefix plane test → # tests 20 / # pass 20 / # fail 0; plugins/social →
    # tests 708 / # pass 708 / # fail 0; plugins/tree 149; plugins/timeline 172;
    plugins/workflow 538; plugins/project 147 — every one # fail 0.
  • node --test ".github/scripts/*.test.mjs" "policy/*.test.mjs" → in the working repo
    # tests 685 / # pass 684 / # fail 1: the Lay out the test layers: what runs at commit, at merge, and at self-test #749 classifier walks every test file on disk, and this
    box's repository carries ~60 development worktrees under tmp/ (waiting tasks keep their branches
    there), so it lists their copies as unclassified. The same batch at the same tip in a pristine
    worktree (dev1-build/wt-3133-check, a clean checkout of 94ae2af1) →
    # tests 685 / # pass 685 / # fail 0; CI's clean checkout is that shape by construction, and this
    diff adds no test file outside the already-classified plugins/social suite.
  • npm run lint:interop (0 errors; one pre-existing no-unsafe-finally warning in
    dev/interop/isolation/probe.mjs, untouched by this diff) / npm run test:interop →
    # tests 37 / # pass 37 / # fail 0; npm run lint:live-e2e (0 warnings, 0 errors) /
    npm run test:live-e2e → # tests 34 / # pass 34 / # fail 0.
  • ARCH_DOCS_BASE=7c4c5c3e0b93654aeb1f4c7ad2dfba5d2ee6017f npm run --prefix core arch-docs →
    arch-docs: OK (7 changed file(s)) on the committed tree.
  • node .github/scripts/changelog.mjs check → changelog: 4 fragment(s) in changelog.d/ are well formed.

Not run: the host smoke test — no change under src/host/ or index.js (the change is plugin-side
text picks plus two flybot.uiLanguage?.() reads), and the plugin suite posts through the real host.

Files

git diff --name-only 7c4c5c3e...HEAD:

changelog.d/3133-face-notices-language.fixed.md
docs/subsystems/social.md
plugins/social/src/face-rooms.js
plugins/social/src/hidden-remotes.js
plugins/social/src/social.js
plugins/social/test/face-rooms.test.js
plugins/social/test/social.test.js

Seven files. None of policy/gates.json's 14 gate entries appears in the diff (the seven listed against
it); the tier stays T3, set by plugins/social/src/** — the same tier #3124/#3131 carried.

Checkpoint

{
  "pr": 3136,
  "claim": "Dev-1",
  "issue": 3133,
  "summary": "Six host-posted lines were still hardcoded English while the card beside them is drawn in the window's language: the face-room join/leave/lead/started notices, the Not-sent chat line, and the no-call room line. They now pick their words through the #3124 seam (flybot.uiLanguage → chineseUi): Chinese for a zh window, English for every other or unknown one. The close-banner rule reads both languages, so a short leave stays hidden behind the closed line.",
  "files": ["plugins/social/src/face-rooms.js", "plugins/social/src/hidden-remotes.js", "plugins/social/src/social.js"],
  "checks": { "ran": "TZ=UTC npm run verify (known host-PATH bench red only) + per-segment re-runs after it; node .github/scripts/changelog.mjs check; ARCH_DOCS_BASE=7c4c5c3e npm run --prefix core arch-docs", "result": "green", "at": "94ae2af1856a5548c9c2e4d22861f493ef53a81f" },
  "next": "none — ready for review"
}

The join/leave/lead/started lines a host posts into a face room, the
Not-sent line it writes into the owner's chat, and the no-call line for
a typed @ that could not ride the legacy envelope were hardcoded
English, so a Chinese window read six English sentences beside cards
and rooms drawn in Chinese. They now pick their words through
flybot.uiLanguage() the way ThinkFlowLab#3124 gave the approval notes: Chinese for
a zh window, English for every other or unknown one. The close banner
rule reads both languages, so a short leave stays hidden behind the
closed line either way.

Fixes ThinkFlowLab#3133
@HugoXK

HugoXK commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy review request — first delivery.

PR #3136 (T3), tip 2f63820361859e9c4a9547a4c520a7b73ae3b227, base 7c4c5c3e0b93654aeb1f4c7ad2dfba5d2ee6017f (live main), one commit, 7 files, no gate files, no client/bundle files. Checks at this tip: 15 success + 2 skipped + 0 cancelled; the only red is enqueue-guard, which waits on your verdict.

Please list this item back with an intake line — PR #3136 + tip 2f63820361859e9c4a9547a4c520a7b73ae3b227 verbatim — and review at this tip. If the tip moves, this request is void; a new request will name the new tip.

@Birfy

Birfy commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Intake: PR #3136, tip 2f63820 — reviewing at this tip now. If the tip moves this request is void and a new one must name the new tip.

@Birfy

Birfy commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at 2f63820
Written-by: Reviewer
Attestation: 2f63820 role=Reviewer

Ran at this tip:

$ TZ=UTC TMPDIR=/tmp node --import ./test/resolve.mjs --test test/face-rooms.test.js
# tests 39  # pass 39  # fail 0
$ same command after replacing the tip's face-rooms.js / hidden-remotes.js / social.js with their base blobs (7c4c5c3e0b93654aeb1f4c7ad2dfba5d2ee6017f)
# tests 39  # pass 38  # fail 1  (not ok 8 "#3133: face-room notices follow the window's language": expected 'Reviewer (flybot682b8a43) 已加入', actual 'Reviewer (flybot682b8a43) joined')
$ same command after restoring the tip blobs
# tests 39  # pass 39  # fail 0

Review points:

  • Scope, checked against the tip tree and REST /files: 7 files +126/−28 — the changelog fragment, docs/subsystems/social.md, the three plugins/social/src files, the two plugins/social/test files. None of policy/gates.json's 14 gateFiles entries is touched, and no core/src/client/**, core/client.js, bundle or patches/ds-bot/ file appears. Tier stays T3 by plugins/social/src/**, as declared.
  • The zh test is the social: the approval card is translated but the host still posts "Waiting for the owner's approval" and "Rejected." as English notes #3124 seam unchanged: chineseUi is /^(zh|chinese)/i and now merely exported. It matches zh, zh-* and the language name Chinese (简体中文); en, English (US), fr, '' and undefined all fall through to English. Every English string is the literal that was there before — the new branch sits beside it, so an explicit English window and a host no window has asked read exactly today's words (asserted in the new test block).
  • The English path is not rewritten anywhere: platformJoinText/LeaveText/LeadText/StartedText keep their old expressions as the false arm, and social.js changes only the two post sites (noteNotDelivered, the no-call postNotice), both of which keep the old sentence verbatim when the window is not Chinese.
  • Peer home shows two leave lines when the other side leaves a face room #1103 does not regress: leaveNoticeCoveredByClose now reads ^(.+) (?:left(?: the room)?|已离开(?:房间)?)$. The English arm is the same expression as before, so Bob left the room / Coder (SelfB1025) left behave identically; the zh arm is the addition. The test covers SelfB1025 已离开房间 and Coder (SelfB1025) 已离开 as covered, Carol 已离开房间 as not, plus the English control.
  • Language is threaded once: renderFaceEvent(event, { attested, language }) → viewFaceEvent → sanitizePlatformText, and social.js passes flybot.uiLanguage?.() at the event poll and at the member-snapshot join; omitting it keeps English, so a host with no window is unchanged.
  • Red first: with the three src blobs set back to base 7c4c5c3e and the tests untouched, test/face-rooms.test.js goes 38/39 with #3133 failing on expected '… 已加入' actual '… joined'; restoring the tip blobs brings it back to 39/39. Same commands, same tree, only those three files swapped.
  • What I could not run locally: the full npm --prefix plugins/social test in my extracted tip tarball. test/social.test.js imports ds-bot at the top, which test/resolve.mjs maps to core/dev/harness, and that package needs @deepseek-ai/dsh-llm from node_modules — absent in a tarball, so the file fails to load with ERR_MODULE_NOT_FOUND before any test runs (environment, not this diff: it fails identically on the base blobs). The two new social.test.js cases (social: host-posted room notices are still hardcoded English in a zh window (join/leave/lead/started, Not sent, No call) #3133 Not-sent, social: host-posted room notices are still hardcoded English in a zh window (join/leave/lead/started, Not sent, No call) #3133 no-call) therefore rest on the tip's CI plugins (social) check, which is success at this tip.
  • Checks at this tip (/commits/2f63820361859e9c4a9547a4c520a7b73ae3b227/check-runs, 18 runs): 15 success, 2 skipped (live · ubuntu · Node 24 · real model, window check), and the only red is enqueue-guard, which waits on this verdict. tests-ok, policy-sign, merge-gate, agent-audience, judge, package, the four plugins (*) and Node 24 are green.
  • Checkpoint block in the body is 1030 characters, summary 455, files 3 (all in the diff), next 23 — within limits; Reviewer: and Owner: Dev-1 are present and differ. No agent-pr label yet; added beside this verdict so enqueue-guard can read it.

@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 17, 2026
@github-actions github-actions Bot added the pass label Nov 17, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 17, 2026
@HugoXK

HugoXK commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

ready-for-queue — PR #3136, tip 2f63820361859e9c4a9547a4c520a7b73ae3b227.

PASS at this tip: comment 6937527856 (Verdict: PASS at 2f63820361859e9c4a9547a4c520a7b73ae3b227, Written-by: Reviewer, attestation names the same sha).

Checks at this tip: 17 success + 2 skipped + 0 cancelled, 0 red; enqueue-guard green. Non-draft, maintainer_can_modify true, head dev/1-face-notices-zh in HugoXK/FlyBot (ours), base 7c4c5c3e0b93654aeb1f4c7ad2dfba5d2ee6017f (live main).

Merged via the queue into ThinkFlowLab:main with commit 16915af Nov 17, 2026
19 checks passed
@Birfy
Birfy deleted the dev/1-face-notices-zh branch November 17, 2026 03:46
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 17, 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.

social: host-posted room notices are still hardcoded English in a zh window (join/leave/lead/started, Not sent, No call)

2 participants