@vitrinka/web 0.7.2 → 0.8.1

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +162 -0
  2. package/README.md +130 -23
  3. package/build/hud.iife.js +15 -15
  4. package/build/one.iife.js +1 -1
  5. package/build/recorder/api.d.ts +5 -3
  6. package/build/recorder/api.js +5 -3
  7. package/build/recorder/config.d.ts +6 -2
  8. package/build/recorder/hud/Hud.d.ts +3 -1
  9. package/build/recorder/hud/Hud.js +2 -2
  10. package/build/recorder/hud/Menu.d.ts +7 -1
  11. package/build/recorder/hud/Menu.js +2 -2
  12. package/build/recorder/hud/host.d.ts +13 -0
  13. package/build/recorder/hud/host.js +96 -1
  14. package/build/recorder/hud/icons.d.ts +2 -0
  15. package/build/recorder/hud/icons.js +4 -0
  16. package/build/recorder/hud/mount.d.ts +2 -0
  17. package/build/recorder/hud/mount.js +1 -0
  18. package/build/recorder/index.d.ts +6 -0
  19. package/build/recorder/index.js +3 -0
  20. package/build/recorder/link.js +1 -1
  21. package/build/recorder/storage/index.d.ts +1 -1
  22. package/build/recorder/storage/index.js +3 -2
  23. package/build/recorder/storage/lock.js +85 -3
  24. package/build/recorder/version.d.ts +2 -2
  25. package/build/recorder/version.js +1 -1
  26. package/build/report/attachments.d.ts +56 -0
  27. package/build/report/attachments.js +91 -0
  28. package/build/report/drag.d.ts +18 -0
  29. package/build/report/drag.js +34 -0
  30. package/build/report/element.d.ts +11 -2
  31. package/build/report/element.js +106 -15
  32. package/build/report/engine.d.ts +13 -1
  33. package/build/report/engine.js +31 -4
  34. package/build/report/face.d.ts +23 -0
  35. package/build/report/face.js +92 -0
  36. package/build/report/i18n.d.ts +77 -3
  37. package/build/report/i18n.js +127 -6
  38. package/build/report/place.d.ts +26 -0
  39. package/build/report/place.js +33 -0
  40. package/build/report/reader.d.ts +42 -0
  41. package/build/report/reader.js +39 -0
  42. package/build/report/recorder-face.js +6 -2
  43. package/build/report/sent.d.ts +16 -0
  44. package/build/report/sent.js +39 -0
  45. package/build/report/settings.d.ts +32 -0
  46. package/build/report/settings.js +47 -0
  47. package/build/report/styles.d.ts +1 -1
  48. package/build/report/styles.js +223 -53
  49. package/build/report/widget.d.ts +122 -3
  50. package/build/report/widget.js +1125 -107
  51. package/build/report/wire.d.ts +59 -9
  52. package/build/report/wire.js +114 -14
  53. package/build/report-widget.mjs +232 -62
  54. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,167 @@
1
1
  # @vitrinka/web
2
2
 
3
+ ## 0.8.1
4
+
5
+ - **Record keeps the report you started.** A linked member's **Record**
6
+ swaps Report a problem for the recorder pill by unmounting the card, so a
7
+ typed but unsent report — the description, a mark and its note, the
8
+ picked type, an attached file — went with it. Record now waits while the
9
+ card holds any of them, as it already did while a report was sending or
10
+ waiting on **Try again**, and says why under its label: "Send or clear
11
+ the report you started first" (cs "Odešlete nebo smažte rozepsané
12
+ hlášení", also its accessible description). The waiting item stays
13
+ reachable with the menu's arrows, so a screen reader reads the reason,
14
+ and pressing it does nothing; it now looks unavailable. Since 0.8.0.
15
+ - **A report never sits on Sending….** No request of a report had a time
16
+ limit, so one nothing answered — a server stuck in a handler, a
17
+ connection or proxy holding it — left the card on **Sending…** for good:
18
+ a follow-up report with an attached PNG was created, then waited minutes
19
+ with its file, replay and submit unsent. Every leg now has a deadline,
20
+ 30 s for a call and 30 s plus the bytes at 32 KiB/s for an upload (a
21
+ 10 MiB file gets about six minutes), and preparing the capture gets 30 s
22
+ before the report goes without it. A leg past its deadline fails like a
23
+ dropped connection: the card shows the error and **Try again**, which
24
+ resumes at that leg. Since 0.7.0.
25
+ - **A report opened early still shows the page.** The page recorder loads
26
+ lazily; a card opened before it ran (a slow network, device or CI
27
+ runner) froze a clip with no screen in it, and the report went without
28
+ its replay. When the recorder runs by Send, the report now takes its view
29
+ then, as it already did for a recorder that had only just started.
30
+ Since 0.7.0.
31
+ - **Report a problem: motion where it belongs.** The marking bar's shape
32
+ indicator is in place on its first frame instead of growing in; a parked
33
+ card rescales and follows a resized window in its corner instead of
34
+ overhanging and gliding back; reduced motion now also stops the menu's
35
+ rise, the coach's dim and the chevron's turn. Since 0.8.0.
36
+ - **Two tabs no longer lose a note to a shared seq.** On the IndexedDB
37
+ lane (hosts without Web Locks) a browser can deliver another tab's
38
+ `localStorage` writes after the lock has passed to the next tab, so two
39
+ tabs could number captures with the same seq; the server keeps the first
40
+ row per seq, and a note vanished from both. Each holder now leaves a
41
+ fence (`vitrinka.recorder.lock.seq`) that the next one waits to read, so
42
+ the previous holder's writes are visible first; after 1 s it numbers
43
+ anyway and warns once, so a cleared store never wedges it. The Web Locks
44
+ lane is unchanged. Since 0.3.4.
45
+
46
+ ## 0.8.0
47
+
48
+ **Report a problem grows back up.** The calm face now gives the people in
49
+ your app what the recorder pill gave its testers: it says who they are,
50
+ links a vitrinka account, finds their earlier reports, and marks a problem
51
+ without hiding how to finish.
52
+
53
+ - **One card.** The describe card and every mark's note are now one card:
54
+ the reporter's word for it (**Bug · Suggestion · Question · Other**,
55
+ optional, sent as `type` — a hint for triage, never the category),
56
+ "What went wrong?", one numbered note line per mark, the attached files,
57
+ and **Send** in the foot. It keeps one size from drafting through
58
+ sending, an error and the thanks, so Send never leaves the screen; a long
59
+ list scrolls inside it. A note on a mark is now enough to send.
60
+ - **Marking under a top bar.** "Show us where" puts a glass bar at the top
61
+ of the page: one plain line ("Mark where the problem is"), a segmented
62
+ **Circle · Box · Arrow · Hide** whose indicator slides to the pick, and
63
+ **Cancel**. Cancel leaves marking and drops this pass's marks, asking
64
+ first ("Discard 2 marks?" · **Discard** / **Keep**); ⌘Z / Ctrl+Z takes
65
+ back the newest mark when no field has the caret; Esc, or "Show us where"
66
+ again, leaves marking and keeps the marks. **Done** and **Undo** are
67
+ gone: Done only returned to a card that no longer leaves the screen, and
68
+ the bottom bar it sat in hid how to finish.
69
+ - **Notes no longer float on the page.** Since 0.7.0 each mark's note
70
+ opened at the mark, a 220 px field over the page and over the other
71
+ marks. A mark now carries only a pin — its number and ✕ — and a press on
72
+ the number puts the caret in its line in the card.
73
+ - **The card parks away from the marks.** Marking starts with the card
74
+ exactly where it rested. It moves only when a mark lands under it, to the
75
+ corner that covers the least of the marks, clear of the top bar.
76
+ - **Who you are.** The header shows an account chip: the initials and
77
+ first name of the person your app signed (`identify({token})`, the name
78
+ as vitrinka returns it) or asserted, else **?**. It opens the account
79
+ popover: who, and how ("Signed in by this app", or that the team checks
80
+ an anonymous report first); **Link your vitrinka account** — the pill's
81
+ flow, a code with **Open vitrinka** and a QR — or **Linked to vitrinka
82
+ as …** with **Unlink**; and **Open the report portal** when the project
83
+ has one.
84
+ - **The ⋯ menu.** **My reports**; **Recent recordings** and **Record** for
85
+ a linked member; **Settings**; **Open vitrinka** (a member) or **Open the
86
+ report portal**. A list opens inside the card with ← back. Settings sits
87
+ behind a real cog: since 0.7.0 its glyph was a ring of rays that read as
88
+ brightness, a sun.
89
+ - **My reports.** For a reporter your server signed, the widget trades the
90
+ token once for a short-lived reporter session (`POST
91
+ /api/v1/report/session`) and lists their reports from `GET
92
+ /api/v1/report/mine` (header `X-Vitrinka-Reporter`), each with its step:
93
+ Received, Planned, In progress, Fixed, Done. A lapsed session is renewed
94
+ and asked once more; the `vkb_` key alone still reads nothing. An
95
+ asserted email or an anonymous reporter gets this browser's own sends
96
+ instead — the last 20 for this vitrinka and site, filed or "Waiting for
97
+ approval", marked "Sent from this browser".
98
+ - **The face switch for linked members** (npm entry only). A browser
99
+ holding a vitrinka member link for the widget's `base` gets **Record**:
100
+ it swaps Report a problem for the recorder pill in place, recording on
101
+ the member's own link, never your `vkb_` key. The idle pill's ⋯ menu then
102
+ offers **Report a problem**, which swaps back. The pick is remembered per
103
+ browser and origin (`vitrinka.report.face`); a member who never picked
104
+ starts on the pill when their vitrinka display mode is dev. Reporters
105
+ never see the switch, and a `vkr_` key the host passes is a build's, not
106
+ a person's. `report-widget.mjs` carries no pill, so the script tag offers
107
+ neither Record nor Recent recordings. New API: `onReportFace` on
108
+ `VitrinkaRecorderPill` and in `mountRecorderHud`'s options adds the
109
+ pill's row; `face` on the handle and the element now says which face is
110
+ on screen; a stored device link remembers the `base` it was minted on.
111
+ - **Attachments.** 📎 in the foot picks files; pasting or dropping a file
112
+ onto the card adds it (pasted text stays text). Each file is checked
113
+ against the project's caps — `attachments` in `GET
114
+ /api/v1/report-config`, by default 10 MiB per file, 5 per report, images,
115
+ PDF and text — before anything is sent, and one that breaks a cap is
116
+ refused at once, the line naming the cap. They ride their own leg, `POST
117
+ /api/v1/reports/{id}/attachment?name=`, after the create and before the
118
+ replay; **Try again** sends only the files that did not land, and a file
119
+ the server refuses for good is left out while the report still files.
120
+ - **Typing in the widget never fires the page's shortcuts.** A host that
121
+ listens in the capture phase on `window` or `document` (a BPMN modeler's
122
+ `e`) ran before the shadow host's bubble-phase shield, and shadow
123
+ retargeting showed it the host element as `event.target`, never the
124
+ field, so its "ignore keys while typing" check failed. One `window`
125
+ capture listener now stops typing keys aimed at a field of the card, a
126
+ mark's line or a pill sheet; the text still lands, and Enter, Esc, Tab
127
+ and chords that do not edit text (the reporter's shortcut, the pill's
128
+ ⌥⇧ keys) pass. Its limit: a `window` capture listener the page
129
+ registered before the widget mounted still runs first. Since 0.7.0 on
130
+ Report a problem; the pill's sheets had the same leak.
131
+ - **The button moves.** Drag it to any corner (it snaps to the nearest) or
132
+ press Alt+arrow while it has focus; the corner is remembered per origin
133
+ (`vitrinka.report.dock`) and the card opens beside it.
134
+ - **Size and technical details.** Settings adds Small · Medium · Large, one
135
+ scale for the button, the card and the marking bar
136
+ (`vitrinka.report.size`), and read-only technical details for a support
137
+ conversation: version, capture window, whether capture runs, the buffer
138
+ and its cap, the server.
139
+ - **The thanks say what happens next.** A filed report says the team will
140
+ take a look, with **See your report** when the server returned its page;
141
+ one held for approval (an asserted or anonymous reporter) says the team
142
+ checks it before it is filed.
143
+
144
+ Upgrading:
145
+
146
+ - **Upgrade vitrinka first.** My reports from the server, attachments, the
147
+ report type and a dev-mode member's start use doors that ship with the
148
+ vitrinka release serving this version as `/vendor/report-widget-1.mjs`:
149
+ `POST /api/v1/report/session`, `GET /api/v1/report/mine`, `POST
150
+ /api/v1/reports/{id}/attachment`, `type` in the report envelope,
151
+ `attachments` in `/api/v1/report-config` and `displayMode` on
152
+ `/api/v1/recorder/me`. The script tag always matches its server; an npm
153
+ host can run ahead of it. On an older vitrinka, My reports falls back to
154
+ this browser's list, each attachment is refused (the report files
155
+ without it, under the default caps) and a dev-mode start never triggers.
156
+ An older vitrinka refuses the unknown `type` field; the widget then sends
157
+ the report again without it, so the reporter's word is lost but the report
158
+ is not.
159
+ - **Done, Undo and "N places marked" are gone** (the `done`, `undo` and
160
+ `marked` strings). The catalog is internal, so no host code changes, but
161
+ a host test that clicked **Done** / **Hotovo** or **Undo** / **Zpět** in
162
+ marking now presses Esc or "Show us where" to finish, and the pin's ✕ or
163
+ ⌘Z to take a mark back.
164
+
3
165
  ## 0.7.2
4
166
 
5
167
  - **One pill when the extension starts in this tab.** The extension's hello
package/README.md CHANGED
@@ -16,9 +16,9 @@ the last minute as a bug report ([Report a bug](#report-a-bug)).
16
16
 
17
17
  The same engine has a second face for the people who use your app:
18
18
  **[Report a problem](#report-a-problem-vitrinkawebreport)** — a large
19
- button, "What went wrong?", optional marks drawn on the page, and the last
20
- minutes attached under your project's capture profile. No React needed; it
21
- also ships as one file vitrinka serves.
19
+ button and one card: "What went wrong?", optional marks drawn on the page,
20
+ files, and the last minutes attached under your project's capture profile.
21
+ No React needed; it also ships as one file vitrinka serves.
22
22
 
23
23
  ## Install
24
24
 
@@ -185,7 +185,7 @@ vitrinka` (or `sending N`) · actions · frames · notes · pages:
185
185
  | ✎ Note | ⌥⇧N | the note sheet — Enter sends, ⇧Enter newline, Esc / ✕ / click-outside cancel. A cancelled draft (and its images) parks as a small drop on the pill: hover shows its first line, a click resumes it. The clock says **queued**, then **Saved** once the server has the note. Images: see [Attach images](#attach-images) |
186
186
  | ⌖ 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; the sheet names what you picked (its size and route; a crop only from a host that can show pixels outside the page — `HudController.captureRegion` — which neither recorder does, since the HUD's shadow root is open to the page) with **Reselect**. Everything lands on the board |
187
187
  | ■ Stop | ⌥⇧S | the pill asks **Stop & save?** (Esc / **Keep recording** cancels), shows **Saving…** with progress while the tail drains, then **Building board · k/n** while the server builds it, then **Board ready · Open board** until **Done** (a failed build says so, with **Retry**) |
188
- | ⋯ | | 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) |
188
+ | ⋯ | | the linked account · **Report a bug** (below) · **Open this board** · **Recent** (this device's last five recordings, each linked to its board) · **Report a problem** (idle, with `onReportFace`: the way back from [Report a problem](#report-a-problem-vitrinkawebreport)'s face switch) · **Go to vitrinka** · **Size** S/M/L · **Technical details** · **Position** · **Unlink this device** (asks first) |
189
189
 
190
190
  Move it anywhere: drag the puck or capsule and it lands on one of eight
191
191
  spots (a 3×3 grid without the centre). A flick lands where it is thrown.
@@ -294,15 +294,31 @@ offered only during one.
294
294
  ## Report a problem (`@vitrinka/web/report`)
295
295
 
296
296
  The report face of the same engine, for the people using your app: a large
297
- **Report a problem** / **Nahlásit problém** button, a card that asks
298
- **What went wrong?** with Send, and **Show us where** to circle, box, point
299
- at or hide parts of the page — numbered marks with an optional note each,
300
- taught by a coach card ("click, hold and move") until the first mark
301
- exists; from the keyboard, Enter places a mark, arrows move it,
302
- Shift+arrows resize it and Enter sets it. The minutes before are attached under your project's **capture
297
+ **Report a problem** / **Nahlásit problém** button and ONE card. Its header
298
+ says who is reporting (the account chip) and holds the ⋯ menu; its body
299
+ takes the reporter's word for it — **Bug · Suggestion · Question · Other**,
300
+ optional, sent as `type`, a hint for your team's triage — and **What went
301
+ wrong?**, then one numbered note line per mark and the attached files; its
302
+ foot holds 📎, **Show us where** and **Send**. The card keeps one size from
303
+ drafting through sending, an error and the thanks, so Send is always in
304
+ view. The minutes before are attached under your project's **capture
303
305
  profile** (set in vitrinka; see [`docs/PROTOCOL.md`](../../docs/PROTOCOL.md)
304
306
  § Report a problem). You need the project's report key (`vkb_…`).
305
307
 
308
+ **Marking.** **Show us where** puts a glass bar at the top of the page —
309
+ "Mark where the problem is", a segmented **Circle · Box · Arrow · Hide**
310
+ and **Cancel** — and you circle, box, point at or hide parts of the page,
311
+ taught by a coach card ("click, hold and move") until the first mark
312
+ exists. A mark carries a pin on the page (its number and ✕) and a line in
313
+ the card for its note; a press on the number puts the caret there, and a
314
+ note on a mark is enough to send. The card stays where it rested and moves
315
+ only when a mark lands under it, to the corner that covers the least of
316
+ the marks. Esc or **Show us where** again ends marking and keeps the
317
+ marks; **Cancel** drops this pass's marks, asking first (**Discard 2
318
+ marks?**); ⌘Z / Ctrl+Z removes the newest when no field has the caret.
319
+ From the keyboard, Enter places a mark, arrows move it, Shift+arrows
320
+ resize it and Enter sets it.
321
+
306
322
  **Script tag** — vitrinka serves the single-file build; `base` defaults to
307
323
  the origin it came from:
308
324
 
@@ -352,13 +368,14 @@ function ReportAProblem({ locale, token }: { locale: string; token?: string }) {
352
368
  | `locale` | `cs` · `en`; live as an attribute, and through `setLocale()` |
353
369
  | `button` | `false` hides the floating button: open the card from your own control |
354
370
  | `open-selector` / `openSelector` | a CSS selector of your control(s) that open the card |
355
- | `face` | `report` (default) or `recorder` — the recorder pill on the same engine (npm only; it takes a `vkr_` key or the device link) |
371
+ | `face` | `report` (default) or `recorder` — the recorder pill on the same engine (npm only; it takes a `vkr_` key or the device link). A linked member also switches in place: **The face switch** below |
356
372
  | `capture` | narrow the capture profile: `{storage: 'memory', windowSec, maxBytes, classes}` |
357
373
  | `identity` | as `identify()` below |
358
374
  | `appVersion`, `sanitizeUrl` | as on the recorder |
359
375
 
360
376
  The handle (and the element) has `open()`, `close()`, `identify()`,
361
- `setLocale()`; the handle also `unmount()`s. For the tag from npm, call
377
+ `setLocale()` and `face`, the face on screen (`recorder` while a member has
378
+ switched to the pill); the handle also `unmount()`s. For the tag from npm, call
362
379
  `defineReportElement()` once. Closing the card hands focus back to whatever
363
380
  had it when the card opened (your control, the field the shortcut fired in),
364
381
  else to the button: call `open()` once your control holds focus again — after
@@ -394,18 +411,99 @@ on the page; a widget's own `identify()` wins (`null` makes that widget
394
411
  anonymous, `undefined` hands it back to the page-wide one). Identity lives
395
412
  in memory only; pass it on every load.
396
413
 
414
+ **The account and the menu.** The header's chip shows the reporter's
415
+ initials and first name — the person your token names (the name as
416
+ vitrinka returns it) or the email you asserted — else **?**. It opens the
417
+ account popover: who, and how ("Signed in by this app", or that the team
418
+ checks an anonymous report first); the member link below; and **Open the
419
+ report portal** when the project has one bound. The ⋯ menu holds **My
420
+ reports**, **Recent recordings** and **Record** (a linked member, npm
421
+ only), **Settings**, and **Open vitrinka** (a member) or **Open the report
422
+ portal**. A list opens inside the card with ← back.
423
+
424
+ **My reports** depends on who reports:
425
+
426
+ - **A token your server signed**: vitrinka's list. The widget trades the
427
+ token once for a short-lived reporter session (`POST
428
+ /api/v1/report/session`, renewed when it lapses) and reads `GET
429
+ /api/v1/report/mine` with it (header `X-Vitrinka-Reporter`): each report
430
+ with its step — Received, Planned, In progress, Fixed, Done — linked to
431
+ its page. The `vkb_` key alone reads nothing.
432
+ - **An asserted email, or anonymous**: this browser's own sends — the last
433
+ 20 for this vitrinka and this site, filed or "Waiting for approval",
434
+ marked "Sent from this browser" (`localStorage`). A signed reporter gets
435
+ the same on a vitrinka without the session door.
436
+
437
+ **The member link.** A vitrinka member testing your app links their
438
+ account from the account popover with the pill's flow: a short code,
439
+ **Open vitrinka** (approve on this device) and a QR. Approval mints this
440
+ browser's own `vkr_` token, kept where the pill keeps its link
441
+ (`vitrinka.recorder.link`, with the `base` it was minted on), so linking
442
+ here links the pill on this site and **Unlink** forgets it for both.
443
+ Reporters never need it: your token vouches for them.
444
+
445
+ **The face switch** (npm entry only). A browser holding a member link for
446
+ the widget's `base` gets **Record** and **Recent recordings** in the ⋯
447
+ menu. **Record** swaps Report a problem for the recorder pill in place,
448
+ recording on the member's link, never your `vkb_` key; the idle pill's ⋯
449
+ menu then offers **Report a problem**, which swaps back. **Record** waits,
450
+ and says so, while the card holds a report not sent yet — words, a mark,
451
+ a picked type, a file — since the swap would lose it. The pick is
452
+ remembered per browser and origin (`vitrinka.report.face`); a member who
453
+ never picked starts on the pill when their vitrinka display mode is dev
454
+ (`displayMode` from `/api/v1/recorder/me`, learned when the card opens).
455
+ `report-widget.mjs` carries no pill, so the script tag offers neither.
456
+ Your own pill takes the same way back with `onReportFace` on
457
+ `VitrinkaRecorderPill` (or `mountRecorderHud`).
458
+
397
459
  **Beside the recorder.** One page runs one capture: when the recorder face
398
460
  (`VitrinkaRecorderRoot`) is mounted it owns it, and Report a problem sends
399
461
  its reports without a capture of its own — mount one face per page (pick it
400
462
  by your app's mode, or with `face`).
401
463
 
402
- **The shortcut.** There is none by default. A reporter sets their own in the
403
- card's settings (⚙) by pressing it: a modifier other than Shift is required,
404
- Esc cancels. It is kept in `localStorage` (`vitrinka.recorder.report.keybind`).
405
-
406
- **What the reporter sees after Send**: "Thanks — we've got it", and **See
407
- your report** when the server returns the report's page. A failed send
408
- keeps every word; **Try again** resumes the same report.
464
+ **Attachments.** 📎 picks files; pasting or dropping a file onto the card
465
+ adds it (pasted text stays text). They line up above the foot, each with a
466
+ remove ✕, and the card keeps its size. Each file is checked against the
467
+ project's caps — `attachments` in `GET /api/v1/report-config`: bytes per
468
+ file, files per report and the types, by default 10 MiB, 5, and images,
469
+ PDF and text — before anything is sent, and one that breaks a cap is
470
+ refused at once, the line naming the cap. The files ride their own leg
471
+ (`POST /api/v1/reports/{id}/attachment?name=`) before the replay; **Try
472
+ again** sends only those that did not land, and a file the server refuses
473
+ for good is left out while the report still files.
474
+
475
+ **Where it sits.** Drag the button to any corner (it snaps to the nearest)
476
+ or press Alt+arrow while it has focus; the corner is remembered per site
477
+ (`vitrinka.report.dock`), and the card opens beside the button — above it
478
+ at the bottom, below it at the top. **Settings** (⋯) holds the shortcut
479
+ below, **Size** — Small · Medium · Large, one scale for the button, the
480
+ card and the marking bar (`vitrinka.report.size`) — and **Technical
481
+ details** for a support conversation: version, capture window, whether
482
+ capture runs, the buffer and its cap, the server.
483
+
484
+ **The shortcut.** There is none by default. A reporter sets their own in
485
+ **Settings** by pressing it: a modifier other than Shift is required, Esc
486
+ cancels. It is kept in `localStorage` (`vitrinka.recorder.report.keybind`).
487
+
488
+ **Typing stays in the widget.** A key typed into a field of the card, a
489
+ mark's line or a pill sheet never reaches your page's shortcuts — even one
490
+ bound in the capture phase on `window` or `document`, which runs before the
491
+ widget's own shield and, through shadow retargeting, sees the widget's
492
+ host element as `event.target`, never the field, so its "ignore keys while
493
+ typing" check cannot work. One `window` capture listener stops those keys;
494
+ the text still lands, and Enter, Esc, Tab and chords that do not edit text
495
+ pass. Its limit: a `window` capture listener your page registered before
496
+ the widget mounted still runs first — read `event.composedPath()[0]`
497
+ there, not `event.target`.
498
+
499
+ **What the reporter sees after Send**: "Thanks — we've got it", then what
500
+ happens next: a filed report says the team will take a look, with **See
501
+ your report** when the server returns the report's page; one held for
502
+ approval (an asserted or anonymous reporter) says the team checks it
503
+ before it is filed. A failed send keeps every word; **Try again** resumes
504
+ the same report. A request nothing answers counts as failed: each call
505
+ gets 30 s, an upload 30 s plus its bytes at 32 KiB/s, so the card never
506
+ stays on Sending.
409
507
 
410
508
  ## Attach images
411
509
 
@@ -461,6 +559,10 @@ import { mountRecorderHud, type HudController } from '@vitrinka/web/hud';
461
559
  const unmount = mountRecorderHud(controller, { title: () => document.title });
462
560
  ```
463
561
 
562
+ `onReportFace` in the options adds **Report a problem** to the idle ⋯
563
+ menu and is called when it is picked (`VitrinkaRecorderPill` takes the same
564
+ prop).
565
+
464
566
  `HudController` is a snapshot plus actions:
465
567
 
466
568
  - `getSnapshot()` returns the same object until something changes;
@@ -533,10 +635,15 @@ others through the driver's optional `watch(key, onChange)` (the
533
635
  `localStorage` driver implements it with the `storage` event).
534
636
 
535
637
  Event and rrweb-chunk sequence numbers are allocated under a cross-tab
536
- Web Lock, or an IndexedDB transaction on hosts without Web Locks. Stop
537
- waits for these allocations before draining. A custom driver shared across
538
- documents must implement `withLock(name, run)` and run the synchronous
539
- callback exclusively across them; a document-local driver needs no lock.
638
+ Web Lock, or an IndexedDB transaction on hosts without Web Locks. A
639
+ browser can deliver another tab's `localStorage` writes after that
640
+ transaction has handed over, so on that lane each holder leaves a fence in
641
+ `localStorage` (`vitrinka.recorder.lock.seq`) and in IndexedDB, and the
642
+ next one waits until it reads that fence. Stop waits for these allocations
643
+ before draining. A custom driver shared across documents must implement
644
+ `withLock(name, run)` and run the synchronous callback exclusively across
645
+ them, with every earlier holder's writes readable; a document-local driver
646
+ needs no lock.
540
647
  A driver that shares an origin with the package's own (e.g. one that
541
648
  re-keys a single entry) passes the package's `withRecorderLock` from
542
649
  `@vitrinka/web/recorder`, so both number events under the same lock.