Skip to content
C.W.K.
Stream
Lesson 05 of 05 · published

One Universal App

~11 min · universal, iphone, ipad, lease, size-class

Level 0Spark
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Two Glasses, One Contract

Smolder on iPhone and iPad is one universal app, not two products with two leases. Same gateway, same spectator default, same daemon identity, same ember in the chrome. Size class changes how many sessions you can see, not who owns the keyboard. iPhone focuses one session. iPad may show two. Input ownership is still singular. Two apps would be two places to get the lease wrong, two TestFlight trains, two pins, two ways for a hangup to mean kill on one glass and detach on the other.

Universal is not a marketing word here. It is a refusal to let iPad become "the real pocket terminal" while iPhone becomes a viewer with a looser brain. The working contract is continue-host-work on both. Watch, take control, open a shell through the host. An iPad that silently takes control because it has a hardware keyboard is still a silent pick, just with more keys. An iPhone that cannot take control because it is "only a viewer" is a second product. Both fail the one-contract test.

Two Visible Is Not Two Writers

An iPad can put two host sessions on screen. That is a projection luxury. It is not a license for two input leases at once. The focused session, if you have taken control of it, is the writer. The other is a spectator even though it is large and beside you. Tapping the other session does not steal the lease; taking control does, explicitly, and then the first session becomes read-only. The Mac already taught this with two windows. The iPad is two windows on one glass, not a new ownership model.

A hardware keyboard on iPad makes the steal feel easy. Easy is the danger. Keystrokes have to know which session holds the lease, and if none does, they have to go nowhere — not into whichever pane the cursor last painted. A cursor without a lease is decoration. Typing into decoration is how you submit into a session you thought you were only watching.

One Keyboard Owner, Always

iPhone, one session visible: still a spectator until Take Control. The smallness of the glass is not an argument for auto-control. iPad, two sessions visible: still a spectator until Take Control on exactly one. Rotation, split view, Stage Manager — those change how many rectangles you can see. They do not mint leases. If a size-class callback ever acquires a lease, observation has resized the ownership model, which is worse than resizing a PTY.

Delivery stays one binary through TestFlight. Track 7 will insist on that pipeline. This lesson insists on why: one contract cannot survive two apps that drift. The destination track's later milestones — checkpoints, direct SSH, keys — are still one app's milestones, not an iPad-only SSH client and an iPhone-only viewer. Mix those and you have taught a family that the pocket is two products. It is not. It is one fire, two sizes of glass, one owner of the keys when keys exist, one owner of the keyboard today.

One universal app. Size class changes how many sessions you can see, not who owns the keyboard. iPhone shows one, iPad may show two, input is still singular. Two apps would be two places to get the lease wrong.

Code

Size class is visibility, not ownership·text
iPhone compact     ->  one session visible
iPad regular       ->  one or two sessions visible
both               ->  spectator default
both               ->  at most ONE input lease in the daemon
both               ->  same gateway, same pin, same ember

# Hardware keyboard on iPad
  keystrokes -> the session that HOLDS the lease
  if no lease -> nowhere (cursor is decoration)
  tap other session -> focus for viewing, not a silent take-control

# Forbidden splits of the product
  "iPhone is viewer, iPad is terminal"
  "iPad auto-takes control because it has a keyboard"
  "size-class callback acquires the lease"
  two bundle identities, two TestFlight trains, two pins

External links

Exercise

Draw iPhone (one session) and iPad (two sessions) side by side. Mark, on each glass, who is spectator and who would be controller after an explicit Take Control of the left session. Then write what a hardware-keyboard character does on the iPad if nobody has taken control. If your answer is "it types into the focused pane anyway," the lease has already split by size class.
Hint
Two visible panes can still be zero writers. Focus for viewing is not focus for input. The daemon serializes the latter.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.