Repository navigation
Commit 28f1c31
committed
Clip the inspector to the device; guard the page against our own controls
Two things the inspector got wrong on a scrollable screen. Native frames
routinely extend past the display — a horizontally scrollable chip row,
list content below the fold — and the overlay drew them unclipped, so
boxes floated in the black beside the device describing elements nobody
could point at. The overlay now clips to the device and its corners, and
nodes lying wholly off-screen are skipped rather than drawn.
The guard is the more important half. The device page is a test target,
so it must contain nothing but the device: any control of ours living
there would appear in an agent's snapshot beside the app's own elements,
indistinguishable from them, and an agent told to tap a button could
drive DeviceDeck instead of the app under test. Checked by pointing
playwright-mcp at the page — every ref it minted was an app element, the
only non-app node being the mirror root — and the test now fails if a
button, input, link or select ever appears there. Our controls belong on
the console, which is a surface for people.1 parent f4e77cd commit 28f1c31
3 files changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
505 | 509 | | |
506 | 510 | | |
507 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
0 commit comments