@absolutejs/beacon 0.4.13 → 0.4.14

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/README.md CHANGED
@@ -114,6 +114,19 @@ beacon.captureMessage("checkout started", "info");
114
114
  spill size in tags. Subtrees of scroll containers and absolutely positioned
115
115
  escapees (badges, popovers, drawers) are skipped by design; mark deliberate
116
116
  bleeds with `data-beacon-overflow="allow"`.
117
+ - **Ambient watchdogs** — silent failures users abandon instead of reporting
118
+ become warning issues: scroll jail (a leaked modal scroll lock), stuck
119
+ loading (`aria-busy`/`role="progressbar"` that never resolves), occluded
120
+ controls (leaked scrims/z-index bugs, skipped while a dialog is open),
121
+ invisible text (fg composites to its background — theme-token bugs),
122
+ stalled `EventSource` streams, WebSocket connect/close flapping, request
123
+ storms (one endpoint hammered in seconds), reload loops, stale releases (a
124
+ service worker serving a build older than one this browser already ran),
125
+ font-face load failures, focus dropped to `<body>` when a dialog unmounts,
126
+ and form frustration (identical resubmits / repeated native-validation
127
+ failures). Each is individually toggleable on `signals`, deduped, capped,
128
+ and exempts `data-beacon-scan="allow"` subtrees where a DOM scan is
129
+ involved.
117
130
  - **Actionable network signals** — expected aborts remain breadcrumbs instead of
118
131
  issues; offline, timeout, isolated-endpoint, and multi-endpoint connectivity
119
132
  failures are classified separately. Concurrent failures become one event with
package/dist/index.d.ts CHANGED
@@ -24,10 +24,22 @@ export declare const BEACON_SIGNAL: {
24
24
  readonly CONSOLE_ERROR: "console_error";
25
25
  readonly DEAD_CLICK: "dead_click";
26
26
  readonly FETCH_FAILED: "fetch_failed";
27
+ readonly FOCUS_LOST: "focus_lost";
28
+ readonly FONT_FAILURE: "font_failure";
29
+ readonly FORM_FRUSTRATION: "form_frustration";
27
30
  readonly HTTP_5XX: "http_5xx";
31
+ readonly INVISIBLE_TEXT: "invisible_text";
28
32
  readonly LAYOUT_OVERFLOW: "layout_overflow";
33
+ readonly OCCLUDED_CONTROL: "occluded_control";
29
34
  readonly RAGE_CLICK: "rage_click";
35
+ readonly RELOAD_LOOP: "reload_loop";
36
+ readonly REQUEST_STORM: "request_storm";
37
+ readonly SCROLL_JAIL: "scroll_jail";
30
38
  readonly SLOW_RESPONSE: "slow_response";
39
+ readonly SOCKET_FLAPPING: "socket_flapping";
40
+ readonly STALE_RELEASE: "stale_release";
41
+ readonly STALLED_STREAM: "stalled_stream";
42
+ readonly STUCK_LOADING: "stuck_loading";
31
43
  };
32
44
  export type BeaconSignal = (typeof BEACON_SIGNAL)[keyof typeof BEACON_SIGNAL];
33
45
  /** Stable DOM attributes understood by Beacon's instrumentation. */
@@ -37,6 +49,9 @@ export declare const BEACON_ATTRIBUTE: {
37
49
  /** `="allow"` exempts an element AND its subtree from layout-overflow
38
50
  * detection — for deliberate bleeds (decorative shapes, marquees). */
39
51
  readonly OVERFLOW: "data-beacon-overflow";
52
+ /** `="allow"` exempts an element AND its subtree from the visual scan
53
+ * detectors (occluded controls, invisible text, stuck loading). */
54
+ readonly SCAN: "data-beacon-scan";
40
55
  };
41
56
  /** Response header used to correlate a browser signal with its server request. */
42
57
  export declare const BEACON_TRACE_HEADER = "x-absolute-trace-id";
@@ -142,6 +157,18 @@ export type BeaconSignals = {
142
157
  failedRequests?: boolean;
143
158
  /** `console.error` calls (the app explicitly logged an error). Default true. */
144
159
  consoleErrors?: boolean;
160
+ /** A focused element inside an open dialog removed from the DOM with focus
161
+ * falling to `<body>` — keyboard users stranded. Default true. */
162
+ focusLoss?: boolean;
163
+ /** `FontFace` loads that end in `status: "error"` — icon fonts falling back
164
+ * to raw ligature text, custom faces silently missing. Default true. */
165
+ fontFailures?: boolean;
166
+ /** The same form submitted or failing native validation repeatedly within a
167
+ * minute — the quiet sibling of a rage click. Default true. */
168
+ formFrustration?: boolean;
169
+ /** Sampled scan for text rendered nearly the same color as its opaque
170
+ * background (theme-token bugs). Default true. */
171
+ invisibleText?: boolean;
145
172
  /**
146
173
  * Elements that visibly break their bounds once layout settles (first load,
147
174
  * resize end, SPA navigation): in-flow elements crossing the viewport's
@@ -153,11 +180,49 @@ export type BeaconSignals = {
153
180
  layoutOverflows?: boolean;
154
181
  /** Maximum layout-overflow issues reported per page load. Default 5. */
155
182
  layoutOverflowMaxReports?: number;
156
- /** Quiet period after load/resize/navigation before the overflow scan
157
- * runs, letting transitions and lazy content settle. Default 600ms. */
183
+ /** Quiet period after load/resize/navigation before the settled visual
184
+ * scan runs, letting transitions and lazy content settle. Default 600ms. */
158
185
  layoutOverflowSettleMs?: number;
186
+ /** Sampled `elementFromPoint` check for interactive controls covered by an
187
+ * unrelated element (leaked scrims, z-index bugs). Skipped entirely while
188
+ * a dialog is open. Default true. */
189
+ occludedControls?: boolean;
159
190
  /** Rapid-click count that trips a rage click. Default 3. */
160
191
  rageClickCount?: number;
192
+ /** Several full page loads within a minute — a crash or reload loop.
193
+ * Default true. */
194
+ reloadLoops?: boolean;
195
+ /** The same endpoint hit `requestStormCount` times inside
196
+ * `requestStormWindowMs` — refetch loops and retry storms. Needs the
197
+ * fetch/XHR instrumentation. Default true. */
198
+ requestStorms?: boolean;
199
+ /** Requests to one endpoint that trip a storm. Default 15. */
200
+ requestStormCount?: number;
201
+ /** Window for the request-storm counter. Default 10000ms. */
202
+ requestStormWindowMs?: number;
203
+ /** Repeated wheel/touch input while the scrollable page never moves — a
204
+ * scroll lock leaked by a closed modal. Boundary scrolling (already at the
205
+ * top/bottom) is exempt. Default true. */
206
+ scrollJail?: boolean;
207
+ /** WebSocket connect/close cycles to one URL tripping a flap report.
208
+ * Default true. */
209
+ socketFlapping?: boolean;
210
+ /** This page's `release` is older than one this browser has already run —
211
+ * a service worker or cache serving a stale build. Default true. */
212
+ staleReleases?: boolean;
213
+ /** An open `EventSource` on a visible page with no message for
214
+ * `stalledStreamMs` — the silent-stream failure. Default true. */
215
+ stalledStreams?: boolean;
216
+ /** Quiet period before an open, visible EventSource counts as stalled.
217
+ * Default 60000ms. */
218
+ stalledStreamMs?: number;
219
+ /** An `aria-busy`/`role="status"`/`role="progressbar"` element still
220
+ * visible after `stuckLoadingMs` — a load that silently hung.
221
+ * Default true. */
222
+ stuckLoading?: boolean;
223
+ /** Age at which a visible loading indicator counts as stuck.
224
+ * Default 20000ms. */
225
+ stuckLoadingMs?: number;
161
226
  /**
162
227
  * Maximum wait for a same-origin link accepted by an SPA router to finish
163
228
  * navigating before it is considered dead. Default 8000ms; never shorter