@vitrinka/web 0.2.1 → 0.3.0
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 +44 -0
- package/README.md +49 -7
- package/build/hud.d.ts +1 -1
- package/build/hud.iife.js +9 -8
- package/build/recorder/RecorderProvider.d.ts +2 -1
- package/build/recorder/RecorderProvider.js +18 -4
- package/build/recorder/capture/click.d.ts +6 -0
- package/build/recorder/capture/click.js +15 -4
- package/build/recorder/capture/net.js +16 -10
- package/build/recorder/capture/redact.d.ts +11 -0
- package/build/recorder/capture/redact.js +18 -13
- package/build/recorder/capture/rrweb.d.ts +7 -1
- package/build/recorder/capture/rrweb.js +23 -7
- package/build/recorder/capture/selector.d.ts +7 -1
- package/build/recorder/capture/selector.js +14 -4
- package/build/recorder/config.d.ts +6 -0
- package/build/recorder/config.js +1 -0
- package/build/recorder/flight.d.ts +63 -0
- package/build/recorder/flight.js +93 -0
- package/build/recorder/hud/Hud.d.ts +2 -1
- package/build/recorder/hud/Hud.js +113 -11
- package/build/recorder/hud/Menu.d.ts +4 -2
- package/build/recorder/hud/Menu.js +2 -2
- package/build/recorder/hud/RecorderPill.d.ts +2 -1
- package/build/recorder/hud/RecorderPill.js +11 -5
- package/build/recorder/hud/Sheet.d.ts +11 -2
- package/build/recorder/hud/Sheet.js +13 -4
- package/build/recorder/hud/controller.d.ts +29 -0
- package/build/recorder/hud/flow.d.ts +13 -3
- package/build/recorder/hud/flow.js +17 -6
- package/build/recorder/hud/icons.d.ts +1 -0
- package/build/recorder/hud/icons.js +3 -0
- package/build/recorder/hud/styles.d.ts +1 -1
- package/build/recorder/hud/styles.js +1 -0
- package/build/recorder/index.d.ts +5 -0
- package/build/recorder/index.js +9 -1
- package/build/recorder/page-controller.js +4 -0
- package/build/recorder/queue.d.ts +11 -4
- package/build/recorder/queue.js +15 -8
- package/build/recorder/report.d.ts +36 -0
- package/build/recorder/report.js +250 -0
- package/build/recorder/session.d.ts +12 -2
- package/build/recorder/session.js +25 -12
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @vitrinka/web
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
- **Report a bug, without a recording running.** A new ⋯ menu row. While
|
|
6
|
+
the pill is mounted and idle on a device that can record, it keeps the
|
|
7
|
+
page's last minute in memory — rrweb as two 30-second checkout windows,
|
|
8
|
+
plus the click, navigation, console and network lanes. Report freezes
|
|
9
|
+
that clip, asks what went wrong (required) and lets you **Mark on
|
|
10
|
+
screen** (annotate mode's element pick or region drag). Send files one
|
|
11
|
+
short session: `meta.kind: "report"`, title `Bug report: <first line>`,
|
|
12
|
+
the buffered events with their original timestamps, the rrweb windows as
|
|
13
|
+
chunks, then your description as a task annotation, then done. vitrinka
|
|
14
|
+
renders stills from the clip and the annotation becomes an intake draft.
|
|
15
|
+
The pill says **Sending…**, then **Sent · Open board**, or offers
|
|
16
|
+
**Retry**. During a recording, Report adds the task annotation to the
|
|
17
|
+
running session instead.
|
|
18
|
+
- **The buffer never leaves memory before Send.** Nothing is written to
|
|
19
|
+
storage or sent; it runs the recording's own redaction (the workspace
|
|
20
|
+
policy is fetched once when it starts); caps of 4 MiB / 20 000 rrweb
|
|
21
|
+
events and 500 lane events drop the older window; a reload, an unlink or
|
|
22
|
+
a recording start discards it. `flightRecorder={false}` on
|
|
23
|
+
`VitrinkaRecorderRoot` turns it off.
|
|
24
|
+
- **Every session sends `meta.devicePixelRatio`**, the scale its rects are
|
|
25
|
+
in, so the server renders stills at it.
|
|
26
|
+
- `HudController` gains optional `holdReport` / `report` and the snapshot an
|
|
27
|
+
optional `canReport`; a host without them (the extension today) shows no
|
|
28
|
+
report row.
|
|
29
|
+
|
|
30
|
+
## 0.2.2
|
|
31
|
+
|
|
32
|
+
- **A click never records more than the DOM stream shows.** A click on a
|
|
33
|
+
filled input, textarea or select used to record its value as the click's
|
|
34
|
+
text — a password field included — though rrweb masks every input. Now a
|
|
35
|
+
form field's text is always empty, and so is the text of an element at,
|
|
36
|
+
inside or wrapping `.rr-mask` / `.rr-block`. Under a `maskAllText` policy
|
|
37
|
+
a click records no text at all.
|
|
38
|
+
- **URL secrets are scrubbed from the start URL and from rrweb.** The
|
|
39
|
+
session's first navigation and rrweb's Meta event (the page URL every
|
|
40
|
+
full snapshot opens with: start, each checkout, resume) carried the raw
|
|
41
|
+
`location.href`, so a magic-link or OAuth-callback token in the query or
|
|
42
|
+
fragment reached the recording. Both now pass `redactUrl`, like every
|
|
43
|
+
later navigation already did.
|
|
44
|
+
- **PEM private keys are scrubbed** from bodies, console lines and headers,
|
|
45
|
+
whatever key carries them (`@vitrinka/redact` 0.1.2).
|
|
46
|
+
|
|
3
47
|
## 0.2.1
|
|
4
48
|
|
|
5
49
|
- **Linking survives a flaky network.** One failed approval check (a
|
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ screenshots), **clicks** (selector, text, rect), **navigation**, **network**
|
|
|
11
11
|
(fetch + XHR, headers + bodies redacted), **console errors**, and the
|
|
12
12
|
**notes and annotations** you type in the pill. Everything is redacted by
|
|
13
13
|
[`@vitrinka/redact`](../redact) before it is buffered; the full contract is
|
|
14
|
-
[`docs/PROTOCOL.md`](../../docs/PROTOCOL.md).
|
|
14
|
+
[`docs/PROTOCOL.md`](../../docs/PROTOCOL.md). Idle, the pill can also send
|
|
15
|
+
the last minute as a bug report ([Report a bug](#report-a-bug)).
|
|
15
16
|
|
|
16
17
|
## Install
|
|
17
18
|
|
|
@@ -130,7 +131,7 @@ controls**) that unfolds into the tools on hover, focus or tap and folds back
|
|
|
130
131
|
| ✎ Note | ⌥⇧N | the note sheet — Enter sends, ⇧Enter newline, Esc / ✕ / click-outside cancel (the draft survives a cancel); the pill says **Saved** |
|
|
131
132
|
| ⌖ Annotate | ⌥⇧A | click or tap an element, or drag a region (a finger too). While annotating, the page gets no press, move or hover, does not scroll, and selects no text. Then describe it: `board` (an annotation on the board) or `task` (also filed as an intake draft) |
|
|
132
133
|
| ■ Stop | ⌥⇧S | the pill asks **Stop & save?** (Esc / **Keep recording** cancels), shows **Saving…** with progress while the tail drains, then **Saved · Open board** until you dismiss it |
|
|
133
|
-
| ⋯ | | the linked account · **Open this board** · **Recent** (this device's last five recordings, each linked to its board) · **Go to vitrinka** · **Size** S/M/L · **Technical details** · **Position** · **Unlink this device** (asks first) |
|
|
134
|
+
| ⋯ | | the linked account · **Report a bug** (below) · **Open this board** · **Recent** (this device's last five recordings, each linked to its board) · **Go to vitrinka** · **Size** S/M/L · **Technical details** · **Position** · **Unlink this device** (asks first) |
|
|
134
135
|
|
|
135
136
|
Move it anywhere: drag the puck or capsule and it lands on one of eight
|
|
136
137
|
spots (a 3×3 grid without the centre). A flick lands where it is thrown.
|
|
@@ -163,6 +164,45 @@ Radix focus trap or a `<dialog>.showModal()` never fights it, and nothing
|
|
|
163
164
|
you do on the pill reaches the page (a "close on outside click" never fires
|
|
164
165
|
because of the recorder).
|
|
165
166
|
|
|
167
|
+
## Report a bug
|
|
168
|
+
|
|
169
|
+
**Report a bug** (⋯ menu) files what led up to a bug — no recording needed.
|
|
170
|
+
|
|
171
|
+
**The last minute.** While the pill is mounted and idle on a device that can
|
|
172
|
+
record (a recorder key or a linked device), it keeps the page's last minute
|
|
173
|
+
**in memory**: the rrweb DOM stream as two 30-second checkout windows (a clip
|
|
174
|
+
covers the last 30–60 s and always opens on a full snapshot), plus the
|
|
175
|
+
click, navigation, console and network events since the older window
|
|
176
|
+
opened. Caps: 4 MiB of serialized rrweb, 20 000 rrweb events, 500 lane
|
|
177
|
+
events; over a cap the older window goes. It runs the recording's own
|
|
178
|
+
redaction (masked inputs, your workspace policy — fetched once when the
|
|
179
|
+
buffer starts — scrubbed URLs, click text that never reads a value). Nothing
|
|
180
|
+
of it is written to storage or sent until you press Send; a reload, an
|
|
181
|
+
unlink or a recording start discards it.
|
|
182
|
+
|
|
183
|
+
**The report.** The sheet freezes the last minute as it opens, asks what
|
|
184
|
+
went wrong (required) and offers **Mark on screen** — annotate mode's
|
|
185
|
+
element pick or region drag. Send files one short session under the pill's
|
|
186
|
+
credential: title `Bug report: <first line>`, `meta.kind: "report"` and
|
|
187
|
+
`meta.devicePixelRatio`; the buffered events with their original
|
|
188
|
+
timestamps; the rrweb windows as chunks; your description as an annotation
|
|
189
|
+
with `task: true` (the marked region, else the whole viewport); then done.
|
|
190
|
+
vitrinka renders stills from the clip, pins the annotation on the board and
|
|
191
|
+
files it as an intake draft. The pill says **Sending…**, then **Sent · Open
|
|
192
|
+
board** (it is in Recents too); a failure offers **Retry**, which resumes
|
|
193
|
+
the same report. During a recording, Report adds that task annotation to
|
|
194
|
+
the running session instead.
|
|
195
|
+
|
|
196
|
+
**Turning it off.** A host that cannot accept even in-memory capture passes
|
|
197
|
+
`flightRecorder={false}`:
|
|
198
|
+
|
|
199
|
+
```tsx
|
|
200
|
+
<VitrinkaRecorderRoot url={…} flightRecorder={false}>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Then nothing is captured until a recording starts, and Report a bug is
|
|
204
|
+
offered only during one.
|
|
205
|
+
|
|
166
206
|
## Driving it from code
|
|
167
207
|
|
|
168
208
|
`window.__vitrinkaRecorder` — for agents and tests:
|
|
@@ -191,10 +231,12 @@ const unmount = mountRecorderHud(controller, { title: () => document.title });
|
|
|
191
231
|
- `getSnapshot()` returns the same object until something changes;
|
|
192
232
|
`subscribe(fn)` calls back after a change. The snapshot holds `linked`,
|
|
193
233
|
`canUnlink`, `annotating`, `recording` (session, clock, sync), `account`,
|
|
194
|
-
`prefs`, `recents`, `workspaceUrl` and
|
|
234
|
+
`prefs`, `recents`, `workspaceUrl`, `version` and, optionally,
|
|
235
|
+
`canReport`.
|
|
195
236
|
- Actions: `start`, `togglePause`, `stop` (resolves `{boardUrl?}`, rejects
|
|
196
237
|
while the server is unreachable), `note`, `annotate`, `setAnnotating`,
|
|
197
|
-
`link`, `unlink`, `getMe`, `setPrefs` and `refreshRecents
|
|
238
|
+
`link`, `unlink`, `getMe`, `setPrefs` and `refreshRecents`; optionally
|
|
239
|
+
`holdReport` and `report` — without them the menu has no **Report a bug**.
|
|
198
240
|
|
|
199
241
|
The full contract is in `src/recorder/hud/controller.ts`.
|
|
200
242
|
|
|
@@ -210,9 +252,9 @@ same mount as one self-contained script with React bundled in:
|
|
|
210
252
|
|
|
211
253
|
| Lane | Event `kind` | Payload |
|
|
212
254
|
|---|---|---|
|
|
213
|
-
| rrweb | `rrweb` | `{count}` + `blobKey` — the batch itself is uploaded as a chunk; inputs always masked, all text under a `maskAllText` policy; images recorded by URL, never inlined (inlining would alter the page's own `<img>`) |
|
|
214
|
-
| clicks | `click` | `{selector, text, rect, route}` |
|
|
215
|
-
| navigation | `nav` | `{url, route, spa}` |
|
|
255
|
+
| rrweb | `rrweb` | `{count}` + `blobKey` — the batch itself is uploaded as a chunk; inputs always masked, all text under a `maskAllText` policy; the page URL each full snapshot carries is scrubbed of query/fragment secrets; images recorded by URL, never inlined (inlining would alter the page's own `<img>`) |
|
|
256
|
+
| clicks | `click` | `{selector, text, rect, route}` — `text` is never a form field's value, and empty at, inside or around `.rr-mask` / `.rr-block` and under `maskAllText` |
|
|
257
|
+
| navigation | `nav` | `{url, route, spa}` — `url` scrubbed of query/fragment secrets, the start URL included |
|
|
216
258
|
| network | `net` | `{method, url, status, ms, reqHeaders, resHeaders, reqBody, resBody, via}` — redacted, capped at 64 KiB per body; the recorder's own uploads are never recorded |
|
|
217
259
|
| console | `console` | `{level: 'error', text}` |
|
|
218
260
|
| notes | `note` | `{text, route}`; annotations add `{rect, selector, annotate: true, task?}` |
|
package/build/hud.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* defining `globalThis.VitrinkaHud.mount`.
|
|
6
6
|
*/
|
|
7
7
|
export { mountRecorderHud, type MountHudOptions } from './recorder/hud/mount';
|
|
8
|
-
export { DEFAULT_PREFS, type HudAccount, type HudAnnotation, type HudController, type HudLinkCode, type HudLinkFlow, type HudPrefs, type HudRecent, type HudRecentStatus, type HudRecording, type HudRect, type HudSize, type HudSnapshot, type HudSync, type HudSyncState, } from './recorder/hud/controller';
|
|
8
|
+
export { DEFAULT_PREFS, type HudAccount, type HudAnnotation, type HudController, type HudLinkCode, type HudLinkFlow, type HudPrefs, type HudRecent, type HudRecentStatus, type HudRecording, type HudRect, type HudReport, type HudSize, type HudSnapshot, type HudSync, type HudSyncState, } from './recorder/hud/controller';
|
|
9
9
|
export type { RecorderStorage } from './recorder/storage';
|