Commit Graph

78 Commits

Author SHA1 Message Date
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
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
Lizi
e98940c6d8 Merge pull request #8255 from makecindy/dash/iphone-widget-account-picker
feat(quota): 订阅余量小组件可设排在前面与隐藏的账号,液面加圆角
2026-11-02 10:17:41 +09: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
Lizi
03cdc568b4 Merge pull request #8219 from makecindy/dash/android-usage-widgets
feat(mobile): Android 桌面小组件(订阅余量、每日用量)
2026-11-01 00:13:59 +09:00
Dash
8dfbf5fb26 docs: 小组件账号匹配规则改为按图标与名字认账号
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 02:47:55 +13:00
Dash
836bc95ef7 feat(mobile): Android 订阅余量组件可设排在前面与隐藏的账号,液面加圆角
- 设置页(添加时与启动器的重新配置)新增「排在前面的账号」(最多 7 个,可上移、下移、移除)与「隐藏的账号」,
  与 iOS 编辑页、Mac 菜单栏设置同一规则:其余账号(含以后新加的)按电脑顺序跟在后面,全部隐藏时显示全部。
- 选择按组件存在 SharedPreferences,用与 iOS 相同的 AccountKey 字符串;按 id 找不到时按同一图标与名字匹配。
- 小号与单行版式只对其余账号做「订阅优先」,排在前面的照原样显示;「每日用量」仍只选电脑。
- 液面顶角改为 4dp 圆角(液面很低时按高度缩小),与 iOS 一致;重新生成订阅余量的选择器预览图。
- 设置页文案补齐 10 种语言;mobile-development.md 登记规则。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 02:13:28 +13:00
Dash
8339ba40ce fix(mobile): Android 组件处理 review:空值字段、文字缩放、后台重绘、按尺寸绘制
- 可空字符串字段按 JSON null 处理,不再显示成 "null"
- fitText 先取原行高再缩放,缩小后的字号不再被复位
- writeSnapshot / clearSnapshot 的重绘改到后台单线程,合并请求,JS 线程不等位图
- Android 12+ 按启动器给出的每个候选尺寸各绘一份,折叠屏 / 横竖屏不再拉伸同一张图
- 一行高度只在宽度 ≥ 250dp 时用单行版式,更窄的一行沿用缩小的小号版式(4 个来源仍可见)

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 02:13:28 +13:00
Dash
a39644bc2a feat(mobile): Android 组件支持一行高度,新增单行版式
最小可缩到 40dp 高;宽而扁的格子用单行版式:订阅余量是短液柱加数字、名称、重置时间,
每日用量是今日数字加迷你柱图。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 02:13:28 +13:00
Dash
781c5dce6f feat(mobile): Android 桌面小组件(订阅余量、每日用量)
- cindy-usage-widgets 模块新增 Android 实现:两个 AppWidgetProvider、数据来源选择页、与 iOS 同名的原生接口
- 组件按启动器格子的实际尺寸把版式直接画成位图,小/中/大版式、液柱、圆环、日用量柱与月卡片与 iOS 一致
- 浅/深两套同时下发,由 layout 与 layout-night 选择,系统切换主题不需要重绘
- 数据来源可选自动或某台电脑;快照存应用私有 noBackupFilesDir,不进自动备份
- UsageWidgetBridge 在 Android 上同样喂数据;文案表由 iOS 表转出并补数据来源页,10 种语言
- 同步 mobile-development / credentials-and-local-storage / protocol-compatibility / repo-map

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 02:13:27 +13:00
Dash
c2bf9eda8b feat(quota): 订阅余量小组件可设排在前面与隐藏的账号,液面加圆角
- iPhone「订阅余量」编辑页新增「排在前面的账号」(小/中/大最多 4/6/7 个,可拖动、删除)与「隐藏的账号」;
  其余账号(含以后新加的)按电脑顺序跟在后面,全部隐藏时显示全部,与 Mac 菜单栏设置同一思路。
- 所选账号存为 id + 图标 + 名字:各电脑给同一订阅的 id 不同时按图标与名字找回;重复选择只显示一次。
- 小号版式只对其余账号做「订阅优先」,排在前面的照原样显示。
- iPhone 小组件与 Mac 菜单栏面板的液面顶角改为 4pt 圆角(液面很低时按高度缩小),Mac 液面晃动时圆角跟着波形。
- 编辑页文案补齐 10 种语言;DESIGN.md 与 mobile-development.md 登记规则。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 02:11:17 +13:00
Dash
a6a80287a6 docs(mobile): make the repo the only simulator test workflow
Move the generic rules that only lived in a personal simulator skill into
the simulator guide: what a test request authorizes and excludes, how the
target worktree and device are chosen, how to use Cindy's simulator plugin,
and what a delivery must report. Personal setup now keeps only private
preferences such as the usual device and simulator backend.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-01 01:52:53 +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
Dash
33e0ecc483 feat(quota): standalone quota overview, offline computers, widget data source
- Move collection, caches and rebuild cadence out of the macOS menu bar panel into
  quota-overview/service.ts; the panel holds it, phone requests lease it, so any
  platform answers the widgets whether or not a panel runs.
- Keep an unreachable computer's accounts with their last reading for up to 3 days,
  marked with their age and never recommended; retry failed remote reads after 1 min.
- Store each computer's widget state in the App Group; widgets pick a data source
  (automatic = the computer that answered last, or a specific computer).

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-31 18:19:49 +13:00
Dash
985214bc11 feat(mobile): iPhone 桌面小组件(订阅余量、每日用量)
新增 WidgetKit 扩展 CindyHomeWidgets,照 Mac 菜单栏面板的试管、数字字体与配色绘制
订阅余量与每日用量两种组件(小 / 中 / 大)。Desktop 新增只读通道
device-link:usage-widget:snapshot:v1,投影菜单栏面板已构建的视图;手机 App 在前台
时读取快照写入 App Group 并刷新组件,切换或退出账号时清空。

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-31 18:19:48 +13:00
Lizi
4dd44255e8 Merge pull request #7814 from makecindy/dash/mobile-sim-preflight
fix(mobile): 提前检查模拟器构建工具并改善诊断流程
2026-10-29 21:07:11 +08:00
Dash
c414c879fd fix(mobile): 提前检查模拟器构建工具并改善诊断流程
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-29 21:28:12 +13:00
Dash
d74e4de592 docs(mobile): 取消冷更 PR 强制草稿流程
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-28 17:16:05 +13:00
DavidShen
d8113792fe fix(mobile): invalidate queued editor changes when restoring drafts
Signed-off-by: DavidShen <david@xd.com>
2026-10-28 09:56:08 +08:00
DavidShen
e28cd2dfaf fix(mobile): preserve composing text when sending messages
Signed-off-by: DavidShen <david@xd.com>
2026-10-27 21:26:22 +08:00
MagicLizi
baaaa406c7 Revert "Merge pull request #7123 from zqchris/cindy/merry-leakey"
This reverts commit 56e2fdf2aa, reversing
changes made to 206b24ccc8.

Conflict resolution:
- apps/mobile/src/session/BotGroupChatScreen.tsx: restore the pre-#7123
  timeline and offline note, and keep 5fd7c38ec1 (pending sends with
  retry/cancel, delayed offline notice, queue-aware composer) ported onto
  the pre-#7123 structure without AnimatedContentHeight or
  useMessageEntrances. Pending rows keep the stable `local:<clientId>` key
  for CompanionEntering so a confirmed send does not animate twice.
- docs/design-rules/design-inventory.md: regenerated from sources.

Signed-off-by: MagicLizi <jiali@magiclizi.com>
2026-10-26 22:20:30 +08:00
Chris
b3c1e1f13c fix(chat): coordinate continuous message layout and keyboard scrolling
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-25 17:07:17 +08:00
Lizi
784e8c477e Merge pull request #7046 from zqchris/cindy/swift-curie
feat(chat): connect cross-platform notifications and message responses
2026-10-25 07:53:10 +08:00
Dash
963b3f1e73 fix(mobile): 隔离构建环境并减少任务更新引发的重复渲染
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-25 10:34:57 +13:00
Chris
1be2cb1f10 feat(chat): connect cross-platform notifications and message responses
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-24 17:57:26 +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
Lizi
53705e7ece Merge pull request #6977 from makecindy/dash/android-wifi-auto-update
feat(mobile): 安卓在 Wi-Fi 自动下载更新并清理旧安装包
2026-10-23 22:12:46 +08:00
Dash
c6f8520473 fix(mobile): 区分更新卡的稍后与取消操作
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-24 01:32:18 +13:00
Dash
0fec066183 fix(mobile): 保护安装器副本并取消旧通道更新任务
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-24 01:29:14 +13:00
Dash
101b404a2a feat(mobile): 安卓在 Wi-Fi 自动下载更新并清理旧安装包
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-24 01:29:14 +13:00
Dash
75089bf711 refactor: organize session workflow boundaries and developer guidance
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-24 01:20:13 +13:00
Chris
cadbf7e13d fix(mobile): recover cold notification task entry after connection startup
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-21 23:31:41 +08:00
Chris Zhang
bdcd37d4c6 fix(mobile): resume interrupted Android update downloads (#6600)
Signed-off-by: Chris <4436110+zqchris@users.noreply.github.com>
Co-authored-by: Chris <4436110+zqchris@users.noreply.github.com>
2026-10-21 02:09:05 +08: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
Lizi
aca5fbdead Merge pull request #6317 from makecindy/dash/mobile-cached-pending-messages
fix(mobile): 修复老任务缓存消息仍显示发送中
2026-10-17 17:34:11 +08:00
Dash
099acc4be0 fix(mobile): 优先用历史缓存结束旧消息发送等待
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 21:07:33 +13:00
Dash
81de6007bd fix(mobile): 原图就绪后立即更新上传中预览
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 20:48:28 +13:00
Dash
d50cfbc5dc Merge remote-tracking branch 'origin/main' into dash/mobile-optimistic-creation
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 18:41:41 +13:00
Dash
f78b8aa301 fix(mobile): preserve input entered during draft recovery
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 18:41:19 +13:00
Dash
99f8cc1b9e fix(mobile): 隔离留图账号并拒绝已取消上传的迟到缓存
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 17:14:46 +13:00
Dash
42dde81a27 fix(media): 保留手机和桌面已发送图片的离线缓存
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 16:55:03 +13:00
Dash
b2e6369f8e fix(mobile): 统一失败创建草稿的恢复与编辑判据
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 16:41:52 +13:00
Dash
43d34dc656 fix(mobile): 等待恢复草稿编辑结算并回收超限上传
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 16:14:41 +13:00
Dash
900593bcc6 fix(mobile): 底部活动提示保留位置,发送后不再跳动
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 15:56:48 +13:00
Dash
3442e5ea39 fix(mobile): 同步删除恢复草稿中的文字和附件
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 15:49:38 +13:00
Dash
79893e46f1 fix(mobile): 创建失败时带回已排队的后续消息
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 15:35:24 +13:00
Dash
6ff6a08326 fix(mobile): 补齐选择器恢复提示并同步主干附件流程
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 13:00:44 +13:00
Dash
91634b5552 fix(mobile): 选图后立即预览并后台读取 iCloud 照片 (#6242)
* fix(mobile): 选图确认后立即预览并后台读取 iCloud 原图

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

* fix(mobile): 本地化原生选图与原图读取错误

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

---------

Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 07:48:57 +08:00
Dash
18d14a3826 fix(mobile): 自动恢复时保留当前输入并避开新附件输入
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 12:33:07 +13:00
Dash
b52bd0eff6 fix(mobile): 恢复新建任务乐观交互并清理失败恢复残留
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-10-17 12:10:52 +13:00