feat(snapshot): collapse the Android input method window into one line in text snapshots
Summary
Android follow-up to #5189. The helper builder marks every TYPE_INPUT_METHOD window node with inputMethodWindow: true and keyboardOwned: true, so it works for any keyboard and never reaches system bars or app windows. Text snapshot folds only inputMethodWindow nodes (hosted app controls stay), and only when the device serves keyboard enter and keyboard dismiss: the daemon stamps keyboardDismissServed next to keyboardEnterServed, and CLI --json strips both. --json, --raw and diff keep every node. Through keyboardOwned, audit snapshot treats keyboard nodes as system controls and the tap guard treats taps on any keyboard app as keyboard taps. iOS is unchanged.
Before / after
Real captures on an API 35 emulator (open --no-test-ime, Gboard up, Settings search). Tokens are characters / 4. Each row compares the same capture with the facts present and absent.
| call | base | head |
|---|---|---|
snapshot -i, empty search | 385 | 166 |
snapshot -i, "wifi" results | 498 | 296 |
snapshot, empty search | 1903 | 282 |
Collapsed 53 Android keyboard nodes (keyboard covers y 1517-2400); keyboard enter sends Return and keyboard dismiss hides the keyboard. Snapshot JSON lists every keyboard key.
@e55 [button] "Back"
@e56 [text-field] "Search settings" [focused] [editable]
Validation
- Live capture (897d6bd): all 130 input-method nodes stamped; 4 status bar and 21 app nodes not.
- CI green.
- Emulators default to the headless test IME, so the collapse shows on real devices and with
--no-test-ime.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.