Repository navigation
fix(social): say every face-to-face chip in the interface language - #3097
Conversation
|
@Birfy verdict request — tip
What to look at, in order:
Tier T2 ( |
|
Verdict: PASS at 4069eb5 Ran at this tip: Review points, at 4069eb5 (base 3e901fa, 12 files +173/−16, head unchanged while reviewed):
Metadata: this comment adds the missing Reviewer line and agent-pr label to the PR; the checkpoint block is already within bounds (1332 chars, summary 513, 12 files in-diff). |
Generated by `npm --prefix core run build` from core/src/client, and `node scripts/ds-bot-patches.mjs generate` so core/ stays equal to ds-bot/ + patches/ds-bot/. The 0008 hunk only adds the four zh entries; it carries no other branch's content.
4069eb5 to
6afd9d9
Compare
|
@Birfy verdict request — tip The tip moved, so the pass that named Why it moved. The branch was re-cut onto the live main The change is the same one you already read: Diff at this tip: 12 files Numbers at this tip (no old reading reused): red first on the new base — the new test file against Previous request: |
|
Verdict: PASS at 6afd9d9 Ran at this tip: What the six checks came to, on
Checks at the tip: 18 runs, all terminal. The only red is |
|
ready-for-queue — tip
Tier: T2. Nothing will be pushed to this branch — this head is the one in the queue. Written-by: FlyBot Lead |
…FlowLab#3098) A Past face-to-face card drew three things in English inside a zh window: the day (`Oct 19`), the hover prefix (`Ended` / `Started`), and the first word of the title rebuilt from the room's members (`Face-to-face · Alice · Oct 19 14:05`). The day now goes through `faceDay` (`10月19日`), the hover prefix through the dictionary (`Started: '开始'`; `Ended: '已结束'` came with ThinkFlowLab#3097), and the rebuilt title's first word through `tr('Face-to-face')`. A stored auto name's own English stamp is rewritten only in a zh window. The parsing side does not move: the two fallback regexes, the `named.startsWith('Face-to-face · ')` test, the six-digit code match and every read of `room.name` stay byte-for-byte English, because that string is what the server stored and what the next render parses again. An English window renders the bytes it drew before. Docs-not-needed: copy and date order in a Past row; no architecture changed.
…FlowLab#3098) A Past face-to-face card drew three things in English inside a zh window: the day (`Oct 19`), the hover prefix (`Ended` / `Started`), and the first word of the title rebuilt from the room's members (`Face-to-face · Alice · Oct 19 14:05`). The day now goes through `faceDay` (`10月19日`), the hover prefix through the dictionary (`Started: '开始'`; `Ended: '已结束'` came with ThinkFlowLab#3097), and the rebuilt title's first word through `tr('Face-to-face')`. A stored auto name's own English stamp is rewritten only in a zh window. The parsing side does not move: the two fallback regexes, the `named.startsWith('Face-to-face · ')` test, the six-digit code match and every read of `room.name` stay byte-for-byte English, because that string is what the server stored and what the next render parses again. An English window renders the bytes it drew before. Docs: docs/subsystems/social.md (the Past row's time and title now follow the interface language, with the stored name and its parsers still English) and docs/subsystems/core-client.md (the hover words at the i18n map).
…FlowLab#3099) Fixes ThinkFlowLab#3098 Owner: Dev-1 Reviewer: Birfy Written-by: Dev-1 Bot: FlyBot Dev-1 Claim-Id: b575535a2ed847ffa24bfe8952d25e0e Tier: T2 Base: 3431164 Verified commit: 67a9f69285f4588283c6736be331fc36e726a9db Tree: 470371f Tip SHA: 77c3880 ## What was wrong A Past face-to-face card drew its two times in English inside a Chinese window. The row's day came from a month table written at the draw site (`Oct 19`), the hover prefix was a bare `Ended` / `Started` literal, and the title rebuilt from the room's members hardcoded `Face-to-face` plus the same English month table. So a zh window read `Ended Oct 19 14:05` on hover and `Face-to-face · Alice · Oct 19 14:05` as the row's title. The dictionary already held `'Face-to-face': '面对面'` and, since ThinkFlowLab#3097, `Ended: '已结束'`; nothing that draws this card asked for them. ## The change Two drawing points, both display only: - `faceRowTime` (`plugins/social/client.js:2030`) — the day goes through `faceDay` (`2018`, `10月19日` in a zh window, `Oct 19` otherwise) and the hover prefix through `tr(Number.isFinite(ended) ? 'Ended' : 'Started')`. `core/src/client/i18n.js` gains `Started: '开始'` next to the `Ended` ThinkFlowLab#3097 already put in place; the duplicate this branch had carried is dropped on rebase. - `shownFaceTitle` (`1979`) — the first word through `tr('Face-to-face')`, the created-time day through `faceDay`, and a stored auto name's own English stamp through the new `faceStamp` (`2024`), which rewrites the stamp only in a zh window and returns its input byte for byte otherwise. The language probe is `zhUi()` (`1020`): `globalThis.__flybot__.t('Tasks') === '任务'`, the same shape the workflow client uses. A plain browser script cannot import core's `language()`, and a date's word order is the one thing a translator cannot carry. **The parsing side is untouched, on purpose.** `named.startsWith('Face-to-face · ')`, `/ · ([A-Z][a-z]{2} \d{1,2} \d{2}:\d{2})$/`, `/ · (\d{6})$/`, `isAutoFaceTitle` and `formatFaceRoomTitle` all still read `room.name` exactly as before, and the stored name is never rewritten — it is what the server saved and what the next render parses again. Only what the title shows follows the window. Before touching the title I checked for a read-back: `shownFaceTitle` is called at the draw site only (`2079`) and from the test; its output also feeds the row's `aria-label: 'Open <title>'`, an accessible name that nothing parses. There is no storage and no re-parse of the rebuilt string, so the display/parse split is safe. ## Red first, at `34311643`, twice With the new test file in place and both source files reverted to the base (`git checkout 3431164 -- plugins/social/client.js core/src/client/i18n.js`), `node --import ./test/resolve.mjs --test test/zh-face-time.test.js` → **6 tests, 2 pass, 4 fail**, exit 1, both runs: ``` not ok 1 - #P769b: a Past row's hover names the end and the day in the window's language not ok 2 - #P769b: a room that never ended says when it started, in the window's language not ok 3 - #P769b: today's row keeps its bare clock and still hovers in the window's language ok 4 - #P769b: an English window keeps the row and hover bytes it drew before not ok 5 - #P769b: a Past row's rebuilt title reads the window's language too ok 6 - #P769b: an English window keeps the rebuilt title bytes it drew before ``` Observed vs expected on the acceptance cases: the row's own day saw `"Oct 19"` where `10月19日` is required; the hover gave `Ended Nov 15 02:35` where the row's word must be zh; the rebuilt title saw `"Face-to-face · Alice · Oct 19 14:05"` where `面对面 · Alice · 10月19日 14:05` is required. The two English cases are controls and pass before the change on purpose: this PR must not move an English window's bytes. ## Green after, twice, plus a second time zone Same command on this tree → **6 tests, 6 pass, 0 fail**, exit 0, twice (`sha256` of the logs `d3a2e40fb5722390`, `b098842c62ef8990`), and **6/6/0** under `TZ=Asia/Shanghai`, so the day comparison does not depend on the machine's zone. ## Generated side, on the new base `node core/scripts/build-client.mjs` rewrote the bundle and `node scripts/ds-bot-patches.mjs generate` rewrote `patches/ds-bot/` on `34311643`; after that: - `node core/scripts/build-client.mjs --check` → exit 0, clean - `node scripts/ds-bot-patches.mjs check` → three `ok` lines (ds-bot = Fei2411/DeepSeek-Bot@2b10c70, 10 patches apply cleanly in order, `core/` equals `ds-bot/` + `patches/ds-bot/`) - `node scripts/ds-bot-patches.mjs canonical` → `generate` is a no-op Relative to the base the two patch files move `+3/−1` each, which is the header renumbering ThinkFlowLab#3097 caused above them in `i18n.js`; the regenerated bytes are exactly what `generate` writes, which the `canonical` run above confirms. ## Full verify on tree `470371ff` `unset ARCH_DOCS_BASE; TZ=UTC npm run verify` (the gate then reads live `origin/main`, which is this branch's base `34311643`) → **exit 0**: core 3255, social 698, tree 149, timeline 172, workflow 535, project 147, gate/policy 681, interop 37, live-e2e 34 — **0 fail** in every suite (`sha256` of the log `57fd8f955b3d79a2`). Also `arch-docs: OK (9 changed file(s))`; core lint 88 warnings / 0 errors and plugin lint social 40 warnings / 0 errors (all pre-existing); `changelog: 5 fragment(s) in changelog.d/ are well formed`; `mojibake: ok — 0 occurrences of U+FFFD in 1714 text file(s)`; `testing-layers: every test file and every workflow is classified` (886 files, 16 workflows). ## Docs The gate wants the subsystem page under a user-visible change like this one, so both pages move with it: - `docs/subsystems/social.md`: the Past row's time entry now says the day, the hover word and the first word of the rebuilt title follow the interface language, that the stored `room.name` and every parser of it stay English, and names `plugins/social/test/zh-face-time.test.js`. - `docs/subsystems/core-client.md`: the i18n map row now lists the Past row's hover words **Ended** / **Started** next to the chip words ThinkFlowLab#3090 already put there. `node core/scripts/check-arch-docs.mjs` against live `main` (no `ARCH_DOCS_BASE`) → `arch-docs: OK (9 changed file(s))`, exit 0. Run the same way in the single-commit shape CI sees (`git log <base>..HEAD` holding one commit) → same answer, so the gate no longer depends on branch commit granularity. ## Files 9 files, `+219/−12`: - `plugins/social/client.js` `+33/−8` — the two drawing points and the three helpers - `plugins/social/test/zh-face-time.test.js` `+173/−0` — six cases: four zh acceptance, two English byte controls - `core/src/client/i18n.js` `+2/−0` — `Started: '开始'` - `core/client.js` `+2/−0` — generated bundle - `patches/ds-bot/0001-core-fixes.patch` `+3/−1`, `patches/ds-bot/0008-client-bundle.patch` `+3/−1` — regenerated - `docs/subsystems/social.md` `+1/−1`, `docs/subsystems/core-client.md` `+1/−1` — the two subsystem pages - `changelog.d/3098-past-room-time-zh.fixed.md` `+1/−0` ## Checkpoint <!-- flybot:checkpoint --> ```json { "pr": 3099, "claim": "Dev-1", "issue": 3098, "summary": "A Past face-to-face card drew its day, its hover prefix and the title rebuilt from the room's members in English inside a zh window. Both drawing points now follow the window's language: faceDay writes 10月19日, the hover prefix goes through the dictionary (Started added; Ended came with ThinkFlowLab#3097), and the first word of the rebuilt title is tr('Face-to-face'). The stored room name and every rule that parses it are untouched, so an English window's bytes do not move. Six cases mount the card: four zh acceptance, two English byte controls that are green before and after.", "files": [ "plugins/social/client.js", "plugins/social/test/zh-face-time.test.js", "core/src/client/i18n.js", "core/client.js", "patches/ds-bot/0001-core-fixes.patch", "patches/ds-bot/0008-client-bundle.patch", "docs/subsystems/social.md", "docs/subsystems/core-client.md", "changelog.d/3098-past-room-time-zh.fixed.md" ], "checks": { "ran": "TZ=UTC npm run verify; node --import ./test/resolve.mjs --test test/zh-face-time.test.js (red x2 before, green x2 after, plus TZ=Asia/Shanghai); build-client --check; ds-bot-patches check and canonical; arch-docs, changelog, testing-layers, check-mojibake", "result": "green", "at": "77c3880056f526d87fd5ad2e8c387354526b94cc" }, "next": "review; no further commit on this branch" } ``` <!-- /flybot:checkpoint -->
fix(social): say every face-to-face chip in the interface language
Fixes #3090
Owner: Dev-5
Written-by: Dev-5
Bot: FlyBot Dev-5
Claim-Id: 1d47d64c35824e5b933240fb5e4f2be3
Tier: T2
faceChipLabelsent onlyOpenthrough the translator.Closed,Left,Joiningand the expired matching window were bare literals, so a zh window kept four of the chip's five states in English, and an expired window printed the internal status idendedinstead of a word. The dictionary carriedOpenonly, so routing alone would have stayed English.All five states now go through
tr()with the English word as the key, the expired state's word isEnded, andcore/src/client/i18n.jsgains the four zh entries (已关闭/已离开/已结束/加入中). The new test installs a zh translator itself, so the sharedsocial.test.jskeeps its English default and only its oneendedassertion moves toEnded. Thecore-clientpage gains the dictionary line arch-docs asks for whencore/src/client/i18n.jsor the bundle changes. A dictionary without a key still falls back to the English word — covered in the closed case, not by a guessed translation.The bundle:
core/client.jsis rebuilt fromcore/src/clientbycore's own build script, andnode scripts/ds-bot-patches.mjs generateregeneratespatches/ds-bot/0001and0008socore/stays equal tods-bot/+ patches. The0008hunk only adds these four zh entries; it carries no content of#2520, and whichever bundle PR merges second re-emits the bundle from the newmain.Retiring three pins:
core/test/i18n-missing-entries.baseline.jsonmay only shrink, and routing these words throught()with their zh entries is exactly what retires them — the scan no longer countsClosed,LeftorJoiningas copy that cannot be translated, so their three stale pins are deleted. Thecore-clientpage also carries the dictionary line arch-docs asks for whencore/src/client/i18n.jsor the bundle changes.Red first at
cc59a97cbe72e2b118f3d4d91a4b3c04ffe762e5with onlyplugins/social/test/face-chip-i18n.test.jsadded: 5 tests, 1 pass / 4 fail, twice.Ran at 6afd9d9
node --test plugins/social/test/face-chip-i18n.test.js→ 5/5, twice.npm --prefix plugins/social test→ 692/692 (the base carries#3094's three cases now).node --test core/test/i18n.test.js core/test/i18n-missing-entries.test.js core/test/i18n-plugins.test.js→ 25/25.node scripts/lint-plugins.mjs→ 0 errors.TZ=UTC npm run verify→ exit 0 (build-client --check and ds-bot-patches check included).Re-cut onto
cc59a97cbe72e2b118f3d4d91a4b3c04ffe762e5Two merge-events moved
mainwhile this branch waited.#3096merged first and re-emittedcore/client.jswithpatches/ds-bot/0008wholesale (+10201/−10158), so the old bundle hunk could not apply as it stood;#3094then merged andmainbecamecc59a97cbe72e2b118f3d4d91a4b3c04ffe762e5. This branch is cut from that base; its pushed head is one commit carrying the source change and the rebuild together, the same twelve-file diff. On this basenode scripts/ds-bot-patches.mjs generaterewrote onlypatches/ds-bot/0001-core-fixes.patch(+10/−1) andpatches/ds-bot/0008-client-bundle.patch(+10/−1): the four zh entries and the rebuilt hunk, carrying no content of#2520or#3096.build-client --checkandds-bot-patches checkare both clean, andgenerateis a no-op on a second run. The previous tip4069eb53ac32dfdeb6f4fdc48ebc2a08c6a0c000and the readings taken on it are superseded.Not run
core/index.jsorcore/src/host/change.check-pack: not part ofnpm run verify; CI'spackagejob runs it.Checkpoint
{
"pr": 3097,
"claim": "Dev-5",
"issue": 3090,
"summary": "All five face-to-face chip states now go through the dictionary: Open/Closed/Left/Ended/Joining, with Ended replacing the internal
endedid the expired branch printed. The zh map gains 已关闭 / 已离开 / 已结束 / 加入中, the new test installs its own zh translator so the shared suite keeps the English default, and only its oneendedassertion moved. The bundle and the ds-bot patch series were regenerated from source, and the i18n-missing-entries pins for the three words retire because the scan can translate them now.","files": [
"plugins/social/client.js",
"plugins/social/test/face-chip-i18n.test.js",
"plugins/social/test/social.test.js",
"core/src/client/i18n.js",
"core/client.js",
"core/test/i18n-missing-entries.baseline.json",
"patches/ds-bot/files/test/i18n-missing-entries.baseline.json",
"patches/ds-bot/0001-core-fixes.patch",
"patches/ds-bot/0008-client-bundle.patch",
"docs/subsystems/social.md",
"docs/subsystems/core-client.md",
"changelog.d/3090-face-chip-i18n.changed.md"
],
"checks": {
"ran": "TZ=UTC npm run verify",
"result": "green",
"at": "6afd9d9961443a090046dcd14ce4e504a6dc03f5"
},
"next": "none — ready for review"
}