@browserbridge/bbx 1.7.1 → 1.7.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.
@@ -27,7 +27,7 @@ The table below includes the legacy capability bucket for each method so agents
27
27
  - `-` means the method is global/system-scoped and was never gated by a former capability bucket.
28
28
  - Capability names are descriptive coverage labels only. Browser Bridge access is window-scoped now; there are no capability-scoped sessions.
29
29
 
30
- ## All Methods (59)
30
+ ## All Methods (65)
31
31
 
32
32
  | # | Method | Tab? | CDP? | Group | Capability | Notes |
33
33
  | --- | ---------------------------------- | ---- | ---- | ----------- | -------------------- | ----------------------------------------------------------------------- |
@@ -44,7 +44,7 @@ The table below includes the legacy capability bucket for each method so agents
44
44
  | 11 | `page.get_state` | Yes | - | page | `page.read` | URL, readiness, focus, scroll, viewport |
45
45
  | 12 | `page.evaluate` | Yes | CDP | page | `page.evaluate` | JS expression in page context; last resort |
46
46
  | 13 | `page.get_console` | Yes | - | page | `page.read` | Buffered console messages; filter by `level`, `limit` |
47
- | 14 | `page.wait_for_load_state` | Yes | - | wait | `page.read` | Block until tab `complete`; `timeoutMs` capped 30 s |
47
+ | 14 | `page.wait_for_load_state` | Yes | - | wait | `page.read` | Block until tab `complete`; `timeoutMs` range 0.5-120 s |
48
48
  | 15 | `page.get_storage` | Yes | - | page | `page.read` | `localStorage`/`sessionStorage`; optional `keys` |
49
49
  | 16 | `page.get_text` | Yes | - | page | `page.read` | Full page text; `textBudget` limits size |
50
50
  | 17 | `page.get_network` | Yes | - | page | `network.read` | Intercepted fetch/XHR; `limit` entries |
@@ -141,6 +141,8 @@ bbx call page.evaluate '{"expression":"await fetch(\"/api/health\").then(r=>r.js
141
141
 
142
142
  Read buffered console output. The console interceptor is auto-installed on first call. Captures `log`, `warn`, `error`, `info`, `debug` plus uncaught exceptions and unhandled rejections.
143
143
 
144
+ To capture a reproduction reliably, call it once with `clear: true` before triggering the event. This installs the interceptor and removes older entries. Reproduce the issue, then read again without `clear`.
145
+
144
146
  ```bash
145
147
  bbx console # all levels
146
148
  bbx console error # errors only
@@ -285,6 +287,8 @@ bbx call page.get_text '{"textBudget":2000}'
285
287
 
286
288
  ### page.get_network
287
289
 
290
+ The fetch/XHR interceptor is installed on the first call. Before reproducing a network issue, call `page.get_network` with `clear: true`, trigger the action, then read the buffer again without `clear` so the relevant request is not missed or erased.
291
+
288
292
  Read intercepted fetch/XHR requests. The interceptor is auto-installed on first call (via MAIN world script). Returns `{entries, count}` sorted newest-first.
289
293
 
290
294
  ```bash
@@ -125,7 +125,7 @@ bbx network # recent fetch/XHR entries
125
125
  bbx network 50 # last 50 entries
126
126
  ```
127
127
 
128
- The interceptor auto-installs on first call. Each entry shows `method`, `url`, `status`, `duration`. Use `clear: true` to reset the buffer.
128
+ The interceptor auto-installs on first call. Before reproducing an event, call `page.get_network` once with `clear: true` to install capture and remove old entries. Trigger the action, then read again without `clear`. Each entry shows `method`, `url`, `status`, `duration`.
129
129
 
130
130
  ## Accessibility Tree for Semantic Discovery
131
131
 
@@ -151,12 +151,13 @@ bbx find-role navigation # semantic, works regardless of classes
151
151
 
152
152
  ## HMR-Aware Waiting
153
153
 
154
- After modifying source code, the dev server hot-reloads. Always wait before inspecting:
154
+ After modifying source code, the dev server hot-reloads. Wait for evidence of the change, not `attached` on a selector that already exists:
155
155
 
156
156
  ```bash
157
- bbx wait '[data-component="Header"]' 5000 # wait for component re-mount
157
+ bbx call dom.wait_for '{"selector":"[data-component=\"Header\"][data-version=\"new\"]","state":"attached","timeoutMs":5000}'
158
+ bbx call dom.wait_for '{"selector":"[data-component=\"Header\"]","text":"Expected new heading","timeoutMs":5000}'
159
+ # For a known remount, wait for detached and then attached states.
158
160
  bbx console error # check for HMR errors
159
- bbx eval 'module.hot?.status?.()' # check HMR status (webpack)
160
161
  ```
161
162
 
162
163
  ## Parent-Agent Response Policy
@@ -9,7 +9,7 @@ Use when a dev server is already running and you want to prove a fix rendered.
9
9
  3. `styles.get_computed` or `layout.get_box_model`
10
10
  4. `patch.apply_styles` to prove the visual fix
11
11
  5. Edit source files
12
- 6. `dom.wait_for` on the component selector
12
+ 6. `dom.wait_for` for expected new text, a selector matching a changed attribute, or a detach/attach remount; do not wait for `attached` on an unchanged selector
13
13
  7. `page.get_console`
14
14
  8. `patch.rollback`
15
15
 
@@ -23,12 +23,14 @@ Acceptance:
23
23
 
24
24
  Use when a submission flow fails silently or the UI state is inconsistent.
25
25
 
26
- 1. `dom.find_by_role` for the form control
27
- 2. `input.type` / `input.click`
28
- 3. `page.get_network`
29
- 4. `page.get_console`
30
- 5. `dom.wait_for` for success or error state
31
- 6. `dom.query` on the resulting panel or message
26
+ 1. `page.get_console` with `clear: true` to install and clear console capture
27
+ 2. `page.get_network` with `clear: true` to install and clear network capture
28
+ 3. `dom.find_by_role` for the form control
29
+ 4. `input.type` / `input.click` to reproduce the issue
30
+ 5. `page.get_network` without `clear`
31
+ 6. `page.get_console` without `clear`
32
+ 7. `dom.wait_for` for success or error state
33
+ 8. `dom.query` on the resulting panel or message
32
34
 
33
35
  Acceptance:
34
36
 
@@ -60,7 +62,7 @@ Use when a component only breaks at a specific breakpoint.
60
62
 
61
63
  1. `page.get_state`
62
64
  2. `viewport.resize`
63
- 3. `dom.wait_for`
65
+ 3. `dom.wait_for` for the expected responsive text, attribute selector, visibility change, or remount
64
66
  4. `layout.get_box_model`
65
67
  5. `styles.get_computed`
66
68
  6. `page.get_console`
@@ -87,7 +89,7 @@ Drag:
87
89
 
88
90
  1. `dom.query` for source and destination
89
91
  2. `input.drag`
90
- 3. `dom.wait_for`
92
+ 3. `dom.wait_for` for expected changed text, attribute selector, or a detach/attach remount
91
93
  4. `dom.query` to verify order or placement
92
94
 
93
95
  Acceptance: