feat(snapshot): collapse the iOS keyboard into one line in text snapshots
Summary
With the iOS software keyboard up, text snapshots listed every key, the QuickType bar, and the dock buttons: 17 app lines became 68. keyboardEnter is now a conditional operation of the snapshot uses. The daemon stamps keyboardEnterServed on the response only when the bound runtime carries it. formatSnapshotText collapses only on that fact: it drops what the existing keyboard chrome classifier strips from settle diffs, keeps the [keyboard] line, and prints one notice. Devices without Return (cloud WebDriver iOS, Revyl iOS, tvOS) keep every key. JSON, raw, and diff output are unchanged; CLI --json strips the fact.
Before / after
iPhone 17 Simulator, iOS 27.0, SwiftUI sign-in demo, press id="email", measured at 5f0e5d6 (base 89e65e9):
| Call | base | head |
|---|---|---|
snapshot -i | 68 lines, 1,633 chars (408 tok) | 20 lines, 722 chars (181 tok) |
snapshot | 2,259 chars (565 tok) | 1,031 chars (258 tok) |
| sign-in flow (MCP), 5 runs, median | 790 tok | 577 tok |
| batched flow, median | 566 tok | 353 tok |
Head adds Collapsed 49 iOS keyboard nodes (keyboard covers y 590-874); keyboard enter sends Return. Snapshot JSON lists every keyboard key.
Unchanged on both: keyboard status reports visible with return key enter; keyboard enter dismisses the keyboard; snapshot -i --json keeps 68 nodes, 40 Key.
Validation
At 5f0e5d6: snapshot-ios-keyboard.test.ts (fact present collapses; fact absent and a WebDriver iOS response keep Return; exact raw lines; --json strips the fact) and snapshot-chrome.test.ts (reparenting) pass. Other gates: CI.
š¤ Generated with Claude Code