802 Commits

Author SHA1 Message Date
Lizi
3f7c1e8c16 test(desktop): 片内顺序保持默认,耗时数据按 runner 速度归一
- 撤掉片内按耗时从长到短启动:重导入文件在转换缓存为空时同时开跑,
  usageBroadcasterCodexAccount.test.ts 用例内的动态 import 超过 Linux 5 秒超时(run 43564629415)。
- 托管 Windows runner 速度相差约 1.9 倍,逐文件耗时混着所在机器的快慢;更新脚本按每份报告的
  固定开销(环境 + 准备 + setup)均值算出速度系数,除掉后对多次 run 取平均,
  fileTimings.json 改用 run 43557762427 与 43564629415 重新生成。
- 交叉验证:一轮数据切分、另一轮评估,内容不均 max/mean 1.03–1.05,原哈希切分 1.07–1.11。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-11-14 14:39:22 +08:00
Lizi
d1f9d1bcc2 test(ci): verify 汇总合约同步新增的 typecheck job
hardcoded-color-audit.test.mjs 写死了 verify 的依赖列表,并实际执行汇总脚本校验各结果组合;
补上 typecheck 依赖与 TYPECHECK_RESULT,并在其余门禁全绿时覆盖 typecheck 失败、取消、跳过
三种情况必须阻断 verify。试跑 run 43564629415 的 test:runner 两条失败即来自这里。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-11-14 14:39:19 +08:00
Lizi
7ec351f7a9 Merge remote-tracking branch 'origin/main' into ci/windows-unit-speed-20261114 2026-11-14 14:03:38 +08:00
Lizi
dd482f28c4 test(desktop): CI 分片按已提交的逐文件耗时切分
- timingSequencer 用 fileTimings.json(Windows 每个文件的 worker 毫秒)做确定性的最长优先切分,
  片内最慢的文件先跑;不分片时保持 Vitest 默认顺序,数据读不到时所有分片一起回退哈希切分。
- 新文件按中位数计,数据过期只影响均衡、不影响覆盖;pnpm update:desktop-test-timings --run <id>
  从一次全绿 run 的 Windows 产物刷新。
- 本机用真实配置核对 4,377 个文件、8 片:每个文件恰好一片;估算各片负载 max/mean 1.001(原 1.374)。

测试价值(scripts/__tests__/duration-shards.test.mjs)
- 生产入口与可观察结果:timingSequencer 使用的 assignByDuration / orderByDuration 切分结果
- Bug/规则依据:engineering-conventions §3「分片并集必须等价于未分片的全量测试」
- 现有覆盖缺口:此前 Desktop 用 Vitest 内置哈希切分,没有自定义切分逻辑
- 最小失败输入:输入顺序不同或同耗时文件时切分不一致;1 个慢文件 + 99 个快文件按数量切分
- tier:test:runner(纯函数,node --test)
- 实测耗时:本机 2 条,约 0.1 秒

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-11-14 14:03:27 +08:00
Lizi
9664654090 ci: Linux 单测分 8 片,类型检查拆成并行 job
- Linux unit 从 4 片改为 8 片,并导出 Desktop 逐文件耗时产物。
- Desktop 与 Mobile 的 tsc 从 verify-checks 拆到并行的 typecheck job,由 verify 汇总阻断;
  dev-docs-contract 校验两项类型检查都在该 job 且 verify 依赖它(去掉依赖时该断言会失败)。

Signed-off-by: Lizi <jiali@magiclizi.com>
2026-11-14 14:03:26 +08:00
Lizi
38f8a9f0e3 Merge pull request #10459 from yan-xdt/fix/test-stability-without-ci
fix: 稳定客户端测试与分享申请期限
2026-11-14 13:17:49 +08:00
yan
8f151bfc56 fix: 稳定近期客户端测试与分享申请期限
Handle cancellation during command preparation, reject existing Windows credential targets before PowerShell startup, reduce repeated test startup and migration fixture fsync work, and derive sharing request expiry from one timestamp. Preserve CI installation concurrency.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: yan <yan233@xd.com>
2026-11-14 11:55:26 +08:00
yan
c720c4a35e fix(build): migrate workspace readers and isolate pnpm global config
Limit workspace selectors to the packages block and read license targets from pnpm-workspace.yaml with a declared YAML dependency. Give each unverified fetch or install a private empty temporary global config with one shared cleanup owner, independent of tracked content and links.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: yan <yan233@xd.com>
2026-11-14 11:25:22 +08:00
yan
49771485c1 build: 升级 pnpm 11 并保留并行安装
Pin pnpm 11.28.9 with the upstream hoisted-copy fix, migrate configuration without changing application dependency resolutions, and keep the existing build-script allowlist. Align managed Make tools and diagnostics, preserve Intel Mac support with the official Node package, and retain configuration and credential isolation for unverified installs and cache warming.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: yan <yan233@xd.com>
2026-11-14 11:25:21 +08:00
Dash
205ad0a9b4 Merge main into Host M1 integration for account model discovery
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-14 04:44:10 +13:00
Lizi
7ea2ba6cce Merge pull request #9331 from Yuewei-LL/fix/windows-deep-link-handoff
fix(desktop): 修复 Windows 提权实例的通用深链跳转
2026-11-13 21:26:58 +08:00
Dash
d5bd6276ae fix(host): preserve running tasks and settle failed turns
Running Claude tasks continue when credentials change. Failed and stopped
turns settle their own Git baseline. Match test isolation and tiers to CI,
including Windows fixtures, both Vitest pools and source-contract guards.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Assisted-by: Cindy (https://cindy.app)
2026-11-14 01:17:35 +13:00
Dash
6a48285974 feat(host): run Claude, Codex and Pi tasks on the Node Host as the desktop does
The Node Host builds its Claude, Codex and Pi engines from the same
modules as the desktop, with its own ports: model context and efforts,
disabled and managed Skills, the plugin roster and capability routing,
engine model lists, turn change sets and git savepoints, worktree
runtime leases, the loopback compatibility proxy and subscription
bridges, Codex native login reconciliation and invalidation, Pi native
providers and packages, the Pi persistent subagent runner, auto-review
and the auxiliary model chain, the vision bridge, the /learn capture,
and the event and tool input redaction before events leave the Host.

Parity tests run the desktop and Host code on the same inputs; Host
end-to-end scripts run the bundled engines against a local mock
upstream with an isolated HOME.
docs/host/personal-migration-release-table.md records, item by item,
what is aligned, the known differences and what remains before the
personal edition can move to the Host.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-13 22:44:27 +13:00
Dash
fafb40d0b5 Merge origin/main into cindy/upbeat-babbage
Preserve notification background holds alongside retained invoke caches, and regenerate the direct-link runtime from merged sources.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-13 10:03:40 +13:00
Lizi
e4bff4be30 Merge pull request #10259 from xuzini-xzn/fix/schedule-owner-scope
fix(scheduler): 修复自动化启动时数据归属快照过期
2026-11-13 04:36:18 +08:00
Kirozeng
ce8f920cce fix(i18n): 英文文案统一 sentence case,高频文案修正并拦截新增违规 (#10026)
* fix(i18n): 英文文案改 sentence case,高频文案修正并拦截新增违规

落实设计规范审核的维护者裁决 B-13、B-14、B-15、B-16(均为 A):

- DESIGN.md §11.2 英文按钮、标题、标签统一 sentence case,写明专有名词、
  产品名、保留英文的术语、缩写与系统界面名称的例外
- 修正 27 条高频英文文案(通用 IPC 错误、插件/Skill 市场通用错误、
  聊天错误横幅、供应商错误 toast、"Pushed successfully"、6 个无宾按钮),
  只改 en 值,不改 key 与其他语言
- check:i18n-glossary 新增 en 写法规则(Please、successfully、直引号、
  无宾 Confirm/OK/Submit),存量 350 条登记进 glossary-baseline,只减不增
- §11 语言数改为引用 SUPPORTED_LOCALES,补 es/fr/de/pt 与文言版的大小写和标点
- 删除已不存在的 Spelunking 示例(§2、§11.1)

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: kirozeng <kirozeng@gmail.com>

* fix(i18n): 英文写法规则支持按 key 豁免格式字面量,并接入手写文案检查

处理 PR #10026 的两条 review:

1. 合法 JSON 示例也被拦截:glossary.json 新增 englishCopyExempt,按规则名分组、
   只收精确 key(拒绝子树前缀与未知规则名),用于必须原样展示的格式字面量。
   插件市场 manifestBody、供应商导入格式说明 5 条、文件名非法字符、终端字体预览、
   SSH host key 修复说明里的 known-hosts.json key 共 9 条从 baseline 移到豁免;
   说明文字改动后不再因摘要失配被判为新增违规。豁免不再命中时根门禁报失效。
2. 手写文案漏检英文违规:新增共享的 auditEnglishCopy,接入原生菜单 / 右键菜单 /
   WebAuthn 影子 catalog、OAuth 结果页、端点清单弹框、Windows 安装器与 mobile
   登录等影子 catalog 的测试;既有问题(OAuth 结果页 2 条、mobile 登录与认证错误
   15 条)在各测试内单独冻结,只减不增。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: kirozeng <kirozeng@gmail.com>

* fix(i18n): 手写文案英文写法存量按命中次数与文案摘要冻结

处理 PR #10026 的 review:auditEnglishCopy 原先只按 key + rule 命中冻结清单,
已冻结的文案再追加同类违规(如给 mobile/loginMessages:invalidEmail 再加一句
Please,please×1 → ×2)会被当存量放行。

- 冻结指纹改为 `key\trule\t命中次数\t文案摘要`,与根门禁 baseline 同口径;
  文案摘要抽成共享的 textDigest,根门禁的 makeViolation 改用同一函数
- 重新生成 OAuth 结果页(2 条)与 mobile 登录 / 认证错误(15 条)的冻结清单
- 补测试覆盖评审给出的例子:追加 Please 后报 please×2 为新增,旧指纹判为失效

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: kirozeng <kirozeng@gmail.com>

---------

Signed-off-by: kirozeng <kirozeng@gmail.com>
2026-11-13 03:19:32 +08:00
xuzini-xzn
12d986df7b fix(scheduler): 保护调度触发和恢复时的账号归属
Signed-off-by: xuzini-xzn <323002959+xuzini-xzn@users.noreply.github.com>
2026-11-13 03:11:58 +08:00
Lizi
588b5e3666 Merge pull request #10188 from makecindy/cindy/humble-pasteur
fix(desktop): 修复聊天内容与输入框的 RTL 段落方向
2026-11-12 22:22:33 +08:00
Lizi
6619f92d1e Merge pull request #10019 from kirozeng/fix/design-color-theme
fix(desktop): 颜色与主题按规范审核裁决落地
2026-11-12 22:11:02 +08:00
DavidShen
54b2ebdbbd test(desktop): verify composer marker spacing in the browser
Replace the stale CSS-source assertion with real ChatInput layout and clipboard coverage for full-width CJK markers. Reduce the generated test-hygiene baseline.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: DavidShen <david@xd.com>
2026-11-12 20:51:34 +08:00
Lizi
8490ce7e42 Merge pull request #10069 from makecindy/cindy/silly-mendel
fix(mobile): 修复插件卡片无法打开稿件预览
2026-11-12 20:13:03 +08:00
Dash
0b4b265948 feat(mobile): 为高级触觉设备添加交互反馈 (#10141)
* feat(mobile): add capability-gated interaction haptics

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(mobile): restore recording haptics after playback takeover

Preserve the original recording preference across reacquisition and restore it independently of audio category ownership. Repair isolated composer callbacks and add native regression coverage.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 18:24:54 +08:00
Lizi
13d99a3187 Merge pull request #10089 from xuzini-xzn/fix/9639-browser-comment-csp
fix(desktop): preserve browser comments under strict page CSP
2026-11-12 17:51:23 +08:00
Lizi
ceca763b98 Merge pull request #9983 from makecindy/cindy/sincere-galileo
fix(desktop): 断网时启动不再等待运行环境下载
2026-11-12 17:02:11 +08:00
Lizi
b506d2956f Merge pull request #9378 from makecindy/cindy/pensive-mendel
feat(github): 用 GitHub App 事件更新 PR 并触发自动任务
2026-11-12 16:35:25 +08:00
xuzini-xzn
7a5a35e181 fix(desktop): load browser comment preload once in tests
Merge trusted main to include the existing desktop-whoami baseline fix; retain the CSP overlay behavior and remove its obsolete test hygiene debt.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: xuzini-xzn <323002959+xuzini-xzn@users.noreply.github.com>
2026-11-12 15:30:14 +08:00
Kirozeng
5e204053e8 test: tighten theme initialization hygiene baseline
The initialization regression no longer reloads modules; remove its obsolete test debt allowance using the existing baseline generator.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Kirozeng <kirozeng@gmail.com>
2026-11-12 14:38:46 +08:00
Kirozeng
bf6b8ebf0a Merge upstream main with preflight baseline fixes
Preserve the PR theme, diff, and legacy shadow compatibility repairs while integrating upstream changes including #10066.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Kirozeng <kirozeng@gmail.com>
2026-11-12 12:00:39 +08:00
Lizi
59702e7da2 Merge pull request #10066 from kirozeng/fix/restart-desktop-whoami-macos-test
fix(scripts): 恢复 whoami 共享运行时识别并隔离 personal-build 引擎测试
2026-11-12 10:02:10 +08:00
Dash
1b8714c58b Merge origin/main into cindy/pensive-mendel
Include the landed baseline locale performance fix without adding PR-local runtime machinery.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 14:56:24 +13:00
Dash
4924bfa7ba Merge remote-tracking branch 'origin/main' into cindy/sincere-galileo
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 14:33:22 +13:00
Dash
0c35318716 fix(mobile): 清除暂停的卡片预览并修复验证入口
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 14:29:49 +13:00
Dash
a11bbec7ef Merge remote-tracking branch 'origin/main' into cindy/pensive-mendel
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 14:02:12 +13:00
Dash
fa0061029d Merge remote-tracking branch 'origin/main' into cindy/host-channel-coverage 2026-11-12 13:14:34 +13:00
Kirozeng
0e72e6afad fix(scripts): recognize personal app paths before launch arguments
Accept whitespace after complete process paths so shared and fixed personal runtimes remain attributable when launchers preserve trailing flags.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Kirozeng <kirozeng@gmail.com>
2026-11-12 08:08:21 +08:00
Kirozeng
9cd2ac1bd6 test(scripts): cover personal runtime trailing launch arguments
Regression reproduces shared and fixed runtime attribution failures with whitespace-delimited arguments and rejects similarly named app paths.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Kirozeng <kirozeng@gmail.com>
2026-11-12 08:06:54 +08:00
kirozeng
50e8580132 test(scripts): personal-build 引擎测试不读开发者的 zsh 启动文件
mac-engine.zsh 以非交互 zsh 运行时仍会读取 $ZDOTDIR/.zshenv(默认
~/.zshenv)。开发者在其中把真实 pnpm 所在目录放到 PATH 前面时,测试注入的
pnpm 桩被覆盖,真实 pnpm 对 fixture 锁文件安装失败,表现为
「stage-result: fail install」。与同文件第一条测试一致,把 ZDOTDIR 指向
临时目录,使测试不依赖本机 shell 配置。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: kirozeng <kirozeng@gmail.com>
2026-11-12 07:45:33 +08:00
kirozeng
9e5f6c6b85 fix(scripts): 恢复 whoami 对共享签名运行时的识别
#9791(ed48ee70a38)合入时把 desktop-whoami.mjs 的 identifyDesktopProcesses
带回到旧版本,丢掉了 #9443(349f1ac0aa3、c43dd8ec55b)加入的共享运行时与
固定路径 Cindy Personal.app 识别。真实 macOS 上,用共享签名运行时或固定 app
路径启动的个人版实例会被 whoami / 重启脚本漏掉;对应回归测试
「whoami attributes a shared personal shell to its business checkout」只在
macOS 运行,因此 Linux CI 一直是绿的。

按 #9443 的原实现恢复这段判断,保留 #9791 新增的 Windows /prefetch 修正。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: kirozeng <kirozeng@gmail.com>
2026-11-12 07:45:33 +08:00
Dash
adc368a4b3 fix(host): preserve code values in coverage tables
Encode special code values as HTML entities so backslash-pipe pairs cannot split GFM table cells. Keep ordinary code spans and verify the production Markdown through the GFM parser.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 10:54:49 +13:00
Dash
3aae196f8b test(host): key virtual scanner programs by forward-slash paths
On Windows path.join gives backslash names, but TypeScript asks the
compiler host for forward-slash names, so the in-memory contract file was
never found and collectContractChannels received undefined
("Cannot read properties of undefined (reading 'kind')" in the Windows
test runner self-tests). The virtual host now normalises both sides.
Reproduced on macOS with a backslash key: the old helper throws the same
TypeError, the new one resolves the file.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 10:44:33 +13:00
Dash
c2201a0684 fix(host): resolve templated contract channels and fail on unresolved names
The coverage scanner only read literal desktopChannel values, so the eight
browser-backend:* entries that #9991 builds with
Object.entries(HOST_BROWSER_SETTINGS_ACTIONS).map(([action]) => `browser-backend:${action}`)
were silently skipped and listed as B (window-local) although client mode
proxies them to the Host.

- Resolve the key of Object.entries(X)/Object.keys(X) iteration callbacks
  from X's declared properties.
- Any contract-side channel name the scanner cannot resolve now fails
  generation instead of disappearing; the delegation table's
  HOST_CONTRACT_CHANNELS.map((def) => def.desktopChannel) is recognised as a
  pass-through of names already read from the contract file.
- Lift the constant resolver into createConstResolver so tests exercise the
  real code on the real contract file.

Reclassified (B -> contract): browser-backend:get-state, set-kind,
set-use-real-profile, reset, get-health, recover, probe-source-read,
open-extension-store. Contract 67 -> 75, B 361 -> 353, window class
386 -> 378 (registered 372 -> 364). Host work stays 985.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 09:41:29 +13:00
Dash
291a649254 fix(host): normalize scanner paths on Windows and refresh coverage
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 09:17:59 +13:00
Dash
270eea0cab Merge remote-tracking branch 'origin/main' into cindy/host-channel-coverage 2026-11-12 09:14:44 +13:00
Amp
54a92e1757 Merge main into perf/newmakerdraft-test-module-reset
Keep main's updated pi-package-store-security note alongside the
newMakerDraft result in the Desktop unit performance doc.

Signed-off-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-957fc0fa-ac9b-4453-a32d-51d9719e042e
Co-authored-by: xdanger <xdanger@gmail.com>
2026-11-11 20:03:13 +00:00
Lizi
24334fcf35 Merge pull request #9991 from makecindy/feat/host-handoff-foundation
feat(host): 分离后台任务生命周期与桌面平台执行
2026-11-12 03:58:04 +08:00
Dash
9cdeb7ab13 Merge remote-tracking branch 'origin/main' into cindy/sincere-galileo
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 08:57:50 +13:00
yunjie
7ca54f5b49 Merge pull request #10034 from makecindy/test/pi-startsession-cleanup-fake-poll-clock
test(maker-core): Pi Subagent 轮询测试改用 fake clock,去掉 21 处真实等待
2026-11-11 14:56:21 -05:00
yunjie
fc2c6f62e3 Merge pull request #10035 from makecindy/fix/pi-package-aggregate-limit-projection
test(desktop): 修复 Pi 包聚合上限投影用例的 Windows 抖动
2026-11-11 14:55:45 -05:00
Kirozeng
d5fc4abf17 Merge upstream main into fix/design-color-theme
Preserve both color/theme compatibility and motion decision history entries while resolving the design log conflict.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Kirozeng <kirozeng@gmail.com>
2026-11-12 03:52:26 +08:00
Dash
13ad706f87 test(host): 同步通道领域加断言,措辞改为“用户填写的值”
SYNC_LOCAL_DOMAINS 按 A 规则的领域名判定同步通道是否本地读。新增断言:
其中每个领域都必须是某条 A 规则的 reason,并核对设置与账号提示两类同步
通道的判定和文案,领域改名时测试直接失败,不会静默改判。

计划文档同步 1041669c7a 的改判:扫描计入参数默认值后,唯一改判的通道是
git-review:open-file,A(git 与工作树)→ C-两段式(openReviewFile 第 4 个
参数默认值是 shell.openPath)。A 918 → 917,C-两段式 40 → 41,C 87 → 88,
990 不变;巡检 133 个(722 次)不变。两份证据仍是旧格式计数报告,没有重录,
按记录的 kind 读取;唯一同名的 ghosts:workdir-prefs 在两份证据里都没有调用。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-12 08:51:26 +13:00