Skip to content

Read the Face-to-face waiting room in the window's language (#3114) - #3221

Merged
Birfy merged 1 commit into
mainfrom
dev/3114-face-waiting-room-zh
Nov 19, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/3114-face-waiting-room-zh

Conversation

@Birfy

@Birfy Birfy commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev
Fixes #3219
Part of #3114
Owner: Dev
Reviewer: Reviewer
Tier: T2
Docs-not-needed: the waiting room keeps its layout, state and server calls; this cut lands thirteen zh dictionary entries and routes existing literals through the tr() at plugins/social/client.js:1018, so docs/subsystems/social.md and docs/subsystems/core-client.md describe structure that does not change.

Checkpoint

{
  "pr": 3221,
  "claim": "Dev",
  "issue": 3219,
  "summary": "The Face-to-face waiting room now reads in the window's language. The dialog's waiting step and the room overview's candidate card draw their room number, QR hint, roster heading, alone line, Enter chat, Leave question and mine badges through the tr() the file already carries. Thirteen zh entries land and the two i18n baselines lose the nineteen pins those draws held; a window without a translator keeps today's English word for word.",
  "files": ["plugins/social/client.js", "core/src/client/i18n.js", "core/test/i18n-missing-entries.baseline.json", "core/test/i18n-template-draws.baseline.json", "plugins/social/test/face-waiting-room-i18n.test.js", "changelog.d/3219-face-waiting-room-zh.fixed.md", "plugins/social/test/sharing-page-i18n.test.js"],
  "checks": { "ran": "npm run verify (TZ=UTC)", "result": "green", "at": "c14d92499131d77d35b5d7bce608f9c65cfb0f31" },
  "next": "none — ready for review"
}

What changed

A face-to-face waiting room follows the window's language. The dialog's waiting step and the room overview's candidate card now read 房间号码 / 房间号码 482913 / 房间号码 482913 的二维码 / 用 FlyBot 扫描加入 / 谁已加入 / 正在等其他人加入… / 进入聊天 / 离开这个房间? / 离开 / 留下 / 我的, and {name} (you) reuses its existing entry. Thirteen zh entries land after core/src/client/i18n.js:253, and i18n-missing-entries (132 → 115) and i18n-template-draws (27 → 25) lose the nineteen pins they carried; i18n-plugins stays at 16.

One line in cut 20's own test (plugins/social/test/sharing-page-i18n.test.js:148) froze the baselines' absolute totals at 16 / 27 / 132, so any later cut that removes pins turns the social suite red. Cut 21 necessarily moves two of those totals, so that snapshot now names 16 / 25 / 115 — the cut-20 pins it guards are still asserted one by one above it. That is the seventh handwritten file, and the reason the hand-written total is 221 lines rather than the 215 in the slice spec.

Verification at the tip

Tip SHA: c14d924
Ran: cd plugins/social && TZ=UTC DSH_HARNESS=/opt/flybot node --import ./test/resolve.mjs --test test/face-waiting-room-i18n.test.js — 5/5/0 at this tip; the same file on a pristine 5b32b96a5a44 checkout with only the test added — 5/1/4 (cases 1, 2, 3 and 5 red, the English-fallback guard green on base); ... --test test/social.test.js 500/500/0; ... --test test/face-rooms.test.js test/social-readonly.test.js 55/55/0; the whole plugins/social suite 728/728/0; cd core && node --test test/i18n-plugins.test.js test/i18n-template-draws.test.js test/i18n-missing-entries.test.js test/i18n-plugins-missing-zh.test.js test/i18n.test.js 39/39/0; node core/scripts/build-client.mjs --check; node scripts/ds-bot-patches.mjs check and canonical (both ok, generate is a no-op); node .github/scripts/changelog.mjs check (16 fragments well formed); node .github/scripts/check-mojibake.mjs --check (0 occurrences in 1771 files); TZ=UTC npm run verify exit 0 (arch-docs OK against a local origin/main ref at the base).
Not run: no real browser on this box, so nobody has looked at a Chinese waiting room in a window — the render is read from the component tree in the test instead. This cut covers only the waiting room and its number / QR: the setup and join steps, the invite cards and FaceAutoSend keep their baseline pins, and the rest of Social stays English in a Chinese window as before. The ordering with #3112 is not exercised: both cuts add zh keys only, and whichever merges second must keep both blocks and rerun build-client → generate → check → canonical. The box has no origin/main (the work copy is a tarball), so arch-docs ran against a local ref at the base commit rather than the live remote.

The Face-to-face waiting room — the dialog's waiting step and the room
overview's candidate card — drew its room number, QR hint, roster heading,
alone line, Enter chat, Leave question and mine badges as bare English while
the rest of the panel followed the window's language. This routes those draws
through the tr() the file already carries, lands the 13 zh entries they need,
and drops the 19 i18n baseline pins that held them.

Written-by: Dev
Fixes #3219
Part of #3114
Owner: Dev
Reviewer: Reviewer
Tier: T2
Docs-not-needed: the waiting room keeps its layout, state and server calls; this cut lands thirteen zh dictionary entries and routes existing literals through the tr() at plugins/social/client.js:1018, so docs/subsystems/social.md and docs/subsystems/core-client.md describe structure that does not change.
@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 19, 2026
@Birfy Birfy self-assigned this Nov 19, 2026
@Birfy

Birfy commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

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

Ran at this tip:

$ GH_REPO=ThinkFlowLab/FlyBot TZ=UTC node .github/scripts/risk-gate.mjs --pr 3221
$ cp <base>/plugins/social/client.js plugins/social/client.js && cp <base>/core/src/client/i18n.js core/src/client/i18n.js
$ cd plugins/social && TZ=UTC TMPDIR=/data/flybot-tmp DSH_HARNESS=/opt/flybot node --import ./test/resolve.mjs --test test/face-waiting-room-i18n.test.js
$ cd plugins/social && TZ=UTC TMPDIR=/data/flybot-tmp DSH_HARNESS=/opt/flybot node --import ./test/resolve.mjs --test --test-concurrency=4 --test-timeout=120000 "test/*.test.js"
$ cd core && TZ=UTC TMPDIR=/data/flybot-tmp node --test 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
$ TZ=UTC node .github/scripts/changelog.mjs check
$ TZ=UTC node .github/scripts/check-mojibake.mjs --check
$ TZ=UTC DSH_HARNESS=/opt/flybot node scripts/ds-bot-patches.mjs check
$ diff -rq <base> <tip> | grep -v node_modules
# tests 5  # pass 5  # fail 0

Numbers. New test at the tip 5/5/0; with only the new test kept and plugins/social/client.js plus core/src/client/i18n.js reverted to the base blobs, the same file runs 5 tests / 1 pass / 4 fail (case 4 is the no-translator English-fallback guard and is green on base by design, so the red-first signature is exactly the one the slice promises). plugins/social full suite 728/728/0. The five core i18n tests 39/39/0. Baselines 16 / 25 / 115, i18n-plugins untouched at 16.

Tier. risk-gate.mjs --pr 3221 (report only) says T2, basis plugins/social/client.js=T2 plus the two new/changed social tests; 221 changed lines in 7 hand-written files with 5 generated files excluded — inside the T2 250-line / 12-file bound. Self-PASS counts at T2, no second signature needed.

The one change outside this cut's range — plugins/social/test/sharing-page-i18n.test.js 3/3 — is accepted, and this is why. The hunk touches one assertion and its comment: [16, 27, 132] → [16, 25, 115] at line 148, the cut-20 test's frozen absolute totals. Cut 21 removes 17 i18n-missing-entries and 2 i18n-template-draws pins, so those two totals necessarily move and the cut-20 snapshot would otherwise fail on its own ratchet. It is not a loosening: deepEqual against three exact integers is still exact, the per-key assertions above it (keys.map(...).filter(id => entries.includes(id)), deepEqual(still, [])) still assert each cut-20 pin one by one, and no case was renamed, deleted or made tautological. The residual is a coupling in cut 20's test (a later cut that moves a total must edit it), not a weakened guard here; the same totals are re-asserted independently by the new test file and by the core i18n suites, which are green. The PR body states the same reasoning and calls this file the seventh hand-written file.

Dictionary. All thirteen keys are present verbatim in core/src/client/i18n.js after this person (Room number, Room number {code}, QR code for room number {code}, Scan this with FlyBot to join, Anyone with the number can still join., The room is open. The number is no longer valid., Who has joined, Waiting for others to join…, Enter chat, Leave this room?, Leave, Stay, mine), and {name} (you) is reused ({name}(你)), not added twice. Comparing the whole dictionary in core/client.js against core/src/client/i18n.js gives 1568 → 1581 and 1521 → 1534 keys with 0 value mismatches and the same 47 pre-existing client-only omissions as base, i.e. the generated bundle moved by exactly this cut's 13 entries.

Pins and baselines. Both baseline files lose only lines (0+ / 17- and 0+ / 2-), the 17 + 2 = 19 pins are all gone, nothing was reordered and no entry was added by hand; the two patches/ds-bot/files/test/ mirrors are byte-identical to core/test/.

Scope and generated files. The base-to-tip tree differs in the 12 paths the PR lists and nothing else: core/src/shared, core/src/host (incl. authz.js), plugins/social/index.js, plugins/social/src, .github, policy and patches/ds-bot/topics.json are untouched. The two .patch files carry the same 13-key block and their hunk counts move 131 → 146 exactly as core/client.js gains 15 lines; ds-bot-patches check reports 10 patches applying cleanly and core/ equals ds-bot/ + patches/ds-bot/.

CI at the tip. 19 check runs: 16 success, 1 failure (enqueue-guard, do not enqueue #3221: no Verifier report names the tip c14d92499131 — the expected pre-PASS state, this comment is what flips it), 2 skipped (window check, live · ubuntu · Node 24 · real model). tests-ok, merge-gate, reviewed tip, risk tier, package, plugins (social) and policy-sign are all success.

Environment caveats, recorded as they are. npm run verify cannot finish in this sandbox: core/node_modules is absent from the tarball, so core/scripts/build-client.mjs --check stops at Cannot find module 'esbuild' and scripts/lint.mjs reports no oxlint; ds-bot-patches canonical needs a git work tree, which this read-only copy is not. Those three are covered above by other means (dictionary equality, mirror byte-equality, patches check), and by the tip's green package / ubuntu-latest · Node 24 · DSH 0.2.0-rc.2 / plugins (social) runs. changelog.mjs check reports 16 well-formed fragments (15 on main plus this one) and check-mojibake --check 0 occurrences.

Next. Enqueued at this tip; #3219 closes on merge, #3114 stays open.

@github-actions github-actions Bot added the pass label Nov 19, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 6e08fd7 Nov 19, 2026
19 checks passed
@Birfy
Birfy deleted the dev/3114-face-waiting-room-zh branch November 19, 2026 13:51
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 19, 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.

Face-to-face 等待房间在中文窗口仍是英文(cut 21)

1 participant