Commit Graph

43 Commits

Author SHA1 Message Date
Dash
05d306379f fix(mobile): 修复多类线上闪退并留存 iOS 崩溃符号
按商店后台与 Xcode Organizer 里的线上崩溃日志逐类处理:

- JS 致命错误:启动稳定后(根布局首次提交 20 秒后),渲染报错由根级
  RootErrorBoundary 显示可重新加载的错误页,回调与定时器里的未捕获报错由
  jsErrorGuard 降为非致命。窗口内保持致命,expo-updates 的错误恢复照旧回滚坏热更。
  本机诊断记录新增 `js error` 事件,只含报错类型与打包文件行列号。
- iOS 0xdead10cc:后台启动时不读取入站分享暂存区(读取期间持有 App Group 文件锁),
  回到前台再读。
- Android 图片绘制崩溃:expo-image 补丁在绘制前修正未预乘标记,画布仍拒绝时丢弃
  这张图;该模块改为从源码编译,否则补丁进不了包。
- Android 长按输入框崩溃:expo-paste-input 补丁在选区没有可见宽度时让本次触摸
  不触发长按,避开系统零尺寸拖拽缩略图的异常。
- build-ios.mjs 把 archive 里的 dSYM 打成 .dSYMs.zip 留在 .ipa 旁边。

只改变 Android 的 runtime fingerprint(iOS 不变):两个 Android 补丁须随冷更发布,
其余为纯 JS 改动。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-11 18:31:29 +13:00
DavidShen
e1553cffe1 fix(mobile): 区分 APK 指纹缺失与读取失败
读取非零退出后核对 APK 文件清单,仅确认缺项时提示重建;目录读取故障保持失败。
补充真实 CLI 回归及读取失败保护测试。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: DavidShen <david@xd.com>
2026-11-09 16:28:50 +08:00
DavidShen
f9b47da8a8 fix(mobile): 保留行内公式语义并支持 Android 验收
修复样式命令参数与符号边界,补齐 Android 验收入口及指纹读取失败回归。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: DavidShen <david@xd.com>
2026-11-09 15:59:07 +08:00
Dash
59b07acce6 fix(mobile): sim:up waits for the replacement Metro and probes the device's real port
Restarting or taking over a Metro on 8081 could accept the old server's
/status answer and keep its soon-deleted log, ending in BUNDLE_NOT_SEEN.
Readiness now needs the ownership record to name a new process whose log
exists.

A booted device pointed at a port outside the scanned 8081-8086 range
looked idle; the device's actual port is now probed, and a failed probe
counts as busy.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-04 17:32:27 +13:00
Dash
544e452423 feat(mobile): pnpm mobile:sim:up starts the phone app in one command
Agents had to chain boot, Metro, rebuild and whoami themselves, and after
one step failed they kept reporting the phone app as unbuildable. The new
command picks a device without disturbing other tasks (several candidates
make it ask instead of guessing), boots it, reuses or starts this
worktree's Metro (on a free port when 8081 belongs to another task),
installs the matching native app, launches it, waits for the bundle,
brings it back to the foreground when the system pushed it behind after
boot, and checks identity. It reads the Metro log sim-start records and
keeps its own output in the system temp directory, never in the worktree.
It can be rerun after the device idles off, and always ends with one JSON
line giving a code and the next step.

The root AGENTS.md module table now routes "seeing changes on the phone"
to the Mobile docs; the command and the rule that only a fresh run's code
counts as evidence live in docs/dev-rules/mobile-development.md.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-04 16:53:33 +13:00
Lizi
08cf7af51d Merge pull request #8560 from makecindy/dash/mobile-quiet-dev-warnings
fix(mobile): 去掉开发模式警告提示,并在模拟器验证后检查 Metro 日志
2026-11-03 21:11:37 +08:00
Dash
1065df1bc5 fix(mobile): per-launch private Metro log, full writes, no device-link allowlist
Each Metro launch writes its log in a fresh mkdtemp directory recorded in the
port owner record, so logcheck only reads that launch's log and never a
predictable path. Short writes discard the log like failed ones. device-link
warnings are no longer known: relay errors can hide auth failures.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:48:00 +13:00
Dash
1f09a5bb3d fix(mobile): delete the Metro log when its Metro exits
The raw output may carry credentials and logcheck already rejects a stopped
Metro, so sim-start removes the log on child exit and on spawn errors.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:09:59 +13:00
Dash
390775ba70 fix(mobile): keep raw Metro logs out of the worktree
Metro output can carry credentials, so the captured log now lives under the
system temp directory, one folder per worktree, instead of apps/mobile/logs.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 19:57:26 +13:00
Dash
46736fea9b fix(mobile): empty a broken Metro log before trying to delete it
When a write fails and the directory forbids deleting, the truncated log has
no launch header, so logcheck reports unknown instead of passing on a
partial log.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 19:44:58 +13:00
Dash
88e2fb9cb0 fix(mobile): reject Metro logs not written for the running launch
sim-start writes a launch id into the log header and the Metro owner record
(null when the log could not be created). logcheck reports unknown unless
they match, so an old log that could be neither replaced nor deleted cannot
pass.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 19:30:52 +13:00
Dash
6445c56a14 fix(mobile): drop incomplete Metro logs and load quietDevLogs once in tests
A Metro log that lost output (disk full, cannot open, cannot be recreated)
is deleted so logcheck reports unknown instead of passing on partial
content. quietDevLogs no longer installs on import, so its test loads the
module once as the test hygiene guard requires.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 18:07:57 +13:00
Dash
eb865b7f92 feat(mobile): check Metro logs after simulator verification
sim:start now writes Metro output to apps/mobile/logs/metro-<port>.log, and
mobile:sim:logcheck reports what happened after the latest entry bundle: ERROR
and failed bundles fail, unlisted warnings must be reported, and an unknown
state is not a pass. Add the check to the simulator verification rules.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 17:37:40 +13:00
Dash
1bd965796f docs(mobile): 模拟器调试入口改用 cindy-simulator 插件名
插件已改名为 cindy-simulator,同步调试文档、无已开机设备时的提示语及对应测试。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 15:00:41 +13:00
Dash
13783a40d6 fix(mobile): Cindy 模拟器可用时不再悄悄改用系统模拟器 (#8313)
* fix(mobile): keep simulator tests on Cindy's simulator while it is available

An idle Cindy simulator made whoami and rebuild silently pick a system device,
so a task could run on the wrong backend without any signal. Stay on Cindy until
the plugin is unavailable or a --udid names another device, report the reason
and reusable devices, and flag the system simulator while Cindy's is available.

Stop reporting native-missing when no exact target was probed, and align the
test workflow: occupied Cindy devices are not a reason to fall back, parallel
devices stay in the selected backend, and handoffs name the backend and model.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(mobile): fail closed when Cindy's simulator cannot be listed

A failed device listing was read as an empty one: whoami reported cindy-idle,
while rebuild and open silently moved on to a system device. Keep the failure
and stop without choosing a backend unless an exact UDID may live elsewhere.

Treat the Cindy devices directory given as an absolute path as Cindy's
simulator so it gets the same notices as CINDY_MOBILE_SIMULATOR=cindy.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 13:25:54 +09:00
Dash
ea628c03d8 refactor(mobile): 通过生产入口验证模拟器 Metro 回执
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-29 21:28:19 +13:00
Dash
c414c879fd fix(mobile): 提前检查模拟器构建工具并改善诊断流程
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-29 21:28:12 +13:00
Dash
93933624fe feat(dev): 桌面与手机共用的免登录 UI 模拟数据(--mock)
- @cindy/maker-shared/ui-mock:两端共用的演示项目与任务(桌面数据库行格式)
- Desktop:restart --mock 使用独立 ui-mock 沙箱,首次免账号进入并补齐模拟任务
- Mobile:sim:start/whoami/rebuild 支持 --mock,visual mock 改用共享数据
- 文档:docs/dev-rules/ui-mock-data.md,并在启动说明与 AGENTS 索引中链接

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-24 14:01:03 +13:00
Dash
96107363aa fix(mobile): 仅构建时识别私有设备目录,自动选择跳过不可读的 Cindy 目录,测试路径不依赖平台分隔符
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-19 16:57:18 +13:00
Dash
200bf3e64c feat(mobile): 模拟器脚本默认优先 Cindy 模拟器,没有再用系统模拟器
mobile:sim:whoami / rebuild / open 不再固定系统(Xcode)设备目录:默认先找 Cindy
模拟器(官方 Baguette 插件的独立设备目录)中已启动的设备,未安装、插件关闭运行或
没有已启动设备时用系统模拟器;--udid 跟随设备所在目录。个人选择放在仓库外的
CINDY_MOBILE_SIMULATOR=auto|cindy|system|<设备目录绝对路径>。

非系统目录的设备用通用目标编译、simctl --set 安装启动;它们没有外部窗口,open 拒绝、
whoami --viewer 报不可用。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-19 16:43:08 +13:00
bobo
7085c77678 fix(mobile): 从 Play AAB 移除安装包权限 (#5187)
* fix(mobile): exclude package install permission from Play AAB

Signed-off-by: xd-bobo <caojianbo@xd.com>

* docs(mobile): clarify Play artifact permission validation

Signed-off-by: xd-bobo <caojianbo@xd.com>

* test(mobile): remove duplicate goal route fixture bindings

Signed-off-by: xd-bobo <caojianbo@xd.com>

---------

Signed-off-by: xd-bobo <caojianbo@xd.com>
2026-10-13 20:30:49 +08:00
DavidShen
38aa743d24 fix(mobile): 补齐 Mermaid URL 兼容与渲染回归验证
Signed-off-by: DavidShen <david@xd.com>
2026-10-08 18:30:37 +08:00
DavidShen
2d2ba2b7ce fix(mobile): 修复旧版 WebView 的 Mermaid 渲染 #5586
Signed-off-by: DavidShen <david@xd.com>
2026-10-08 18:09:16 +08:00
Dash
79ffdcd97c fix(mobile): 修复 Xcode 27 启动并校验原生包兼容性 (#4689)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-09-18 22:33:16 +07:00
Dash
9018f7c47a fix(mobile): 统一模拟器启动身份校验并保留依赖现场 (#4599)
* fix(mobile): 统一模拟器启动身份校验并保留依赖现场

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

* fix(mobile): 复用模拟器 UDID 参数解析并修正文档示例

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-09-17 17:01:22 +07:00
Dash
183c102943 merge: 同步 main 并保留远程桌面改动
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-09-09 14:29:28 +10:00
DavidShen
e232909f44 fix(mobile): track Metro environment fingerprint
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 04:06:18 +08:00
DavidShen
b00f836cce fix(mobile): 校验首次听写选区与 Metro 区域
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 03:41:59 +08:00
DavidShen
3f5278477d fix(mobile): 加强 Android SDK 与 Metro 构建门禁
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 03:41:58 +08:00
DavidShen
42d71812da fix(mobile): 处理停止听写选区事件与 Windows Metro 路径
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 03:41:58 +08:00
DavidShen
b3a5e0e9d6 fix(mobile): 按用户操作保留听写最终选区并校验 SDK 路径
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 03:41:56 +08:00
DavidShen
176555ecef fix(mobile): 保留停止听写后的用户选区
Signed-off-by: DavidShen <david@xd.com>
2026-09-09 03:41:55 +08:00
Dash
2c26b914b9 feat(remote-desktop): 支持手机远程查看与操作电脑桌面
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-09-07 23:26:17 +10:00
DavidShen
b6f8226f3e fix(ci): 修复 Linux 单测跨平台回归
Signed-off-by: DavidShen <david@xd.com>
2026-08-31 16:08:30 +08:00
DavidShen
a146eb5041 fix(dev): 修复 Windows 移动端调试与测试门禁
Signed-off-by: DavidShen <david@xd.com>
2026-08-31 14:54:34 +08:00
bobo
26c7215c8f build(mobile): add global Android AAB artifact (#3435)
* build(mobile): add global Android AAB artifact

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(mobile): pin Android upload certificate

Signed-off-by: xd-bobo <caojianbo@xd.com>

---------

Signed-off-by: xd-bobo <caojianbo@xd.com>
2026-08-26 14:13:48 +08:00
Dash
09634e456b fix(mobile): 让 --takeover 能清掉孤儿 Metro 和脏 worktree (#3235)
--takeover 原先要求对方 worktree 的磁盘指纹仍等于 Metro 启动时的
注入值。目录已删或启动后改过文件时会误拒,8081 被占死。确认是
Cindy Metro 后即可接管;未知进程仍然 fail closed。

Signed-off-by: Dash <dashhuang@gmail.com>
2026-08-22 18:46:53 +08:00
Dash
2f86c0402a feat(mobile): add safe simulator Metro handoff
Signed-off-by: Dash <dashhuang@gmail.com>
2026-08-17 13:02:13 +12:00
JiangJiahao
5bea657deb fix(ios-simulator): validate mobile launch on exact device
Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
2026-08-08 16:35:05 +08:00
bobo
12c216d426 feat(auth): route organization sign-in by auth region (#748)
* feat(auth): route organization sign-in by auth region

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(auth): confirm organization realm switches after discovery

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(auth): address final realm routing review

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(auth): close final realm review gaps

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(auth): reconnect desktop clients on realm change

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(auth): keep deferred retries in the correct realm

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(auth): bind pending push revocation to its realm

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(mobile): cancel stale push opt-out sync

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(auth): authenticate realm-bound push revocation

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(auth): keep cross-realm transitions client-side

Signed-off-by: xd-bobo <caojianbo@xd.com>

* fix(mobile): reject stale realm activation

Signed-off-by: xd-bobo <caojianbo@xd.com>

---------

Signed-off-by: xd-bobo <caojianbo@xd.com>
2026-07-28 20:32:59 +08:00
Dash
6ca0cfc0a6 feat(region): 将 Global 设为默认区域 (#475)
* feat: 将 Global 设为默认区域

Signed-off-by: Dash <dashhuang@gmail.com>

* fix(region): 让本地入口与测试显式使用区域

Signed-off-by: Dash <dashhuang@gmail.com>

* fix(region): 同步本地构建身份并改进清单错误

Signed-off-by: Dash <dashhuang@gmail.com>

---------

Signed-off-by: Dash <dashhuang@gmail.com>
2026-07-26 09:21:10 +08:00
Lizi
611550403a fix(mobile): 纯构建脚本跟进——selfhost 必填自查、dry-run 纯本地、烘焙 env 透明、iOS exportMethod (#242)
* Migrated from makecindy/cindy-temp#598

Transplanted onto the open-source root; diff identical to the original PR.

* fix(mobile): add spaces in selfhost validation error messages

Improve readability of error messages by adding spaces after colons
and between list items and parenthetical explanations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(mobile): rename missingSelfhostBakeFields → missingSelfHostBakeFields

Align casing with existing SelfHost naming convention in the module
(resolveSelfHostRegion, formatSelfHostReleaseCommand, etc.).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-07-24 10:51:16 +08:00
Lizi
bb3f71d084 chore: Cindy 首次开源提交 / initial open-source release
Cindy 是心动网络 (X.D. Network Inc.) 的跨端 AI Agent 客户端。
本次提交包含 Desktop(Electron)、Mobile(Expo)及全部共享 packages
的完整源码,以 Apache-2.0 协议开源。

This is the first public release of Cindy, X.D. Network's cross-platform
AI agent client: the Electron desktop app, the Expo mobile app, and all
shared workspace packages, licensed under Apache-2.0.

- 许可与合规:根 LICENSE(Apache-2.0)+ NOTICE;第三方组件归属声明与
  SPDX SBOM 收口在 docs/legal/notices/,由 pnpm licenses:generate 生成。
- 社区文件:README / CONTRIBUTING / CODE_OF_CONDUCT / SECURITY / SUPPORT
  中英双语;issue / PR 模板与 CI workflow 在 .github/。
- 协议层以公开 submodule 引入:github.com/makecindy/cindy-protocol。
- 提交前已通过仓库门禁:全量 pnpm test:unit 与涉及 package 的 typecheck。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 08:30:44 +08:00