@swmansion/argent 0.32.1-next.16 → 0.32.1-next.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.32.1-next.16",
3
+ "version": "0.32.1-next.18",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
6
6
  "license": "Apache-2.0",
@@ -26,7 +26,7 @@ Convert element-seeking swipes to `scroll-to`. Keep a coordinate swipe only when
26
26
 
27
27
  Work this gate as soon as capture warns that it kept a raw point or recorded a role-only selector. Keep the source screen available and do these checks:
28
28
 
29
- 1. **iOS:** query plausible ids or labels with `native-find-views`. If no term is useful, call `native-full-hierarchy` with narrow fields and `maxDepth: 100`. `describe` and `native-describe-screen` are accessibility projections. They cannot prove that no YAML selector exists.
29
+ 1. **iOS:** query plausible ids or labels with `native-find-views`. If no term is useful, call `native-full-hierarchy` with narrow fields and `maxDepth: 100`. `describe` is an accessibility projection. It cannot prove that no YAML selector exists.
30
30
  2. **Other platforms:** use `describe`; for React Native on Android, also `debugger-component-tree`, for testIDs `describe` omits. Verify Android and Chromium candidates in step 3. Their discovery trees can omit runner elements.
31
31
  3. Test each candidate in a scratch fragment with `assert: { visible: <candidate> }` on the valid screen. Inspect every failure before trying a better id, label, app, or container.
32
32
  4. If source is available, inspect its `testID`, `accessibilityIdentifier`, or `resource-id`. If none exists, report the missing stable id as the real fix.
@@ -43,8 +43,8 @@ On an iOS simulator, the full runner tree exists only for an app launched by Arg
43
43
 
44
44
  1. If Metro, Expo, Xcode, an icon, or a prior process launched the app, call `restart-app`. Restore the source screen and retry capture. `launch-app` can only foreground the existing process.
45
45
  2. Tap capture does **not** wait for that connection. It makes one tree read and turns any failure straight into the kept-coordinates warning. A recording-time `restart-app` returns before the devtools connection opens, so the first tap after a restart can warn transiently. Re-record that tap once before escalating; only a warning that survives the retry is evidence of a real fault.
46
- 3. If the warning survives, call `native-devtools-status` with the same UDID and bundle id and follow its `message`, which names the one action that helps and says when to stop.
47
- 4. If an injectable app remains disconnected, call `stop-all-simulator-servers` once, **scoped to `devices: [<this simulator's UDID>]`**. This does not change app or account data. Then restart and check status again.
46
+ 3. If the warning survives, call `native-full-hierarchy` with the same UDID and bundle id and `maxDepth: 1`. A `status` other than `ok` carries a `message`: follow it. It names the one action that helps and says when to stop. If the call fails with `ViewInspector RPC timed out`, the app is connected and its main thread is stalled, so skip step 4: wait a few seconds, then repeat this call.
47
+ 4. If an injectable app remains disconnected, call `stop-all-simulator-servers` once, **scoped to `devices: [<this simulator's UDID>]`**. This does not change app or account data. Then restart and repeat the step 3 call.
48
48
  5. If it still fails, report an instrumentation blocker. Do not replace selectors with coordinates in a QA e2e test.
49
49
 
50
50
  Use the same explicit UDID throughout. Multiple booted simulators are not an injection fault. Pass `--device <udid>` when CLI device selection is ambiguous.
@@ -45,7 +45,7 @@ After an action moves you to a different screen, or whenever you don't know an e
45
45
  | Need | Tool |
46
46
  | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
47
47
  | Any screen: app, system dialog, Home screen | `describe` |
48
- | App-scoped UIKit properties (iOS simulator) | `native-describe-screen` (needs `bundleId`) |
48
+ | UIKit properties of a view (iOS simulator) | `native-find-views` (needs `bundleId` and a class, id, label, tag or `nativeID` to match) |
49
49
  | What sits at a known raw point (iOS simulator) | `native-user-interactable-view-at-point` (the view that receives touch) or `native-view-at-point` (the visually deepest view) |
50
50
  | Final visual fallback | `screenshot`, only when the tools above cannot expose the control. Do not derive routine in-app navigation targets from pixels |
51
51
 
@@ -6,4 +6,4 @@ A Chromium (CDP) target is an Electron app or a Chromium-family browser (Chrome/
6
6
 
7
7
  - Scroll with `gesture-scroll` and drag with `gesture-drag`; `gesture-swipe` is touch-only.
8
8
  - Tabs and windows: `chromium-tabs`. Every other tool acts on the **active** tab, so `select` before driving a different one. A cross-process navigation (some redirects) can swap a tab's CDP target; `list` again to pick it up under a fresh id.
9
- - Cookies, HttpOnly included: `chromium-cookies`. Web Storage: `chromium-storage`. Use them to seed auth before an e2e test or assert app state after one.
9
+ - Cookies, HttpOnly included: `chromium-cookies`. Web Storage: `debugger-evaluate`, with `localStorage.getItem("token")` for one key or `Object.fromEntries(Object.entries(localStorage))` for all. A bare `localStorage` comes back as `{}` even when it has data. Use them to seed auth before an e2e test or assert app state after one.
@@ -17,7 +17,7 @@ Refused as unsupported on harmony:
17
17
 
18
18
  - `gesture-rotate` and `gesture-custom`: the device moves each contact along one straight line per call, so there is no arc and no long-press. There is no long-press tool on HarmonyOS.
19
19
  - `gesture-drag` and `gesture-scroll` (Chromium-only), and `rotate`: the device has no orientation command.
20
- - `native-describe-screen`, `native-view-at-point`, `native-user-interactable-view-at-point`, `debugger-component-tree`, the rest of the debugger (`debugger-evaluate`, `debugger-log-registry`), `view-network-logs` and the profilers.
20
+ - `native-view-at-point`, `native-user-interactable-view-at-point`, `debugger-component-tree`, the rest of the debugger (`debugger-evaluate`, `debugger-log-registry`), `view-network-logs` and the profilers.
21
21
  - `paste`, so a `{{secret:...}}` placeholder goes through `keyboard` only.
22
22
  - Screen recording: HarmonyOS exposes no readable frame stream. Use `screenshot` for a still frame.
23
23
 
@@ -12,9 +12,8 @@ Physical iPhone: not supported; `react-profiler-*` reject `kind: "device"`. Prof
12
12
  ### React Profiler (Hermes / React commits)
13
13
 
14
14
  - `react-profiler-start` / `react-profiler-stop`: record CPU samples and React commits around an interaction.
15
- - `react-profiler-analyze`: turn the recording into a ranked report: hot commits with the JS functions that ran during each.
15
+ - `react-profiler-analyze`: turn the recording into a ranked report: hot commits with the JS functions that ran during each, and the file and line of each ranked component it finds in the project.
16
16
  - `react-profiler-status`: **only after an interruption** (debugger drop, Metro reload, pause, subagent handoff, any doubt), never otherwise. After a debugger drop, react-profiler-stop can no longer collect the run; check status before stopping or restarting.
17
- - `react-profiler-component-source`: source, location and memoization status of a component the report flagged.
18
17
  - `react-profiler-fiber-tree`: live component hierarchy, no session needed, for tracing a component's ancestry.
19
18
 
20
19
  ### Drill-down queries (after analyze)
@@ -88,7 +87,7 @@ To revisit earlier data, e.g. to compare before and after a fix: `profiler-load`
88
87
 
89
88
  ### Step 8: Apply fix and re-profile
90
89
 
91
- Read the bottleneck's source (`react-profiler-component-source` or the Read tool), apply the fix, then re-profile the same scenario (Step 1 → interaction → Steps 2-4). Report honestly whether the target metric improved, stayed flat, or regressed, and whether any _other_ metric got worse (e.g. fewer renders but more CPU time, or a different component now re-renders more). If the fix brought no net benefit or unacceptable tradeoffs, revert and reconsider.
90
+ Read the bottleneck's source (the report gives its path from `project_root` and the line), apply the fix, then re-profile the same scenario (Step 1 → interaction → Steps 2-4). Report honestly whether the target metric improved, stayed flat, or regressed, and whether any _other_ metric got worse (e.g. fewer renders but more CPU time, or a different component now re-renders more). If the fix brought no net benefit or unacceptable tradeoffs, revert and reconsider.
92
91
 
93
92
  If the interaction was recorded as an e2e test, replay it with `e2e-execute` instead of repeating the steps by hand. If the replay fails (e.g. a UI fix changed the layout), follow `argent-create-e2e`'s [Diagnose a replay failure](../argent-create-e2e/references/reliability-and-recovery.md#diagnose-a-replay-failure) before retrying the profiling cycle.
94
93
 
@@ -7,7 +7,7 @@ description: Compare saved or live app screenshots with the argent screenshot-di
7
7
 
8
8
  Use `screenshot-diff` as supporting visual evidence for UI QA and visual regression checks. It highlights pixel-visible change or stability; it does not replace visual inspection, accessibility/component-tree state, frame/attribute checks, logs, network evidence, or app behavior. Its description covers the input combinations, physical-iPhone captures and the result.
9
9
 
10
- Do not use screenshot diffing for tap-coordinate discovery. Use `describe` or `native-describe-screen` to find targets first.
10
+ Do not use screenshot diffing for tap-coordinate discovery. Use `describe` to find targets first.
11
11
 
12
12
  ## 2. When To Use
13
13
 
@@ -20,7 +20,7 @@ For implementation tasks that modify visible UI, this workflow also serves as a
20
20
  3. **Interact**: perform the action (`gesture-tap`, `gesture-swipe`, `keyboard`, `button`, ...); you receive a screenshot automatically.
21
21
  4. **Verify**: check the returned screenshot. If it shows a loading/transitional state, block with `await-ui-element` (expected element `visible`, or a spinner `hidden`) rather than a guessed delay (its result carries the new screenshot and element tree), but only with a selector you can trust (`text`/`identifier`/`role`) that the screen is known to have or that you saw in a prior `describe`; a guessed one just times out. Otherwise use a short fixed wait. Pick evidence by what's being asserted:
22
22
  - **Visual** (layout, spacing, color, typography, image/icon rendering, clipping, overflow, text rendering): prefer `screenshot-diff` against the step 1 baseline: it surfaces pixel-visible changes the auto-screenshot might miss. Fall back to inspecting the auto-screenshot only when a stable baseline isn't available.
23
- - **Structural** (navigation state, element existence, accessibility labels/values, selection, hierarchy, route): verify with `describe`, `debugger-component-tree`, or `native-describe-screen`.
23
+ - **Structural** (navigation state, element existence, accessibility labels/values, selection, hierarchy, route): verify with `describe` or `debugger-component-tree`.
24
24
  - **Runtime / log / network** (console errors, API calls, persistence, timing): verify with `view-network-logs`, `debugger-log-registry`, `debugger-evaluate`, or targeted tests. A `not_connected` result from the debugger tools is not evidence about the app: follow its `guidance`, then re-verify.
25
25
  - **Mixed**: collect evidence for each relevant class.
26
26
  - Report the combined verdict: expected behavior, observed behavior, evidence used, and any blocker for requested visual diffing.