@rootnative/loupe 0.0.0-alpha.1 → 0.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -1
- package/README.md +16 -3
- package/dist/bin.js +2 -2
- package/dist/{chunk-JDX6L5K6.js → chunk-7ALG5744.js} +1871 -537
- package/dist/index.d.ts +17 -2
- package/dist/index.js +1 -1
- package/dist/ios-runner/Debug-iphonesimulator/LoupeHost.app/Info.plist +0 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeHost.app/LoupeHost +0 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeHost.app/LoupeHost.debug.dylib +0 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeHost.app/PkgInfo +1 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeHost.app/__preview.dylib +0 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeRunner-Runner.app/Info.plist +239 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeRunner-Runner.app/LoupeRunner-Runner +0 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeRunner-Runner.app/PkgInfo +1 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeRunner-Runner.app/PlugIns/LoupeRunner.xctest/Info.plist +0 -0
- package/dist/ios-runner/Debug-iphonesimulator/LoupeRunner-Runner.app/PlugIns/LoupeRunner.xctest/LoupeRunner +0 -0
- package/dist/ios-runner/LoupeRunner.xctestrun +119 -0
- package/dist/{server-BTS4TOGF.js → server-3J6ZMCJG.js} +2 -2
- package/package.json +1 -1
- package/skills/loupe/SKILL.md +51 -13
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,42 @@ All notable changes to `@rootnative/loupe` are in this file. The format follows
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.0.0-alpha.3] - 2026-11-28
|
|
8
|
+
|
|
9
|
+
The first step to iOS: on a Mac, `devices` lists the iOS simulators, and `device` takes one. loupe doesn't drive a simulator yet.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`devices` lists the iOS simulators** on a Mac, after the Android devices: each simulator that Xcode can start, with `platform: "ios"`, `kind: "simulator"`, its `udid`, its `name`, and its runtime in `os` (for example `iOS 18.6`). A simulator that runs is `ready`, and the others are `stopped`. loupe doesn't drive a simulator yet. On a Mac with no Xcode, or with no Android SDK, `devices` gives the other list and a warning. On Linux and Windows it asks only the Android tools, as before.
|
|
14
|
+
- **`device` takes an iOS simulator** on a Mac: its UDID, or its name when one simulator with that name runs. With no `device`, loupe takes the only ready device of both platforms, and `device_ambiguous` lists the devices of both. Each command that works on a device gives `unsupported` on a simulator for now, and says how to choose an Android device. `ANDROID_SERIAL` still chooses the Android device.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- The table of `devices` has the columns `Id` and `OS` in place of `Serial` and `API`, and an Android device shows `API 34` there. The JSON of an Android device doesn't change.
|
|
19
|
+
- `CommandContext` has `hostPlatform`, the system of the machine. `createContext()` sets it. A context that you build by hand needs it.
|
|
20
|
+
- On a Mac where an iOS simulator runs and an Android device is ready, a command with no `device` now gives `device_ambiguous`. Give `device`, or set `ANDROID_SERIAL`.
|
|
21
|
+
- The package holds the test runner for the iOS simulator in `dist/ios-runner` (0.8 MB), built for Apple silicon and Intel Macs. No command starts it yet.
|
|
22
|
+
|
|
23
|
+
## [0.0.0-alpha.2] - 2026-11-25
|
|
24
|
+
|
|
25
|
+
The Expo helpers: loupe warms, opens, and restarts your app in Expo Go, and switches it to RTL and back.
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **`expo-warm`**: it asks Metro (`npx expo start`) for the manifest of your app and its launch bundle, as Expo Go does on its first open. Then the first open doesn't wait for a cold bundle. It gives the SDK version and the folder of the app, and the time, the size, and the SHA-256 of the bundle: after an edit, the same hash means that Metro didn't see the edit. It asks Metro on 127.0.0.1 only.
|
|
30
|
+
- **`expo-open`**: it opens your app in Expo Go at a route, through `adb reverse` of the port of Metro. It warms the bundle first, closes Expo Go's onboarding sheet and developer menu, opens the link again when Expo Go loses it, and waits until the app shows: on the route when your app has the probe. With no probe, it waits until the screen has text, a label or a touch and keeps still, then reads it once more, so a loading screen or a sheet that comes a moment later isn't taken for your app. It warns when Expo Go isn't for the SDK of your app, and with no Expo Go it says how to install it. When Expo Go's screen never keeps still for uiautomator (an animation that never stops, or a long one), it gives `not_idle` with what to do.
|
|
31
|
+
- **`expo-reload`**: it stops Expo Go and opens your app again, so its JavaScript starts again in a new process. It opens the route that the probe shows before the stop, or the route that you give, else the root. It warms the bundle first, so it stops nothing when Metro doesn't run. After the stop, it waits until the process of Expo Go is gone, then opens the link. It warns when Android didn't start Expo Go cold.
|
|
32
|
+
- **`expo-rtl`**: `expo-rtl on` writes `supportsRTL` and `forcesRTL` in the `extra` of your app.json, and opens your app again in RTL, as `expo-reload` does. It keeps app.json as it was in `.expo/loupe-rtl.json`, and `expo-rtl off` puts it back byte for byte. It finds app.json through the manifest of Metro, waits until the manifest has the change, and waits until the probe shows the direction. When the manifest doesn't get the change (an `app.config.js` that replaces `extra`), it puts app.json back and says why. A project with no app.json gets `unsupported`, with the two lines to add.
|
|
33
|
+
- **`direction` and `reopens`** in the output of `expo-open`, `expo-reload` and `expo-rtl`: the layout direction that the probe shows, and what loupe saw before each time that it opened the link again.
|
|
34
|
+
- **`sweep --reload-every <n>`**: it stops the app before each n-th link that the sweep opens, over all the variants, and the link starts it again, so stacked screens don't slow the app down. In Expo Go, loupe then waits until the app shows the route of the link, as `expo-open` does. It needs `--app`. Each screen in the report has `reloaded`.
|
|
35
|
+
- **`sweep --direction ltr,rtl`**: in Expo Go, it checks each screen in each layout direction. loupe sets each direction once, before its variants, in your app.json, as `expo-rtl` does, opens the app again, and waits until the probe shows that direction. At the end it puts app.json back byte for byte and opens the app again in its direction. Each variant has `direction`, and its name ends with it: `portrait-light-rtl`. `--port` gives the port of Metro.
|
|
36
|
+
- **The error code `no_server`**: nothing answers on the port of Metro, or the server there isn't Metro.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- `scroll-to` and `sweep --scroll` leave out Expo Go's own overlay when they compare what a scroll view shows. A fresh Expo Go shows a "Tools" label for a few seconds. loupe took the change of that label for a change of the list: `sweep --scroll` warned that the list didn't show its top again, and a scroll that didn't move could count as one.
|
|
41
|
+
- `dismiss` sends Back or Escape only when the input focus is on the layer that it closes. On a busy device, Android moves the input focus a moment after the window focus. A Back right after the notification shade closed could reach the shade, and the share sheet under it stayed open. When the input focus doesn't arrive within the limit, `dismiss` gives `timeout` and sends no key.
|
|
42
|
+
|
|
7
43
|
## [0.0.0-alpha.1] - 2026-11-24
|
|
8
44
|
|
|
9
45
|
loupe drives an Android emulator or device, measures each screen of your app in dp, and gives your agent "pass" or "fail" with the numbers. It works on Android 11 (API level 30) and later.
|
|
@@ -20,5 +56,7 @@ loupe drives an Android emulator or device, measures each screen of your app in
|
|
|
20
56
|
- **The device:** `devices`, `open-url`, `rotate`, `theme`, `background`, `foreground`, and `dismiss`. `dismiss` closes a system sheet, a dialog, the keyboard, or an overlay of your app.
|
|
21
57
|
- **The probe:** when your app renders `<LoupeProbe />` from `@rootnative/loupe-probe`, `insets` and the rules use the app's own safe area.
|
|
22
58
|
|
|
23
|
-
[unreleased]: https://github.com/rootnative/loupe/compare/loupe@0.0.0-alpha.
|
|
59
|
+
[unreleased]: https://github.com/rootnative/loupe/compare/loupe@0.0.0-alpha.3...HEAD
|
|
60
|
+
[0.0.0-alpha.3]: https://github.com/rootnative/loupe/releases/tag/loupe@0.0.0-alpha.3
|
|
61
|
+
[0.0.0-alpha.2]: https://github.com/rootnative/loupe/releases/tag/loupe@0.0.0-alpha.2
|
|
24
62
|
[0.0.0-alpha.1]: https://github.com/rootnative/loupe/releases/tag/loupe@0.0.0-alpha.1
|
package/README.md
CHANGED
|
@@ -106,7 +106,11 @@ npx @rootnative/loupe sweep \
|
|
|
106
106
|
A sweep writes `loupe-sweep/report.json`, a screenshot of each screen, and a
|
|
107
107
|
contact sheet of each variant. A red frame on the contact sheet marks a
|
|
108
108
|
screen that failed. At the end, loupe puts the orientation and the theme
|
|
109
|
-
back.
|
|
109
|
+
back. For a long list, `--reload-every 10` stops the app before each 10th
|
|
110
|
+
link, so stacked screens don't slow it down. In Expo Go,
|
|
111
|
+
`--direction ltr,rtl` checks each screen in both layout directions: loupe
|
|
112
|
+
sets each one in `app.json`, as `expo-rtl` does, and puts the file back at
|
|
113
|
+
the end.
|
|
110
114
|
|
|
111
115
|
## The output
|
|
112
116
|
|
|
@@ -136,7 +140,7 @@ Each finding gives the element and its numbers in dp.
|
|
|
136
140
|
|
|
137
141
|
| Command | What it does |
|
|
138
142
|
| --- | --- |
|
|
139
|
-
| `devices` | List the Android emulators and devices,
|
|
143
|
+
| `devices` | List the Android emulators and devices, the AVDs that don't run, and on a Mac the iOS simulators. |
|
|
140
144
|
| `open-url` | Open a link (a deep link or a web page), and wait until it opens. |
|
|
141
145
|
| `check` | Check the screen for layout defects with the rules above. |
|
|
142
146
|
| `sweep` | Open each link in each orientation and theme, check each screen, and write a report, the screenshots, and a contact sheet of each variant. |
|
|
@@ -159,6 +163,10 @@ Each finding gives the element and its numbers in dp.
|
|
|
159
163
|
| `dismiss` | Close the top layer over the app: the keyboard, a dialog, a menu or a sheet of the app, a system sheet, or the notification shade. |
|
|
160
164
|
| `background` | Send the app in front to the background. With `--for`, bring it back after that time. |
|
|
161
165
|
| `foreground` | Bring an app back to the front, as a person does from Recents. |
|
|
166
|
+
| `expo-open` | Open the app in Expo Go at a route, close Expo Go's onboarding sheet and developer menu, and wait until the app shows. |
|
|
167
|
+
| `expo-reload` | Stop Expo Go and open the app again, so its JavaScript starts again. Keep the route when the app has the probe. |
|
|
168
|
+
| `expo-rtl` | Turn RTL on or off in the app.json of the app, and open the app again in that direction. `off` puts app.json back as it was. |
|
|
169
|
+
| `expo-warm` | Ask Metro (`npx expo start`) for the app and its bundle, so that the first open in Expo Go is fast. Give the SHA-256 of the bundle. |
|
|
162
170
|
| `version` | Print the loupe version and the host it runs on. |
|
|
163
171
|
|
|
164
172
|
## The probe
|
|
@@ -171,7 +179,12 @@ loupe takes the safe area from Android.
|
|
|
171
179
|
|
|
172
180
|
- On a real phone, give `--app`. loupe then reads the screen only while that
|
|
173
181
|
app is in front, so it never shows another app to your agent.
|
|
174
|
-
- loupe makes no network
|
|
182
|
+
- loupe makes no call over the network. It talks to the device through adb,
|
|
183
|
+
and the Expo commands talk to Metro on this machine (127.0.0.1) only.
|
|
184
|
+
- `expo-rtl` and `sweep --direction` are the only commands that write in
|
|
185
|
+
your project: they edit `app.json`, keep the file as it was in
|
|
186
|
+
`.expo/loupe-rtl.json`, and put it back (`expo-rtl off`, or the end of
|
|
187
|
+
the sweep).
|
|
175
188
|
|
|
176
189
|
## License
|
|
177
190
|
|
package/dist/bin.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
registry,
|
|
7
7
|
runCommand,
|
|
8
8
|
version
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7ALG5744.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/flags.ts
|
|
12
12
|
import { parseArgs } from "util";
|
|
@@ -230,7 +230,7 @@ async function mcp(args, io, registry2, context) {
|
|
|
230
230
|
io.err('Run "loupe mcp --help" for its use.');
|
|
231
231
|
return EXIT_USAGE;
|
|
232
232
|
}
|
|
233
|
-
const { serveMcp } = await import("./server-
|
|
233
|
+
const { serveMcp } = await import("./server-3J6ZMCJG.js");
|
|
234
234
|
await serveMcp({
|
|
235
235
|
registry: registry2,
|
|
236
236
|
context,
|