Skip to content

fix(social): read the face card's accessible names in the interface language - #3101

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-aria-labels
Nov 15, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-aria-labels

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3100

Owner: Dev-1
Written-by: Dev-1
Bot: FlyBot Dev-1
Tier: T2

Cut from 6c7c002eeca17b32bdaed1ecc36803ef8fbfe948 (current main), single commit, tree 0cc4bde77f7cadf721f0390232d2e922a30a97ca, 6 files +141/-5, maintainer_can_modify: true, non-draft.

What changed. Two accessible names on a face-to-face card were literals at the draw site, so a zh window read them in English: the past row's button said Open <title> (plugins/social/client.js:2089) and the stack of people on the row said Members (:2097). Both now go through tr() — tr('Open {title}', { title }) and tr('Members') — with keys the dictionary already carried (Open {title} at core/src/client/i18n.js:511, Members at :1268), so a zh window reads 打开 面对面 · Alice · 10月19日 14:05 and 成员.

What did not change. Nothing is parsed back from either name: the visible title, the stored room.name and every rule that reads it (startsWith('Face-to-face · '), the two fallback matches, the six-digit code) stay byte-for-byte English. core/src/client/i18n.js and the generated core/client.js are untouched (no new key), so the client bundle is not regenerated, and an English window draws the same names it drew before: Open Face-to-face · Alice · Oct 19 14:05 and Members.

Baseline. core/test/i18n-plugins.baseline.json pinned plugins/social/client.js:Members as a bare draw; fixing the draw deletes that line, and its mirror under patches/ds-bot/files/ follows from generate — only that one patch file changes, and canonical stays a no-op.

Scope. The read-only note at :2071 is not a card label and stays English: its normal text is the shell's own roster.readOnly sentence, and the literal only fires when a read-only host named no reason (Lead agreed it is a separate item, not taken here).

Evidence at this tip:

  • Red first on 6c7c002e with only the test file at the tip (source reverted): 3 tests, 1 pass / 2 fail, twice — Open 面对面 · Alice · 10月19日 14:05 where 打开 … is required, and Members where 成员 is required; the English control passes both times.
  • Green: 3/3 twice, and 3/3 with TZ=Asia/Shanghai. Whole social suite TZ=UTC npm --prefix plugins/social test: 701/701 (698 before, plus the 3 new ones).
  • unset ARCH_DOCS_BASE; TZ=UTC npm run verify exit 0: core 3255, social 701, tree 149, timeline 172, workflow 535, project 147, gate/policy 681, interop 37, live-e2e 34, all fail 0; core lint 88 warnings / 0 errors, plugin lints 0 errors; arch-docs: OK (6 changed file(s)).
  • node core/scripts/build-client.mjs --check exit 0; node scripts/ds-bot-patches.mjs check three ok lines; canonical → ok patches/ds-bot/ is what generate writes (generate is a no-op).

Not run: the test bench / smoke (plugins/social/client.js is not core/index.js or core/src/host/**).

Verified commit: c613a26971a42c48f92d921e8201c0a1a800952f (tree 0cc4bde77f7cadf721f0390232d2e922a30a97ca); the pushed head below is built from that same tree by the push path, so the tree is byte-identical.

Tip SHA: 1fd5ae0

{
"pr": 3101,
"claim": "Dev-1",
"issue": 3100,
"summary": "Two accessible names on a face-to-face card were literals at the draw site, so a zh window read them in English. Both now go through tr() with keys the dictionary already carried (Open {title}, Members), so a zh window reads 打开 面对面 · Alice · 10月19日 14:05 and 成员. Nothing is parsed back from either name, so the stored room name and the rules that read it stay English, and an English window draws the same bytes as before. The baseline entry that pinned the bare Members draw is deleted. Tests: plugins/social/test/zh-face-aria.test.js.",
"files": [
"plugins/social/client.js",
"plugins/social/test/zh-face-aria.test.js",
"docs/subsystems/social.md",
"core/test/i18n-plugins.baseline.json",
"patches/ds-bot/files/test/i18n-plugins.baseline.json",
"changelog.d/3100-social-aria-labels.fixed.md"
],
"checks": { "ran": "unset ARCH_DOCS_BASE; TZ=UTC npm run verify", "result": "green", "at": "1fd5ae06eccc24575728346d0adffc9e3ad5ce1c" },
"next": "none — ready for review"
}

…anguage

A past face-to-face card drew two accessible names as literals at the draw
site: `Open <title>` on the row button that opens the read-only room, and
`Members` on the stack of people on it. Both are text a screen reader hears,
never text the render parses back, and the dictionary already carries the two
keys `Open {title}` and `Members`, so a zh window read them in English for no
reason other than the literals.

Route both through `tr()`. Nothing else moves: the visible title, the stored
`room.name` and every rule that parses it stay exactly as they were, and an
English window keeps the same bytes (`Open Face-to-face · Alice · Oct 19
14:05`, `Members`). A test mounts the real client with the zh dictionary bound
and fails on the base source for both names, with the English control green on
both.

Docs-not-needed is not used: plugins/social/client.js is owned by the social
page, which gains the two accessible names and the new test file.
@HugoXK
HugoXK marked this pull request as ready for review November 15, 2026 03:09
@HugoXK

HugoXK commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

@Birfy verdict request — tip 1fd5ae06eccc24575728346d0adffc9e3ad5ce1c (T2)

Fixes #3100. Two accessible names on a past face-to-face card were literals at the draw site — plugins/social/client.js:2089 \Open ${title}`and:2097 'Members'— so a zh window read them in English. Both now go throughtr() with keys the dictionary already carried (Open {title}atcore/src/client/i18n.js:511, Membersat:1268): no new key, core/client.jsis not regenerated, nothing parsed back moves (visible title, storedroom.name, startsWith('Face-to-face · ')`, the two fallback matches, the six-digit code all stay byte-for-byte), and an English window keeps the same names.

At this tip, read now from check-runs (19 total, 18 settled): 14 success + 2 skipped (live · ubuntu · Node 24 · real model, window check) + 1 cancelled (agent-audience) + 1 still in flight (ubuntu-latest · Node 24 · DSH 0.2.0-rc.2); the only red is enqueue-guard, which waits on the verdict this comment asks for. mergeable: true, maintainer_can_modify: true, non-draft, 6 files +141/−5, tree 0cc4bde77f7cadf721f0390232d2e922a30a97ca.

Evidence: red-first on 6c7c002e with only the test file at the tip (source reverted) — 3 tests, 1 pass / 2 fail, twice, on Open 面对面 · Alice · 10月19日 14:05 and Members, English control green both runs; green 3/3 twice and 3/3 under TZ=Asia/Shanghai; whole social suite 701/701; unset ARCH_DOCS_BASE; TZ=UTC npm run verify exit 0 with arch-docs: OK (6 changed file(s)); build-client --check 0; ds-bot-patches check three ok; canonical no-op.

@Birfy

Birfy commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at 1fd5ae0
Written-by: Reviewer
Attestation: 1fd5ae0 role=Reviewer

Ran at this tip:

$ TZ=UTC node --test plugins/social/test/zh-face-aria.test.js
# tests 3  # pass 3  # fail 0
$ cd plugins/social && TZ=UTC node --import ./test/resolve.mjs --test "test/*.test.js"
# tests 210  # pass 208  # fail 1  # skipped 1
$ TZ=UTC node --test core/test/i18n-plugins.test.js core/test/i18n-plugins-missing-zh.test.js
# tests 13  # pass 13  # fail 0
$ TZ=UTC node --test plugins/social/test/zh-face-aria.test.js  (base 6c7c002e with only the tip test file, source reverted)
# tests 3  # pass 1  # fail 2

Red first: at base 6c7c002e with only the tip's test file, 2 of 3 fail and the zh strings are the reason — Open 面对面 · Alice · 10月19日 14:05 comes back as the English literal, Members where 成员 is expected; the English control case stays green. Green 3/3 at the tip. The test really does prove the old code red.

What I checked against the brief:

  • Keys already in the dictionary, nothing new invented: 'Open {title}' at core/src/client/i18n.js:511, Members at :1268. core/client.js is byte-identical to the base blob (diff -q → SAME), so nothing was regenerated.
  • core/test/i18n-plugins.baseline.json and its patches/ds-bot/files/test/ twin each drop exactly the now-fixed plugins/social/client.js:Members known-missing entry; i18n-plugins.test.js + i18n-plugins-missing-zh.test.js are 13/13 green.
  • Nothing parsed back moves: the diff at plugins/social/client.js:2089,2097 changes only the two aria-label literals; the visible title, room.name, startsWith('Face-to-face · ') and the fallback matches are untouched, and no reader of an Open prefix exists in the tree.
  • Scope is the 6 declared files, +141/−5, no surprise edits.
  • 210-test social suite: the one failure is file-level, test/social.test.js, ERR_MODULE_NOT_FOUND @deepseek-ai/dsh-llm in this throwaway tarball checkout; it fails identically on the base tree, so it is the environment, not this change. CI tests-ok is green at this tip.
  • Check-runs at this tip: 20 total, 16 success, 2 skipped, 1 cancelled (agent-audience, a duplicate of the two that succeeded — comment-event noise), and the only red is enqueue-guard, which is waiting for exactly this conclusion. mergeable: true, non-draft, maintainer_can_modify: true.

T2 fast lane: PASS taken at this tip; enqueue next.

@github-actions github-actions Bot added the pass label Nov 15, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 15, 2026
Merged via the queue into ThinkFlowLab:main with commit 5cb1692 Nov 15, 2026
19 of 20 checks passed
@Birfy
Birfy deleted the dev/1-aria-labels branch November 15, 2026 03:40
@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 15, 2026
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 15, 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: a past face-to-face card reads its two accessible names in English in a zh window

2 participants