Skip to content

feat(desktop): unify native locale authority - #2686

Merged
Astro-Han merged 3 commits into
apache:mainfrom
me2seeks:feat/2685-desktop-native-locale
Aug 18, 2026
Merged

feat(desktop): unify native locale authority#2686
Astro-Han merged 3 commits into
apache:mainfrom
me2seeks:feat/2685-desktop-native-locale

Conversation

@me2seeks

Copy link
Copy Markdown
Contributor

Summary

  • add one Desktop main-process locale authority backed by Client settings and Electron system languages
  • route Runtime Host upgrade prompts, notification fallbacks, Client settings confirmation, permission UI, Computer Use status, and the project picker through it
  • keep each domain's copy local while preserving model-visible Client settings results
  • prevent stale reads from rolling back a newer locale and fall back safely when locale settings cannot be read

Fixes #2685
Part of #2672

Tests

  • npm --workspace @maka/desktop test
  • npm --workspace @maka/desktop run typecheck
  • npm run lint
  • npm run format:check
中文对照

摘要

  • 新增由客户端设置和 Electron 系统语言驱动的 Desktop 主进程语言 authority
  • 让 Runtime Host 升级提示、通知兜底文案、客户端设置确认、权限界面、Computer Use 状态和项目选择器共用该 authority
  • 文案仍由各自领域维护,并保持模型可见的客户端设置结果不变
  • 防止过期读取回滚新的语言设置;语言设置读取失败时安全回退,不阻断原生操作

测试

  • npm --workspace @maka/desktop test
  • npm --workspace @maka/desktop run typecheck
  • npm run lint
  • npm run format:check

@xxhZs xxhZs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking integration issue against current main: Runtime Host residency vocabulary has changed from automation to scheduled-task, but activityKey() in runtime-host-upgrade-copy.ts only recognizes automation. After resolving the current production-file conflicts, Scheduled Task residency would therefore fall through to Other background activity / 其他后台活动 instead of its own localized label. Please rebase onto current main, preserve the new subpath imports and current test-pruning decisions while resolving conflicts, add an explicit scheduled-task mapping/copy, and rerun CI. The locale authority, stale-read guard, and migrated native copy paths otherwise look sound.

@me2seeks
me2seeks force-pushed the feat/2685-desktop-native-locale branch from f2ce67b to 42b129e Compare August 12, 2026 13:59

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex automated review

I traced the locale authority through settings effects, notifications, permission UI, Runtime Host prompts, the project picker, and Computer Use status UI at exact head 42b129e9537448ce9764ce7fdec7a9c418653640. The authority and stale-read guard are sound, and the scheduled-task mapping issue reported on an older head is fixed here.

One reproducible P2 remains in the live Computer Use tray surface; see the inline comment. I did not find a P0/P1 issue, unnecessary parallel locale authority, or a useful PR split. The checks for this head are green.

Disclosure: This is an automated review performed by Codex using delegated adversarial review passes and a final evidence check. It has not been independently verified by Astro-Han or another human reviewer, does not constitute human approval, and does not represent the final judgment of a human reviewer.

Comment thread apps/desktop/src/main/desktop-native-capability-assembly.ts
@me2seeks
me2seeks force-pushed the feat/2685-desktop-native-locale branch from 42b129e to f063c20 Compare August 13, 2026 05:20
@me2seeks

Copy link
Copy Markdown
Contributor Author

Rebased on current main and addressed the live Computer Use tray locale update in f063c20. Could you please take another look?

@me2seeks
me2seeks force-pushed the feat/2685-desktop-native-locale branch from f063c20 to 10bead9 Compare August 17, 2026 14:25
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


Comment @coderabbitai help to get the list of available commands.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed exact head 10bead90dec85facf8457ed8b2f532c891245fcd, including the full diff, CI, merge state, and the resolved review history. I found no reproducible P0–P2 issue on the current head.

The problem definition is correct: native Desktop surfaces should resolve one effective locale instead of maintaining separate settings reads and fallbacks. The main-process authority, stale-read protection, domain-owned catalogs, and live Client-setting observation form a coherent and appropriately small solution. The earlier scheduled-task mapping and active Computer Use tray update findings are fixed.

One P3 lifecycle follow-up remains. While uiLocale is auto, changing the operating-system language does not notify an already materialized Computer Use tray menu; it keeps the old copy until another Computer Use event rebuilds it. This is a low-frequency stale-presentation case rather than an authority or data-integrity failure, so I do not consider it blocking. Rebuilding before menu presentation, or publishing system-language changes, would close it cleanly.

I found no useful PR split or parallel production state to remove.

Approved with that follow-up recorded.

Disclosure: Codex performed the read-only source, lifecycle, CI, test, and prior-feedback analysis. The human contributor remains responsible for independently verifying the final diff and owns the approval decision.

中文

当前 head 没有 P0–P2。Desktop native locale 已收敛到单一 authority。运行中切换系统语言时已有 tray 暂不刷新属于 P3 展示陈旧,不阻塞 Approve。

@Astro-Han
Astro-Han merged commit 807fea4 into apache:main Aug 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify Desktop native surfaces on one locale authority

3 participants