Commit Graph

129 Commits

Author SHA1 Message Date
Lizi
d397266308 Merge pull request #9547 from makecindy/feat/mobile-task-badge-counts
feat(mobile): 用账号汇总与后台推送显示任务数字角标
2026-11-12 19:43:03 +08:00
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
Lizi
44637a5a9e Merge pull request #9847 from makecindy/cindy/earnest-hawking
fix(permissions): 简化跨端权限选择与说明
2026-11-11 11:57:53 +08:00
Dash
dfe5bf738f fix(permissions): 简化跨端权限选择与说明
统一使用中性色和打开的锁图标,直接显示各档位说明及 AI 审批等待提示。用户选择完全访问后直接生效,手机收起时保留纯图标。修复本地模拟器构建的 Agent-Net 架构选择。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-11 14:23:28 +13:00
Dash
eed830cc3c fix(mobile): 保留锁屏实时活动内容并改善过期恢复
Preserve confirmed activity content across background suspension, use state-aware freshness windows, and recover stale push registrations in foreground without replacing server-owned aggregates.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-11 13:49:05 +13:00
Cindy
de965738ec merge: 同步主干 Agent Net 推送接入
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Cindy <cindy@Cindys-Mac-mini.local>
2026-11-11 08:50:18 +13:00
Cindy
9f7e6e09a6 test(feedback): 对齐手机反馈范围与交互回归夹具
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Cindy <cindy@Cindys-Mac-mini.local>
2026-11-11 07:17:43 +13:00
Cindy
8f026411a4 merge: 同步主干并保留角标与 Android 推送降级
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Cindy <cindy@Cindys-Mac-mini.local>
2026-11-11 01:59:33 +13:00
DavidShen
ae0c959fe1 fix(mobile): 修复 Windows Android 原生构建长路径
Windows 模拟器构建恢复 CMake 平台路径缩短,并为 app 代码生成选择较短的独立 staging 缓存。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: DavidShen <david@xd.com>
2026-11-10 13:53:31 +08:00
Cindy
cdb9767e6b feat(mobile): 从账号汇总与后台推送同步任务角标
Replace partial Home counting with the shared versioned task-activity API and push summary. Add native Android badge-only handling and installation capability registration.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Cindy <cindy@Cindys-Mac-mini.local>
2026-11-10 04:30:45 +13:00
Dash
6e05a48a0c fix(mobile): 使用桌面 Cindy 角色作为灵动岛形象
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-10 03:37:29 +13:00
Dash
7c6ce0f40b feat(mobile): 添加复用桌面美术的 iPhone 任务灵动岛
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-10 00:25: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
350f112a45 fix(mobile): clean up Metro log and owner record on Ctrl-C
sim-start now handles SIGINT/SIGTERM/SIGHUP by forwarding them to Metro, so
the launcher stays alive for Metro's exit callback instead of dying first.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 21:11:51 +13:00
Dash
9230ae0d66 fix(mobile): treat a Metro log that vanishes mid-check as inconclusive
Read the log directly instead of checking existence first; a failed read now
reports unknown rather than throwing.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:59:56 +13: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
d115916e19 fix(mobile): stop the whole Metro tree when the owner record cannot be written
On Windows the spawned child is only the pnpm/cmd wrapper. Reuse the
tree-aware terminateMetro path and wait for it before exiting.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:34:28 +13:00
Dash
5b8e0f5b2d fix(mobile): narrow the no-listener allowlist and stop Metro when ownership cannot be recorded
Only the three observed missing-listener events are known warnings. sim-start
registers log cleanup before writing the owner record, and stops Metro and
removes its log when that write fails.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 20:22:36 +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
91548d8a57 fix(mobile): only allowlist the reconnecting relay drop among device-link warnings
Request timeouts, dropped frames and handler failures stay new warnings so
logcheck reports device-link regressions.

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-03 19:20:44 +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
Chris
dc420ea380 Merge upstream/main and regenerate attachment design inventory
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-11-02 01:44:37 +08:00
Chris
e43f81a01d Merge current main to unblock share PR checks
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-11-01 23:30:08 +08:00
Chris
9122c27dc7 feat(preview): unify attachment viewing across desktop and mobile
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-11-01 22:23:10 +08: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
fa0f5fef41 fix(mobile): 修复 Windows 测试路径并让 build-ios prebuild 也使用补全的 PATH
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 12:08:49 +13:00
Dash
3ab35fcd9d fix(mobile): 自动使用用户 gem 目录中的 CocoaPods
iOS 构建脚本只在 PATH 里找 pod。Agent 子进程的 PATH 通常不含
Gem.user_dir/bin,已安装的 CocoaPods 因此被报成 pod=missing,任务反复
要求安装 Homebrew。

PATH 找不到 pod 时只读查询用户 gem 目录,命中后追加到本次进程 PATH 末尾,
不遮蔽已有命令;PATH 上已有但运行失败的 pod 仍如实报告。同步修正错误提示
和环境文档。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 11:20:19 +13:00
Dash
68a43f429e docs(mobile): document parallel simulators via RCT_jsLocation
The simulator guide claimed the iOS debug app only ever loads Metro on 8081,
so agents concluded two worktrees could not run on two simulators at once.
React Native first reads the per-device RCT_jsLocation default and only
falls back to 8081 when that Metro does not answer.

Document how the app picks Metro, the two silent fallbacks, the parallel
device recipe (rebuild --udid, start --port, point the device, verify with
whoami --udid --port and the build label, clean up), and what is still
unverified on Android. Align the dev rules and sim-start comments.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 01:47:24 +13:00
Chris
026fe68958 fix(mobile): restore share-to-new-task routing and simplify destination UI
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-31 15:39:17 +08:00
Chris
8b23537fb3 Merge upstream main for current mobile share verification
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-31 15:06:22 +08: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
189ef0678e fix(mobile): 透传 Metro 进程身份探测错误
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-29 21:28:15 +13:00
Dash
c414c879fd fix(mobile): 提前检查模拟器构建工具并改善诊断流程
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-29 21:28:12 +13:00
Chris
3df040edc7 fix(mobile): keep incoming shares from hijacking navigation
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-27 21:43:42 +08: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
Chris
64155643b5 fix(mobile): decode shared file URL data and raw image types
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-21 11:54:21 +08:00
Chris
3e1ffa0c0d fix(mobile): classify shared file URLs from original content
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-21 11:17:42 +08:00
Chris
993df6e576 fix(mobile): persist unreadable share fences and retain image exports
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-21 01:42:01 +08:00
Chris
85407a84c1 fix(mobile): retry share rejection cleanup and preserve property lists
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-21 01:22:16 +08:00
Chris
4b5f9d8679 fix(mobile): retain shared URLs and track native share resources
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-21 01:01:39 +08:00
Chris
aab48b5454 fix(mobile): fence shared content and preserve original exports
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-21 00:23:53 +08:00