Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ What changed in each release, one line per change. Versions follow [Semantic Ver
- An idle `iphone-control mcp` (kept running by Claude Desktop, Cursor, Claude Code…) no longer keeps updates from installing: it holds the maintenance lock only during a tool call, and its next call reaches the new daemon.
- The phone's own video on the control page pauses while the phone unlocks itself or the bitrate changes, instead of dropping and reconnecting.

### Improvements

- On iOS 17–26 the control page's picture comes through the daemon instead of the viewer opening WebDriverAgent's picture port on the phone itself; apart from `wda-bridge`, only the daemon talks to the phone now.

## [0.2.14] - 2026-11-24

### New
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
- 空闲的 `iphone-control mcp`(Claude Desktop、Cursor、Claude Code 等一直开着)不再挡住更新安装:它只在工具调用期间占用维护锁,升级后下一次调用自动连上新的守护进程。
- 手机自动解锁或码率切换时,控制台里的手机原生画面只是暂停,不再断开重连。

### 改进

- iOS 17–26 上控制台的画面改经守护进程取,viewer 不再自己连手机上 WebDriverAgent 的画面端口;除了 `wda-bridge`,现在只有守护进程和手机打交道。

## [0.2.14] - 2026-11-24

### 新功能
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ cargo test --workspace --all-features --locked
# Linux/macOS PTY regression; temporary settings only, no daemon or device actions
python3 tests/terminal.py --binary target/debug/iphone-control --test-dir target/debug/deps
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
# the control page's tests (Node 22, no packages): the page is apps/iphone-control/web/, put together by build.rs
node --test tests/viewer/*.test.mjs
# vendor/ is upstream code and isn't formatted; check only this repository's packages:
for p in ictl-l10n ictl-webinspector ictl-device ictl-wda ictl-sign ictl-unlock ictl-daemon ictl-mcp ictl-protocol iphone-control; do cargo fmt -p $p -- --check; done
```
Expand Down
2 changes: 1 addition & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Web 控制台设计规范

桌面从左到右排列 AI 助手、设备画面、设备面板。窄窗口用抽屉或标签切换。接入新控件时沿用这套结构,优先把可用空间留给设备画面。[页面实现](apps/iphone-control/src/viewer.html)
桌面从左到右排列 AI 助手、设备画面、设备面板。窄窗口用抽屉或标签切换。接入新控件时沿用这套结构,优先把可用空间留给设备画面。[页面实现](apps/iphone-control/web/)

## 输入与排版

Expand Down
28 changes: 28 additions & 0 deletions apps/iphone-control/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//! Puts the control page together: `web/index.html` with each `@include <path>` line replaced by that file (the
//! stylesheet, then the scripts in order), written to `$OUT_DIR/viewer.html`, which `viewer.rs` embeds. The scripts
//! share one scope, as they did in the single file, so the order in `index.html` is the order they run in. No other
//! tool is needed (tests/viewer/page.mjs does the same for the page tests).

use std::path::Path;

fn main() {
let web = Path::new("web");
let index = web.join("index.html");
println!("cargo:rerun-if-changed={}", index.display());
let text = std::fs::read_to_string(&index).unwrap_or_else(|e| panic!("{}: {e}", index.display()));
let mut page = String::with_capacity(256 * 1024);
for line in text.split_inclusive('\n') {
let Some(rel) = line.strip_prefix("@include ") else {
page.push_str(line);
continue;
};
let part = web.join(rel.trim());
println!("cargo:rerun-if-changed={}", part.display());
let body = std::fs::read_to_string(&part).unwrap_or_else(|e| panic!("{}: {e}", part.display()));
assert!(body.ends_with('\n'), "{} must end with a line break", part.display());
assert!(!body.lines().any(|l| l.starts_with("@include ")), "{}: includes don't nest", part.display());
page.push_str(&body);
}
let out = Path::new(&std::env::var_os("OUT_DIR").expect("OUT_DIR")).join("viewer.html");
std::fs::write(&out, page).unwrap_or_else(|e| panic!("{}: {e}", out.display()));
}
2 changes: 1 addition & 1 deletion apps/iphone-control/src/video/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ mod tests {
(Instant::now(), phone)
});

// the page, over a real TCP connection, reporting what it read every 100 ms like viewer.html
// the page, over a real TCP connection, reporting what it read every 100 ms like the control page
let l = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
let mut page = tokio::net::TcpStream::connect(l.local_addr().unwrap()).await.unwrap();
let (server_side, _) = l.accept().await.unwrap();
Expand Down
Loading
Loading