iOS: hinge control and fold state for leased iPhone Duo simulators

Đang mở
#1,686 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ios, typescript
Lĩnh vực
backend, mobile

Hướng nghiên cứu

Start by reading the input socket handling for hinge control (0x10) and the existing fold support through agent-device described in the issue, along with related issues #1013, #1019, #1531, and #1534. Trace how stream size changes reach clients and where input and stream metadata are defined. Done means leased iOS Duo simulators accept hinge control and report hinge support, pose or angle, and active screen to clients.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

request:new
The problem

A client that shows a leased iPhone Duo can't control its hinge, and can't tell which pose it is in.

  • Hinge control isn't implemented. The input socket answers hinge control (0x10) with {ok:false} on every platform (#1013), and #1019 left "Duo devices and their hinge" out of scope.
  • Folding works, but only through agent-device. agent-device fold open | closed | half-open works through the agent-device front, and since #1531/#1534 the stream follows the panel in use and changes size on a fold.
  • The stream reports only the picture's size. It doesn't say that the device is foldable, its pose or hinge angle, or which screen is in use.

As a result, T3 Code's Device panel turns its iPhone Duo 3D view off for pool devices, and draws the unfolded inner panel (720×506) into a portrait frame, squeezed about 2× (pingdotgg/t3code#38343). T3 Code's own device hub gives it these fields for local simulators: supportsHingeAngle, hingeAngle (0 to 180), hingePose (closed, book, open, laptop, tent) and screenId.

Who runs into this

A developer building an app for the iPhone 18 Pro and the iPhone Duo. A Mac mini M1 runs Simlock 0.8.0 (gateway and worker side by side, with one slim iPhone 18 Pro and one slim iPhone Duo kept warm). A T3 Code environment on another Mac leases from it over Tailscale, and builds and serves the app (Metro) from there. Agents drive the devices with agent-device. People review the UI in T3 Code's Device panel, which is where folding by hand and seeing the true unfolded shape matter.

What you would like to happen
  1. Hinge control on iOS foldable simulators. 0x10 sets the pose or hinge angle on a leased iPhone Duo and answers {ok:true}, as agent-device fold already can.

  2. Fold state reported to stream and input clients:

    • that the device supports a hinge;
    • its current pose or angle;
    • which screen is in use.

    This would ride beside the existing mid-stream size change, so a client can draw the right frame and its own fold controls.

  3. Optionally, a flag on the lease or device saying it is foldable, so a client knows before the stream opens.

Anything else
  • Versions: Simlock 0.8.0, agent-device 0.21.36, Xcode 27.2 (27B52), runtime iOS-27-2-iPhone19-4 (24B91016s), macOS 27.0.1 on the worker.
  • Today's workaround: fold with agent-device fold from the agent's machine. For a person to fold by hand, or for a 3D view, use a local Duo outside Simlock.
  • Related: #1013, #1019, #1531, #1534, #1559, #1539 (orientation on an iPhone Duo through the agent-device front).
Ngôn ngữ chính
TypeScript
Star
705
Fork
40
Merge trung bình
12 giờ 9 phút
Pull request đã merge (30 ngày)
376

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstackincubator/simlock

Tất cả issue của callstackincubator/simlock

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.