fix(bot-mode): roster menu and group row speak the active language (#91667, #108978, salvage #108979) - #113430
Merged
Merged
Conversation
…lability
The group row's empty-room preview and its aria-label spelled
`${members.length} bots` and `${available} of ${total} available` as
literals, so a reader on ja, zh or zh-hant saw English in a row whose
neighbours were translated. The bundle already carries `group.memberCount`
in all four locales (a7db531 moved it there) and `group-chat-view.tsx`
renders through it; the row's rebuild (5afa487) reintroduced the literal
next to the bundle accessor it already holds.
Route both through the bundle: the preview and the aria-label's count use
`group.memberCount`, and a new `group.availableCount(available, total)`
carries the availability sentence in all four locales, for the aria-label
and the tooltip that share it. `'You'` in the last-message preview stays a
literal on purpose: it is the persisted author sentinel the bundle header
describes.
Tests: `i18n-test-helper` gains `translateBotsIn(locale)`, since a case that
has to tell a catalog string from an English literal cannot do it under
`en`. The new group-row case renders the same row under `en` and `ja` and
reads the preview and the accessible name; it fails on the previous source.
The roster's right-click menu on a bot row still spelled `Pin to top` / `Unpin`, `Hide` / `Unhide`, `Groups: …` / `Manage groups…`, the pin/hide toasts, the metadata-load error toasts, the `This device` gateway label and the attention-badge tooltips as English literals, so a zh/ja reader saw English items inside an otherwise translated menu (#91667, residual of #88798 / #91336 after the bundle landed in a7db531). Route every one of them through the plugin bundle (`b.bot.*`, all four locales) and turn `BOT_ATTENTION_HINTS` into `botAttentionHint(reason)`, which reads `botsText()` at render so the tooltip follows the active locale. No behaviour change; strings only. Tests: bot-row.test.tsx renders the menu under `zh` and asserts the catalog strings appear and no English literal survives (red on base). e2e/bot-mode-roster-localized.spec.ts drives the real Electron app with `display.language: zh`: right-click menu + a fresh group row (red on base, green here).
Bundled-plugin change; the shell version tells About whether the running binary carries it (stale-shell triage for "still English" reports).
Contributor
૮ >ﻌ< ა ci reviewran on d494e89 — fix(desktop): render the reader's own group lines in the act
|
| Package | Before | After |
|---|---|---|
| apps/desktop | 0.17.3 |
0.17.4 |
How to fix:
Add the ci-reviewed label after verifying the version changes are expected.
⚠️ Warnings
CI timings · View report · View job
Wall time 33m1s vs 6m (+450.3%). 9 job(s) slower, 2 faster, 2 unchanged.
- OS-specific tests / Windows-only tests: -25.0s
- Python tests / Run tests: +21.0s
- JS & TS checks / JS & TS checks: -15.0s
- OS-specific tests / macOS-only tests: +14.0s
- Python lints / ruff enforcement (blocking): +7.0s
The GroupRow preview and the group transcript spelled the reader as the English literal 'You' under every locale, so a zh roster read "You: …" beside otherwise Chinese chrome. Add `group.you` to all four Bot Mode bundles and use it at the three RENDER sites (bot-row preview, group-chat-view speaker display and clicked label). The persisted author marker written into the room log (group-chat-parts.tsx, group-rounds.ts) stays the English sentinel: group-activity.ts compares it by value, so translating it in place would corrupt existing logs and break the comparison. The i18n.ts header now documents that split.
teknium1
added a commit
that referenced
this pull request
Sep 17, 2026
The dashboard lifespan started `_eager_reconcile_own_session_db` on a daemon thread and never joined it. Under pytest each TestClient context spawned one; the fresh tmp HERMES_HOME store makes every worker take the bootstrap path, so on a slow CI runner ten of them were still queued on `_session_db_bootstrap_lock` when the test's autouse leaked-DB sweep ran `SessionDB.close()` on the connection the live worker was stepping in `_open_probed` -> cross-thread `sqlite3_close` on an active statement -> `Fatal Python error: Segmentation fault` after every test had passed (PR #113430 run 35153362037, attempt 1; ~1/4 locally). The worker is now a regular (non-daemon) thread that the lifespan `finally` joins, so its connection is only ever closed by the thread that opened it and it cannot outlive the server or the interpreter. Startup is unchanged (the open still happens off the ready-probe path); the join is bounded by SessionDB's write patience, so shutdown cannot hang on it.
This was referenced Sep 17, 2026
4 tasks
OutThisLife
added a commit
that referenced
this pull request
Sep 23, 2026
Extend the existing Bot Mode catalogs, preserving schedule syntax, profile routes, capability IDs and user content. Cover locale switches through the real scheduling and editor components. Builds on the landed infrastructure by OutThisLife (#96726/#96878) and teknium1/Vadim Comanescu (#113430); report by NealZhouPanda (#88798). No wholesale supersede of #90810 or #101305.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Bot Mode roster's right-click menu, its pin/hide toasts, the attention-badge tooltips and the group row's member count / availability now follow the desktop language (en · ja · zh · zh-hant) instead of staying English.
Changes
bot-row.tsx::GroupRow— empty-room preview and accessible name route throughgroup.memberCountand the newgroup.availableCount(available, total)(salvaged from fix(desktop): localize the Bot Mode group row's member count and availability #108979).bot-row.tsx::BotRow—Pin to top/Unpin,Hide/Unhide,Groups: …/Manage groups…, the pin/hide toasts, the metadata-load error toasts and theThis devicegateway label read from the plugin bundle (b.bot.*).data.ts::botAttentionHint(reason)replaces the English-onlyBOT_ATTENTION_HINTSmap; it readsbotsText()at render so the roster badge tooltip follows the active locale.i18n.ts— the new keys (incl.group.you) in all four bundles;i18n-test-helper.ts::translateBotsIn(locale)for tests that must tell a catalog string from an English literal.apps/desktop/package.json→ 0.17.4 (bundled-plugin change; About's shell version is the stale-shell tell for "still English" reports).bot-row.test.tsx— group row underen/ja(contributor's), the context menu underzhasserting no English literal survives, and a zh room whose latest line is the reader's previews as你: …while the log marker staysYou;e2e/bot-mode-roster-localized.spec.tsdrives the real Electron app withdisplay.language: zh.Validation
Pin to top/Hide/Manage groups…between translated neighbours; group row2 bots, accessible namecrew, 2 bots, 2 of 2 available.置顶/隐藏/管理群聊…; group row2 个机器人, accessible namecrew, 2 个机器人, 2 个中 2 个可用.e2e/bot-mode-roster-localized.spec.ts— base (origin/main dist): 2 failed (menuitem "Pin to top",menuitem "Hide",menuitem "Manage groups…"in the zh menu) / head: 2 passed (1.1 min). Screenshots:/tmp/batchbots/i18n-shell-inventory/shots/head/bot-row-context-menu-zh.png,/tmp/batchbots/i18n-shell-inventory/shots/head/group-row-zh.png. Electron build:npm run buildof this head in.worktrees/bots-i18n-shell-inventory.bot-row.test.tsx+i18n.test.ts: 12 passed;npm run check:lint(typecheck + eslint) exit 0.Root cause: the bundle landed in a7db531, but the TSX row rebuild (5afa487) reintroduced these strings as literals beside the
useBots()accessor it already held, andBOT_ATTENTION_HINTSwas a module-level English map.Fixes #108978
Fixes #91667
Part of #88798 (roster residuals; the New/Edit Bot dialog copy and the rotating intro copy are not in this PR)
Part of #91336 (right-click menus; the New Bot dialog + Advanced section remain hardcoded English)
Salvages #108979 (@vadimcomanescu) — cherry-picked with authorship preserved.
Supersedes the closed #92850 (@Georgefifth), whose plugin.js target no longer exists.
Review follow-up
GroupRowpreview (bot-row.tsx) and the group transcript's speaker display / clicked label (group-chat-view.tsx) rendered the reader as the English literalYouunder every locale. They now readgroup.you(You/あなた/你/您) from all four bundles; 1 vitest added (red on the previous head, green now).group-chat-parts.tsx::appendGroupChatEntry(... name: 'You')and themember: 'You'/name: 'You'writes ingroup-rounds.tsare the PERSISTED author marker on log entries, compared by value ingroup-activity.ts::groupActivityLabel; translating it in place would rewrite stored logs and break the comparison. The i18n.ts header now states the write/render split. The activity-row verbs ingroup-activity.ts::GROUP_ACTIVITY_LABELS(replied,is working…) are still English — pre-existing, separate follow-up.Infographic