@marver-design/marver 0.28.0 → 0.30.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.
Files changed (105) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/README.md +4 -3
  3. package/dist/{anchor-check-PHUOFj1N.mjs → anchor-check-c52IDkiQ.mjs} +1 -1
  4. package/dist/{build-BsAyLMT1.mjs → build-C3mUtjEn.mjs} +7 -4
  5. package/dist/{capture-DdZ6xgoz.mjs → capture-DEtM4qm5.mjs} +168 -5
  6. package/dist/cli.mjs +11 -11
  7. package/dist/{comments-CrBHPEQl.mjs → comments-XNhMmSSu.mjs} +2 -2
  8. package/dist/{connectors-MR9d-EBP.mjs → connectors-DekQvKt9.mjs} +3 -1
  9. package/dist/{daemon-C5dg2R-V.mjs → daemon-B0Wi1OQ3.mjs} +30 -29
  10. package/dist/{dev-D7YS7iT2.mjs → dev-5dlxoW28.mjs} +19 -14
  11. package/dist/{init-WE5lQkQL.mjs → init-CYlFaRzG.mjs} +1 -1
  12. package/dist/logo-CXY-1yrn.mjs +305 -0
  13. package/dist/{ls-BZ5TAtd5.mjs → ls-NqmePKOf.mjs} +1 -1
  14. package/dist/{marks-Kmdab_5w.mjs → marks-BnNANic9.mjs} +20 -1
  15. package/dist/{marks-Dyn6tmjp.mjs → marks-DBp3h1Mc.mjs} +2 -5
  16. package/dist/{marver-id-gate-D-R0hSt_.mjs → marver-id-gate-vBLb_Icb.mjs} +1 -1
  17. package/dist/{perf-Cn5LiRaY.mjs → perf-6MOTHxay.mjs} +751 -122
  18. package/dist/perf-BCxAo0IS.mjs +1743 -0
  19. package/dist/{plugin-C_0yb-Fq.mjs → plugin-CXRoMA8g.mjs} +1382 -810
  20. package/dist/{poster-DHi6I1fO.mjs → poster-CYmCa00B.mjs} +1 -1
  21. package/dist/{profile-jIS6BcAs.mjs → profile-B1FKOM1e.mjs} +1 -1
  22. package/dist/{publish-bakes-r4PEZuPl.mjs → publish-bakes-C_2ZtHou.mjs} +3 -3
  23. package/dist/{queue-c-6aTHEz.mjs → queue-DeSQm24g.mjs} +29 -14
  24. package/dist/{recover-nrLEVLyJ.mjs → recover-XD8iXJOj.mjs} +2 -2
  25. package/dist/{serve-Dp3nHstu.mjs → serve-DQv3Ti6X.mjs} +8 -4
  26. package/dist/{session-DyVE7cCk.mjs → session-VDJfXEEm.mjs} +1 -1
  27. package/dist/{share-Ce4tP7ji.mjs → share-Bu_kuOKL.mjs} +1 -1
  28. package/dist/{shot-BrRtqaiS.mjs → shot-CRRGgxru.mjs} +3 -3
  29. package/dist/{slots-CFNnegCc.mjs → slots-Dn4Onb0V.mjs} +101 -3
  30. package/dist/{sync-CQdGARJ9.mjs → sync-CMozOwZ0.mjs} +1 -1
  31. package/docs/app.md +194 -0
  32. package/docs/boards-and-folders.md +11 -0
  33. package/docs/jam-session.md +12 -3
  34. package/docs/live-jam.md +3 -0
  35. package/docs/performance.md +99 -19
  36. package/docs/publish.md +7 -0
  37. package/package.json +1 -1
  38. package/src/client/frame-host/bridge.js +17 -8
  39. package/src/client/frame-host/inplace.ts +124 -0
  40. package/src/client/frame-host/inspect.d.ts +1 -0
  41. package/src/client/frame-host/inspect.js +13 -4
  42. package/src/client/frame-host/main.tsx +12 -3
  43. package/src/client/frame-host/messages.ts +85 -0
  44. package/src/client/frame-host/signals.d.ts +15 -0
  45. package/src/client/frame-host/signals.js +219 -0
  46. package/src/client/recorder-level.ts +41 -0
  47. package/src/client/shell/App.tsx +158 -88
  48. package/src/client/shell/BoardList.tsx +103 -48
  49. package/src/client/shell/Comments.tsx +71 -46
  50. package/src/client/shell/ContextMenu.tsx +8 -6
  51. package/src/client/shell/JamSurface.tsx +187 -71
  52. package/src/client/shell/LockedApp.tsx +19 -3
  53. package/src/client/shell/Play.tsx +110 -62
  54. package/src/client/shell/StatusPicker.tsx +19 -9
  55. package/src/client/shell/Toolbar.tsx +15 -7
  56. package/src/client/shell/api.ts +25 -7
  57. package/src/client/shell/app-bridge.ts +23 -9
  58. package/src/client/shell/app-perf.ts +31 -1
  59. package/src/client/shell/canvas/Canvas.tsx +17 -6
  60. package/src/client/shell/canvas/FrameNode.tsx +25 -12
  61. package/src/client/shell/canvas/Sticky.tsx +4 -2
  62. package/src/client/shell/canvas/ctl.ts +2 -0
  63. package/src/client/shell/canvas/ready-watch.ts +4 -0
  64. package/src/client/shell/canvas/sleep.ts +2 -0
  65. package/src/client/shell/canvas/updates.ts +13 -6
  66. package/src/client/shell/commands.ts +765 -0
  67. package/src/client/shell/comments-store.ts +56 -27
  68. package/src/client/shell/goto.ts +15 -9
  69. package/src/client/shell/jam-capture.ts +39 -15
  70. package/src/client/shell/jam-keys.ts +303 -111
  71. package/src/client/shell/jam-lane.tsx +19 -12
  72. package/src/client/shell/jam-lines.ts +10 -1
  73. package/src/client/shell/jam-panel.tsx +68 -53
  74. package/src/client/shell/jam-queue.ts +6 -1
  75. package/src/client/shell/jam-session.tsx +41 -37
  76. package/src/client/shell/jam-state.ts +28 -5
  77. package/src/client/shell/jam-surface-parts.tsx +8 -6
  78. package/src/client/shell/jam-ui.tsx +12 -5
  79. package/src/client/shell/jam-voice.ts +4 -2
  80. package/src/client/shell/live-picture.ts +134 -0
  81. package/src/client/shell/main.tsx +7 -1
  82. package/src/client/shell/marks-ui.tsx +11 -0
  83. package/src/client/shell/open-item.ts +83 -0
  84. package/src/client/shell/open-resolve.ts +50 -0
  85. package/src/client/shell/perf.ts +51 -5
  86. package/src/client/shell/recorder-core.ts +4 -1
  87. package/src/client/shell/recorder-hmr.ts +36 -0
  88. package/src/client/shell/recorder-reloads.ts +264 -0
  89. package/src/client/shell/recorder-seams.ts +116 -0
  90. package/src/client/shell/recorder-self.ts +73 -0
  91. package/src/client/shell/recorder-signals-core.ts +139 -0
  92. package/src/client/shell/recorder-signals.ts +485 -0
  93. package/src/client/shell/recorder.ts +115 -41
  94. package/src/client/shell/store.ts +62 -24
  95. package/src/client/shell/styles.css +2 -0
  96. package/src/client/shell/whiteout-probes.ts +3 -1
  97. package/src/client/stage/main.tsx +39 -12
  98. package/src/shared/app-api.ts +201 -9
  99. package/src/shared/app-perf.ts +103 -8
  100. package/src/shared/app-report.ts +586 -0
  101. package/src/shared/perf-records.ts +445 -0
  102. package/src/shared/perf-run.ts +6 -2
  103. package/templates/instructions/jam.md +4 -0
  104. package/dist/live-Cgzsicwi.mjs +0 -4
  105. package/dist/perf-jam-QxD_UnzN.mjs +0 -635
package/docs/live-jam.md CHANGED
@@ -72,6 +72,9 @@ never changed; one you removed by hand is not written back until you turn that t
72
72
  <f>` hands back the replies, and the canvas posts them and frees the frames. `jam release` gives a run back,
73
73
  `jam status` and `jam mute` are there too. The commands travel through files under `design/.local/jam/`, signed
74
74
  with the session's own key, so a sandbox that blocks localhost cannot stop them.
75
+ - **A capture's pictures are files** (0.29). Each request lists its pictures - the frame each shows and the file to
76
+ open, `design/.local/jam/pictures/<id>.png` - for whoever runs it: your session, a copy, a fresh agent. A `live` one,
77
+ from the Mac app, is your screen in play as you saw it; the others are fresh renders ([Jam sessions](jam-session.md)).
75
78
  - **Claude Code dispatches, so it multitasks.** Its brief opens with a few lines for the session - start ONE
76
79
  background subagent (the Agent tool, `run_in_background: true`) with the part of the brief below its `----` line and
77
80
  what the conversation knows that matters, then `jam next` until nothing waits, and end the turn; every run, however
@@ -8,20 +8,26 @@ agent. A published canvas records nothing.
8
8
 
9
9
  | Log | What | Read with |
10
10
  |---|---|---|
11
- | `design/.local/perf/reloads.jsonl` | each edit and the frames it reached; page-wide reloads, sent or dropped; each frame document that booted, and how long it took | `npx marver perf` |
12
- | `design/.local/perf/page.jsonl` | each board load, as the page saw it: every frame's outcome, every move and why, when the board settled; gestures; errors | `npx marver perf --loads` |
11
+ | `design/.local/perf/reloads.jsonl` | each file change and what it came to: the frames it reached, each one's wait and redraw, in-place updates; page-wide reloads, sent or dropped, and the file behind them; each frame document that booted, and how long it took | `npx marver perf` |
12
+ | `design/.local/perf/page.jsonl` | each board load, as the page saw it: what triggered it, every frame's outcome, every move and why, when the board settled; gestures and what held them up; theme switches, modes, every command you gave, re-renders; errors | `npx marver perf --loads` |
13
13
  | `design/.local/perf/jam.jsonl` | Jam's timings: numbers and fixed codes only, never your words | `npx marver perf --jam` |
14
14
  | `design/.local/perf/runs.jsonl` | each headless run of a board (`npx marver perf run <board>`): one line, its numbers and whether it is valid | `npx marver perf --runs` |
15
15
 
16
16
  `design/.local/` is gitignored, and `marver dev` never serves it. The perf folder is yours alone: mode 700,
17
17
  each file 600 from the moment it is made - and files an earlier version made are tightened when `marver dev`
18
- starts. At start, each log loses its lines older than 14 days, and past its cap its oldest half; a log that
19
- passes its cap while the canvas runs loses its oldest half too. The cap is 2 MB, and 8 MB for `page.jsonl`:
20
- one load of a 120-frame board writes about 140 KB there, most of it moves, so 2 MB held about fourteen such
21
- loads - hours of work, not days. 8 MB holds four times as many.
18
+ starts.
22
19
 
23
- `page.jsonl` holds frame names, node keys and numbers. Error messages and stack lines can hold file paths,
24
- so, like the rest, they stay on this Mac.
20
+ Each log keeps 14 days, whole. It is a live file plus closed segments, `page.<opened>-<newest>.jsonl`: the live file is
21
+ closed - a rename - 24 hours after it was opened or once it passes its size (8 MB for `page.jsonl` and `reloads.jsonl`,
22
+ 2 MB for `jam.jsonl` and `runs.jsonl`). `<newest>` is a safe upper bound on the newest record in it, and a segment is
23
+ deleted once that is 14 days old, at start and hourly: never read, never rewritten. A log whose rate is far past any
24
+ measured day meets its safety cap (128 MB for `page.jsonl`, 48 MB for `reloads.jsonl`, 8 MB each for the others): its
25
+ oldest segments go, and a `dropped` record with `reason: "retention-cap"` says how many records. A file an earlier
26
+ version left is closed as a segment as it stands once it is due. `npx marver perf` reads every segment and the live file as one log.
27
+
28
+ `page.jsonl` holds frame names, node keys, command names, key combinations and numbers. It never holds what you type, a
29
+ comment's words, a setting's value, your clipboard or a request's body. Error and console-error messages are kept as the code
30
+ produced them, 200 characters, and can hold file paths or, in rare cases, text you typed, so, like the rest, they stay on this Mac.
25
31
 
26
32
  ## A board load
27
33
 
@@ -211,11 +217,42 @@ it (long tasks, where the browser has no long-animation-frame). There is no "mis
211
217
  against the median: it would call a steady half-rate gesture smooth. The sampler runs only from a gesture's
212
218
  start to its end; at rest it asks for no frames.
213
219
 
220
+ From 0.30 it also says what the gesture went through and what held it up: `scale` (`from`, `to`, `min`, `max`), `visible` and
221
+ `awake` (frames on screen, and how many were live documents), `by` (the command behind it, if any), and `loaf`, the three
222
+ longest long animation frames, each with its blocking time and the script behind it (its path, or the frame it belongs to).
223
+
224
+ ## One edit, followed
225
+
226
+ Each file change the dev server's watcher sees gets an id, `change`, and `reloads.jsonl` carries it through. `change`: the
227
+ file, when it was seen, what it came to (`reloadN`, `inPlaceN`, `fullReload`). `invalidate`: the send to the page, as a
228
+ `revision`. `invalidated`: what each page found for that revision - how many of the board's nodes were awake, asleep, or held,
229
+ and why (`offscreen`, `leased`, `play`, `loading`, `missing`). Each redraw's `ready`: `queuedMs` (its wait), `bootMs` (its
230
+ redraw), `heldBy` (what kept it waiting). `inplace`: a document that fetched an update in place, with `applied` `false` when Vite
231
+ said it failed and `unknown` otherwise - a fetch does not prove an update applied, and the record does not claim it.
232
+
233
+ A `full-reload` names its file and how it knows (`fileBy`): the one run open, `ambiguous` with `candidates` when several
234
+ overlap, `unknown` when none is. Attribution the code cannot establish is said to be unknown, never guessed; that is a correct
235
+ answer, not a gap.
236
+
237
+ ## Commands
238
+
239
+ Every command you give writes a `cmd` record, however you give it: `cmd` (its name), `via` (`key`, `click`, `menu`, `context`,
240
+ `drag`, `dblclick`, `relay`), `keys` (the combination), `in` (where it arrived), `board`, `frame`, `frames`. A command decided at
241
+ once writes one record, `phase: once`; the others a `start` at the input and an `end` with the same `id`: `outcome` (`done`,
242
+ `failed`, `noop`, `cancelled`, `unobserved`), `why` (a fixed code), `ms`, `steps` (milestones). `done` is bound to the effect:
243
+ C ends when comments mode has reached every visible frame, copy image when the clipboard holds it, opening a board when
244
+ it settled. `unobserved` says only that no signal came by the command's deadline; a later completion is written with `late`.
245
+ A `start` with no `end` reads as `interrupted` when something shows its page or the app ended, otherwise `unmatched`. What a
246
+ command caused (`mode`, `theme`, `load`, `gesture`) names it in `by`. Names and key combinations only: never a value.
247
+
214
248
  ## Errors
215
249
 
216
250
  The page records the errors it sees - its own (an uncaught error or rejection, a crash the shell caught,
217
251
  with the component), a frame's, and the play stage's - with the message and up to three stack lines, 200
218
- characters each. At most 50 per load, the same one at most once a second; those past 50 are counted, not
252
+ characters each. From 0.30 also console errors (`console`; warnings are counted, in `warnings`, with no text), build errors
253
+ (`vite`, with its file and plugin), failed requests (`api`: `route`, `method`, `status`, `ms`, never a query) and elements that
254
+ would not load (`resource`: `tag`, `url` without its query). Each error says the `modes` that were on. A frame limits its noisy
255
+ sources itself, before formatting anything, and counts what it refused. At most 50 per load, the same one at most once a second; those past 50 are counted, not
219
256
  recorded. An error after its load settled or was cut is `late`: a load owns its board for as long as the
220
257
  board stays open. Errors from before the first board mounted are kept apart (`unowned` in the JSON).
221
258
 
@@ -237,6 +274,13 @@ owns the board then; `-` before the first), `seq` (its place in the page's order
237
274
  | `cut` | a load, or a request, ended early | `reason`, `ms`, `lastMove` (as `settled`'s); on a load that mounted, `frames` (on its board then) and `ready` (how many of those were settled or ready); `request` for a request cut before it mounted |
238
275
  | `gesture` | a pan, zoom or layout animation ends | `type` (`pan` / `zoom` / `layout`), `ms`, `frames`, `p50`, `p95`, `max`, `over17ms`, `over33ms`, `longFrames` |
239
276
  | `error` | an error the page sees | `source` (`shell` / `frame` / `stage`), `frame`, `component`, `message`, `stack`, `late` |
277
+ | `theme` | a theme switch ended | `scope` (`view` / `selection` / `play`), `to`, `frames`, `applied`, `p50Ms`, `maxMs`, `late`, `outcome`, `by` |
278
+ | `mode` | a mode was entered or left | `mode`, `phase`, `shownMs` or `firstFrameMs`, `frames`, `outcome`; on exit `heldMs`, `errors`; `by` |
279
+ | `cmd` | a command ([Commands](#commands)) | `phase`, `id`, `cmd`, `via`, `keys`, `in`, `board`, `frame`, `frames`, `arg`; `outcome`, `why`, `ms`, `steps`, `late` |
280
+ | `renders` | a minute's React commits | `minute`, `rows`: `who` (shell, stage, a frame), `commits`, `ms`, `maxMs`, `inGesture` |
281
+ | `warnings` | console warnings counted | `n`, `top` (by node) |
282
+ | `hmr` | the dev server's socket | `phase` (`lost` / `back`), `downMs` |
283
+ | `self` | every 5 minutes it recorded anything | `cpuMs`, `hookMs`, `records`, `bytes`, `dropped`: the recorder's own cost |
240
284
  | `dropped` | records were lost | `n`; `reason: "errors"` for errors past a load's 50 - with no reason, a full queue or a failed send |
241
285
 
242
286
  Times are ms from the load's request. Frame records stop once the load has settled or been cut. `settled.moves`
@@ -284,6 +328,12 @@ otherwise its last records go with `keepalive`, 16 KB at most.
284
328
  The dev server takes them only from the canvas's own page, rebuilds each from the fields its kind allows -
285
329
  strings cut to 200 characters, 512 KB a request - and appends them to `page.jsonl`.
286
330
 
331
+ The recorder measures itself. Every 5 minutes in which it recorded anything, the page writes a `self` record: `cpuMs`,
332
+ `hookMs` by hook (`console`, `theme`, `mode`, `cmd`, `renders`, `send`), `records`, `bytes` and `dropped`. A page's clock
333
+ is coarse (100 µs), so these are sums of coarse readings: right on average, never to the microsecond. To measure the
334
+ cost itself, `npx marver perf run <board> --recorder core` turns off everything but the load tracking a run reads
335
+ ([Headless runs](#headless-runs)); `core` and `full` runs never compare as one, since the level is one of a run's inputs.
336
+
287
337
  ## Headless runs
288
338
 
289
339
  `npx marver perf run <board>` measures a board the same way every time, in the canvas's own headless Chrome
@@ -357,26 +407,46 @@ their reason. `--days <n>` (14 by default) and `--json` as elsewhere.
357
407
  | Option | |
358
408
  |---|---|
359
409
  | `--loads` | each board load in full |
360
- | `--jam` | Jam's timings |
361
- | `run <board>` | a headless run of the board ([Headless runs](#headless-runs)); with `--slow` and `--repeat <n>` (1-5) |
410
+ | `--jam` | Jam's timings; with the Mac app, its live pictures kept, failed and rendered instead |
411
+ | `run <board>` | a headless run of the board ([Headless runs](#headless-runs)); with `--slow`, `--repeat <n>` (1-5) and `--recorder core\|full` (`full`) |
362
412
  | `--runs` | the headless runs, compared inside their cohorts; with `--against <run>` and `--days <n>` (14) |
363
413
  | `--crashes` | the Mac app's crashes and hangs of this repo's canvases (below) |
364
414
  | `--flashes` | the flashes marked in the Mac app, and the white-out candidates (below) |
365
415
  | `--machine` | the machine profiles (below) |
366
- | `--all` | with `--flashes`: also the marks on other canvases or on Home |
367
- | `--days <n>` | how far back `--runs`, `--crashes`, `--flashes` and `--machine` read: 14 by default |
416
+ | `--all` | every canvas this Mac knows, one summary ([below](#every-canvas)); with `--live`, their live files; with `--flashes`, also the marks on other canvases or on Home |
417
+ | `--live` | a tail in the terminal ([below](#a-tail)); with `--kinds a,b` only those kinds, with `--json` the raw lines |
418
+ | `--days <n>` | how far back `--all`, `--runs`, `--crashes`, `--flashes` and `--machine` read: 14 by default |
368
419
  | `--json` | machine-readable |
369
420
  | `--minutes <n>` | how far back to read: 60 by default (24 h with `--jam`) |
370
421
  | `--root <dir>` | the project (default: here) |
371
422
 
372
423
  Plain `npx marver perf` reads the reload log and ends with one line per board load. It and `--loads` leave out a
373
- headless run's loads (`marver perf run`): they say how many.
424
+ headless run's loads (`marver perf run`): they say how many. From 0.30 an edit is its change id, so several lines of one
425
+ change are one edit; older lines, which have none, count as they always did. A record written twice - a retry can do that
426
+ past the server's own check - is read once, by its `page` and `seq`, in every view.
427
+
428
+ ### Every canvas
429
+
430
+ `npx marver perf --all` needs no repo. It lists every canvas this Mac knows - those running, and those the Mac app
431
+ remembers, one per real path - and for each, over `--days`: board loads, how many came after an edit, how many settled,
432
+ all-ready p50 / p90 / max, the most frames, the largest heap, the worst gesture p95 (p50 / max), edit to last redraw,
433
+ page-wide reloads whose file is ambiguous or unknown, re-renders (React's render work only, not layout or paint), the
434
+ longest theme switch, comments mode's shown p50, errors by source, and commands failed, unobserved or interrupted. A canvas
435
+ with no records says so. Then the app's: launches and the time to the first canvas, crashes, hangs, flashes, white-out
436
+ candidates by what they happened during, and the window time the detector could not cover, and why. `--json` emits the same.
437
+
438
+ ### A tail
439
+
440
+ `npx marver perf --live` follows this repo's live files (`--all`: every known canvas's) and the app's `app.jsonl` from now,
441
+ one line per record, until Ctrl-C. It is about 3 s behind: the page's 2 s batch and the app's 2 s flush. A file that closes
442
+ as a segment is read to its end before the new one is opened, so nothing is skipped or read twice.
374
443
 
375
444
  ## The Mac app's half
376
445
 
377
446
  The Mac app (0.2 and later) records what only the app can see, in `~/.marver/perf/`: `app.jsonl` (Marver Dev writes
378
447
  `app-dev.jsonl`; one writer per file), one line per event with `{ v, ts, kind, app, seq, flavour, machine }` - `app`
379
- names the launch, `seq` counts its lines, `machine` the profile the line was written on. Every 5 s the app samples its
448
+ names the launch, `seq` counts its lines, `machine` the profile the line was written on. From app 1.0.1 the `sample` and
449
+ `agx` lines are in `samples.jsonl` (`samples-dev.jsonl`), their rows unchanged, and one `seq` runs across both files. Every 5 s the app samples its
380
450
  processes (`getAppMetrics()`: CPU from cumulative time, memory as each process's working set, a canvas renderer's own
381
451
  footprint from its page, the memory pressure level), keeps the last minute in memory and writes one `sample` line a
382
452
  minute; and it records renderer and GPU process ends, hangs, GPU changes, power and thermal events, each tab's state
@@ -388,9 +458,19 @@ its `tab`, `ws`, `commit` and `page` - the page id the shell's hello sent, which
388
458
  error main did not catch: a `main-error` line, in `app-dev.jsonl` for Marver Dev, written the moment it happens).
389
459
  `machine/<hash>.json` holds one profile per distinct machine state (the chip, the displays and their rates, the
390
460
  GPU's renderer, power): a display change, the window moved to another display, or a GPU fallback makes a new one, and
391
- old lines keep theirs. The app keeps 14 days of it (`keepPerfDays`, pruned a few seconds after launch and then
392
- daily), at most 5 MB a file, 50 flash pictures and 10 crash reports; a profile a headless run wrote stays at least 14
393
- days, as long as a repo's `runs.jsonl` may name it.
461
+ old lines keep theirs. The app keeps 14 days of it (`keepPerfDays`), each file a live file plus closed segments as above
462
+ (4 MB or 24 h for `app.jsonl`, cap 16 MB; 8 MB or 24 h for `samples.jsonl`, cap 128 MB), checked a few seconds after
463
+ launch and then hourly; 50 flash pictures and 10 crash reports; a profile a headless run wrote stays at least 14 days, as
464
+ long as a repo's `runs.jsonl` may name it.
465
+
466
+ Each launch writes one `launch` line, whatever the recorder setting: ms from process start to ready, to the window shown,
467
+ and to the first local canvas uncovered, with that canvas's `page`, which joins its boot `load`; what was restored; and with
468
+ no canvas after 30 s, why (`home`, `none-restored`, `timeout`).
469
+
470
+ The white-out detector watches more than gestures: a tab being shown, and with a 0.30 canvas a board load, a theme switch
471
+ and an on-screen frame's reload. Outside gestures it takes at most 3 s of capture per rolling minute, each capture charged at
472
+ its true length, and a window ends at 10 s. A minute's `sample` carries `whiteout`: its windows, captures, capture time, and
473
+ the time it could not cover, by why (`stage`, a play stage covering the canvas; `budget`; `hidden`). A candidate says `why`.
394
474
 
395
475
  `marver perf` joins the two halves by `page`, so each app event lands on the board load it happened in:
396
476
 
@@ -407,7 +487,7 @@ days, as long as a repo's `runs.jsonl` may name it.
407
487
  that it was pruned since. A mark is dated by the moment you pressed it (the state the app took then), not by its
408
488
  line, which is written a second or two later, once the picture and the GPU figures are in. The picture is the app's views as the app stacks them, not the screen: it holds no traffic
409
489
  lights and may miss a flash that happens in the compositor. Marks on Home or other canvases are counted (`--all`
410
- shows them). White-out candidates, found automatically during gestures, are listed apart: automatic, not verified.
490
+ shows them). White-out candidates, found automatically, are listed apart with what they happened during: automatic, not verified.
411
491
  - `--machine`: the profiles, grouped by host (the app and a headless run of one Mac share its `hostHash`), which is
412
492
  current, and how many records and runs name each.
413
493
 
package/docs/publish.md CHANGED
@@ -258,6 +258,13 @@ falls back to your `package.json` name and the canvas shell to the root
258
258
  directory name - which inside a container is usually `app`, so every unnamed
259
259
  containerised canvas reports as one campaign.
260
260
 
261
+ Your logo - `share.logo`, else the first of `design/logo.svg|png`, `public/logo.svg|png`
262
+ and `public/favicon.svg|png|ico` - ships with the build. The gate shows it, and since
263
+ 0.29 it is the only tab icon of the canvas and the gate, so a browser tab (and the Mac
264
+ app's tab for a shared canvas) wears it rather than Marver's mark. With no logo, the tab
265
+ wears Marver's mark. A canvas built before 0.29 keeps Marver's mark until you build and
266
+ deploy it again.
267
+
261
268
  ## Railway (the one-pager)
262
269
 
263
270
  1. Push your repo to GitHub with the Dockerfile below at its root, and create a Railway
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marver-design/marver",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "description": "The agent-native design canvas. A design/ folder, one command, a canvas of live frames built from your repo's real components - comment @marver and your own coding agent does the work. The tool ships no AI.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -8,6 +8,7 @@
8
8
  import { createInspect } from './inspect.js'
9
9
  import { createKeys } from './keys.js'
10
10
  import { createRecorder } from './trail.js'
11
+ import { startDocumentSignals } from './signals.js'
11
12
 
12
13
  const isHtmlFrame = new URL(import.meta.url).searchParams.get('html') === '1'
13
14
  // same-origin parent (the shell): a fixed target origin keeps posts (incl. picked anchor
@@ -23,6 +24,9 @@ window.__mvBoot = BOOT
23
24
  // the URL revision the shell gave this document (its generation guard)
24
25
  const GEN = new URLSearchParams(location.search).get('r') ?? ''
25
26
  post({ type: 'sh:boot', id, gen: GEN, boot: BOOT })
27
+ // the recorder's hooks in this document (spec 30 #28, #32, #33: console, element errors, their budget), before anything
28
+ // the frame's own code runs; null where nothing records (a published canvas, a `core` run)
29
+ const signals = startDocumentSignals({ post, id, gen: GEN, boot: BOOT })
26
30
  /** An error's first three stack lines (Chrome's "at …", else "fn@url:line:col"), when it has them. */
27
31
  const stackOf = (err) => {
28
32
  if (typeof err?.stack !== 'string') return undefined
@@ -33,14 +37,15 @@ const stackOf = (err) => {
33
37
  }
34
38
 
35
39
  // theme lands as BOTH signals: [data-theme] plus the `dark` class Tailwind/shadcn key on
36
- const setTheme = (theme) => {
40
+ const setTheme = (theme, t) => {
37
41
  document.documentElement.dataset.theme = theme
38
42
  document.documentElement.classList.toggle('dark', theme === 'dark')
39
- // the shell sleeps a frame only under the theme it has actually painted: report it, two frames later
40
- requestAnimationFrame(() => requestAnimationFrame(() => post({ type: 'sh:theme-applied', id, theme })))
43
+ // the shell sleeps a frame only under the theme it has actually painted: report it, two frames later - with the
44
+ // switch's transition and this document's id (spec 30 #21)
45
+ requestAnimationFrame(() => requestAnimationFrame(() => post({ type: 'sh:theme-applied', id, theme, boot: BOOT, ...(typeof t === 'string' ? { t } : {}) })))
41
46
  }
42
47
  // the theme this document booted with (the URL's) counts as applied
43
- requestAnimationFrame(() => requestAnimationFrame(() => post({ type: 'sh:theme-applied', id, theme: new URLSearchParams(location.search).get('theme') ?? 'light' })))
48
+ requestAnimationFrame(() => requestAnimationFrame(() => post({ type: 'sh:theme-applied', id, theme: new URLSearchParams(location.search).get('theme') ?? 'light', boot: BOOT })))
44
49
 
45
50
  if (isHtmlFrame) {
46
51
  const theme = new URLSearchParams(location.search).get('theme')
@@ -66,7 +71,7 @@ const keys = createKeys({ post, trusted })
66
71
  // laser / pick / anchor / highlight - one shared controller (see inspect.js). The id is
67
72
  // static here (one iframe per frame); onModeChange re-reports the lease when a mode flips.
68
73
  // Inside a capture a laser click is the capture's pick, not a path copy.
69
- const inspect = createInspect({ post, getId: () => id, onModeChange: () => reportInteraction(), onLaserPick: (el, e) => recorder.pick(el, e) })
74
+ const inspect = createInspect({ post, getId: () => id, getBoot: () => BOOT, onModeChange: () => reportInteraction(), onLaserPick: (el, e) => recorder.pick(el, e) })
70
75
 
71
76
  document.addEventListener('mouseover', () => { if (!pointerInside) { pointerInside = true; reportInteraction() } })
72
77
  document.addEventListener('mouseout', (e) => { if (!e.relatedTarget) { pointerInside = false; reportInteraction() } })
@@ -87,14 +92,18 @@ document.addEventListener('click', (e) => {
87
92
  // consumed and forwarded it already, so this never sees it
88
93
  document.addEventListener('keydown', (e) => { if (e.key === 'Escape') post({ type: 'sh:exit-interact' }) })
89
94
 
90
- window.addEventListener('error', (e) => post({ type: 'sh:error', id, gen: GEN, boot: BOOT, message: String(e.message || e.error), stack: stackOf(e.error) }))
91
- window.addEventListener('unhandledrejection', (e) => post({ type: 'sh:error', id, gen: GEN, boot: BOOT, message: `unhandled rejection: ${e.reason}`, stack: stackOf(e.reason) }))
95
+ // A window error or an unhandled rejection always reaches the shell: `sh:error` is what marks the frame failed
96
+ // (App.tsx), and the recorder never stands in the way of that (spec 30 #5). It spends the document's budget (#33), which
97
+ // limits only the telemetry beside it - console and resource errors; the shell's 50 a load and its duplicate rule bound
98
+ // the `error` records.
99
+ window.addEventListener('error', (e) => { signals?.take('frame', true); post({ type: 'sh:error', id, gen: GEN, boot: BOOT, message: String(e.message || e.error), stack: stackOf(e.error) }) })
100
+ window.addEventListener('unhandledrejection', (e) => { signals?.take('frame', true); post({ type: 'sh:error', id, gen: GEN, boot: BOOT, message: `unhandled rejection: ${e.reason}`, stack: stackOf(e.reason) }) })
92
101
 
93
102
  window.addEventListener('message', (e) => {
94
103
  // commands come from the SHELL (parent) only - embedded app content must not flip the theme
95
104
  if (e.source !== window.parent || window.parent === window) return
96
105
  if (e.origin && e.origin !== location.origin) return // a navigated frame must not spoof commands
97
- if (e?.data?.type === 'sh:set-theme') setTheme(e.data.theme)
106
+ if (e?.data?.type === 'sh:set-theme') setTheme(e.data.theme, e.data.t)
98
107
  // B0.2: interact/play target owns its own wheel; passive frames forward it to the canvas
99
108
  if (e?.data?.type === 'sh:interactive') {
100
109
  interactiveOn = !!e.data.on
@@ -0,0 +1,124 @@
1
+ /**
2
+ * In-place updates, what this document saw and no more (spec 30 #15). Vite's client imports `<acceptedPath>?t=<timestamp>`
3
+ * only in a document whose module map holds the module, so a Resource Timing entry for that URL says this document
4
+ * fetched the update; a document that did not writes nothing. Updates only the frame host's registry accepts are left
5
+ * out: it accepts them without applying them (registry.ts), as main.tsx's `sh:hmr` filter does.
6
+ *
7
+ * What it cannot say, it does not: a fetch does not prove the update applied (Vite catches a failed import and still
8
+ * reaches `afterUpdate`), and the next commit need not be the refresh's (Fast Refresh is debounced, an unrelated update
9
+ * can commit first). So `applied` is never true: `'unknown'`, or `false` when Vite's own failure message for that path
10
+ * reached this document's console during the update.
11
+ *
12
+ * Runs only with a hot module at the full level (main.tsx). An observer, not the timeline's buffer: a frame's modules can
13
+ * fill the 250 entries Resource Timing keeps, and an observer still receives what the buffer refuses.
14
+ */
15
+ import { RELOAD_BOUNDS } from '../../shared/perf-records.ts'
16
+ import type { InplaceMsg } from './messages.ts'
17
+
18
+ interface Update { type?: string; path?: string; acceptedPath?: string; timestamp?: number }
19
+ /** The fields only this module knows; main.tsx adds the frame and the document. */
20
+ export type InplaceReport = Omit<InplaceMsg, 'id' | 'boot'>
21
+
22
+ let waiters: ((at: number) => void)[] = []
23
+ /** The frame root committed (the Profiler in main.tsx). */
24
+ export function rootCommitted(): void {
25
+ if (!waiters.length) return
26
+ const at = performance.now()
27
+ for (const w of waiters.splice(0)) w(at)
28
+ }
29
+ /** The next commit's time, or undefined past the wait. */
30
+ function nextCommit(ms: number): Promise<number | undefined> {
31
+ return new Promise((resolve) => {
32
+ const w = (at: number) => { clearTimeout(t); resolve(at) }
33
+ const t = setTimeout(() => { waiters = waiters.filter((x) => x !== w); resolve(undefined) }, ms)
34
+ waiters.push(w)
35
+ })
36
+ }
37
+
38
+ const isRegistry = (u: Update) => (u.acceptedPath ?? u.path ?? '').includes('/frame-host/registry')
39
+ const pathOf = (u: Update) => (u.acceptedPath ?? u.path ?? '').split('?')[0]
40
+ /** The URL Vite's client imports (client.mjs `importUpdatedModule`): this update's path, this update's timestamp. */
41
+ function fetchedBy(u: Update, url: URL): boolean {
42
+ return url.pathname.endsWith(pathOf(u)) && url.searchParams.get('t') === String(u.timestamp)
43
+ }
44
+
45
+ /** Vite's messages run one at a time (its client queues them), so one update round is open at most. It holds what its own
46
+ * updates left behind, no more - the observer sees every resource this document loads - and it ends by
47
+ * `vite:afterUpdate`, or with none (an accept callback threw, an import still pending) by the next update or
48
+ * `inplaceRoundMs`. Those last two write what was known by then, each update fetched so far, `noAfterUpdate`: an update
49
+ * that was seen is never lost silently. A `vite:afterUpdate` after that has no round, and writes nothing more. */
50
+ export function watchInplace(hot: { on(event: string, cb: (p: any) => void): void }, post: (m: InplaceReport) => void): void {
51
+ interface Round { at: number; updates: Update[]; fetched: Set<Update>; take: () => void; failed: Set<string>; close: () => void }
52
+ let round: Round | null = null
53
+ const appliedOf = (r: Round, u: Update) => (r.failed.has(u.acceptedPath ?? u.path ?? '') ? false as const : 'unknown' as const)
54
+ /** A round `afterUpdate` never came for: closed, and what it knew written now. */
55
+ const giveUp = (r: Round) => {
56
+ if (round === r) round = null
57
+ r.take()
58
+ r.close()
59
+ const applyMs = Math.round(performance.now() - r.at)
60
+ for (const u of r.updates) if (r.fetched.has(u)) post({ type: 'sh:inplace', hmrTs: u.timestamp!, applyMs, applied: appliedOf(r, u), noAfterUpdate: true })
61
+ }
62
+
63
+ hot.on('vite:beforeUpdate', (p: { updates?: Update[] }) => {
64
+ try {
65
+ if (round) giveUp(round)
66
+ const updates = (p.updates ?? []).filter((u) => u.type === 'js-update' && !isRegistry(u) && typeof u.timestamp === 'number')
67
+ if (!updates.length) return
68
+ const fetched = new Set<Update>()
69
+ const note = (entries: readonly PerformanceEntry[]) => {
70
+ for (const e of entries) {
71
+ let url: URL
72
+ try { url = new URL(e.name) } catch { continue }
73
+ for (const u of updates) if (fetchedBy(u, url)) fetched.add(u)
74
+ }
75
+ }
76
+ const observer = new PerformanceObserver((list) => note(list.getEntries()))
77
+ observer.observe({ type: 'resource' })
78
+ const paths = new Set(updates.map((u) => u.acceptedPath ?? u.path ?? ''))
79
+ const failed = new Set<string>()
80
+ const original = console.error
81
+ let open = true
82
+ // only while an update is on its way, and the original always runs: Vite's own words for a failed import
83
+ // (client.mjs `warnFailedUpdate`: `[vite] Failed to reload <acceptedPath>. …`), for this round's paths
84
+ const watching = function (this: unknown, ...a: unknown[]) {
85
+ original.apply(this, a)
86
+ if (!open) return
87
+ for (const x of a) {
88
+ if (typeof x !== 'string' || !x.startsWith('Failed to reload ')) continue
89
+ const path = x.slice('Failed to reload '.length).split('. ')[0]
90
+ if (paths.has(path)) failed.add(path)
91
+ }
92
+ }
93
+ console.error = watching
94
+ const close = () => {
95
+ open = false
96
+ clearTimeout(timer)
97
+ observer.disconnect()
98
+ if (console.error === watching) console.error = original // a frame's own replacement meanwhile stays
99
+ }
100
+ const r: Round = { at: performance.now(), updates, fetched, take: () => note(observer.takeRecords()), failed, close }
101
+ const timer = setTimeout(() => { try { giveUp(r) } catch { /* the same */ } }, RELOAD_BOUNDS.inplaceRoundMs)
102
+ round = r
103
+ } catch { /* the recorder never stands in the way */ }
104
+ })
105
+
106
+ hot.on('vite:afterUpdate', () => {
107
+ const r = round
108
+ round = null
109
+ if (!r) return
110
+ try {
111
+ const after = performance.now()
112
+ r.take()
113
+ r.close()
114
+ for (const u of r.updates) {
115
+ if (!r.fetched.has(u)) continue
116
+ const applied = appliedOf(r, u)
117
+ void nextCommit(RELOAD_BOUNDS.commitWaitMs).then((at) => post({
118
+ type: 'sh:inplace', hmrTs: u.timestamp!, applyMs: Math.round(after - r.at), applied,
119
+ ...(at !== undefined ? { nextObservedCommitMs: Math.round(at - after) } : {}),
120
+ }))
121
+ }
122
+ } catch { /* the same */ }
123
+ })
124
+ }
@@ -2,6 +2,7 @@
2
2
  export function createInspect(opts: {
3
3
  post: (msg: Record<string, unknown>) => void
4
4
  getId: () => string
5
+ getBoot?: () => string | undefined
5
6
  onModeChange?: (laser: boolean, pick: boolean) => void
6
7
  onLaserPick?: (el: Element, e: MouseEvent) => boolean
7
8
  }): { modeActive: () => boolean; isLaser: () => boolean; isPick: () => boolean; dispose: () => void }
@@ -10,17 +10,18 @@
10
10
  // touches laser/pick/anchor/highlight. It self-installs the pointer + message
11
11
  // listeners and returns { modeActive } so the host can guard its own nav clicks.
12
12
  //
13
- // createInspect({ post, getId, onModeChange?, onLaserPick? })
13
+ // createInspect({ post, getId, getBoot?, onModeChange?, onLaserPick? })
14
14
  // post(msg) send a message up to the shell (parent)
15
15
  // getId() the frame id to stamp on posts (static on canvas, the
16
16
  // current stage frame in play - it swaps without reload)
17
+ // getBoot?() this document's boot id, echoed in sh:mode-applied (spec 30 #26)
17
18
  // onModeChange?() called after any laser/pick flip (the canvas bridge uses it
18
19
  // to report its interaction lease; the stage ignores it)
19
20
  // onLaserPick?(el, e) a laser click; returning true means a capture took it as its pick
20
21
  // (trail.js) - no sh:laser-copy then
21
22
  //
22
23
  // shell -> frame : sh:laser · sh:pick · sh:copy-ok · sh:resolve-anchors · sh:highlight-anchor
23
- // frame -> shell : sh:frame-down · sh:picked · sh:laser-copy · sh:anchor-rects
24
+ // frame -> shell : sh:frame-down · sh:picked · sh:laser-copy · sh:anchor-rects · sh:mode-applied
24
25
  //
25
26
  // Anchors (spec 26): only VISIBLE elements ever match, a pin attaches at the end of its element's
26
27
  // first rendered line (a person's pin: where they clicked), and `window.__mvAnchorCheck` is the
@@ -323,7 +324,7 @@ const checkTarget = ({ on, at, nth } = {}, others = []) => {
323
324
  }
324
325
  if (typeof window !== 'undefined') window.__mvAnchorCheck = checkTarget
325
326
 
326
- export function createInspect({ post, getId, onModeChange, onLaserPick }) {
327
+ export function createInspect({ post, getId, getBoot, onModeChange, onLaserPick }) {
327
328
  let laserOn = false, pickOn = false
328
329
  // the laser as inspect (⌥L): every element outlined. Off, the laser is a pointer - the element under the cursor lit,
329
330
  // as comment mode lights it
@@ -526,13 +527,20 @@ body [data-mv-hover] { outline: 2px solid hsl(var(--mv-hue) 95% 45%); outline-of
526
527
  applyLock(resolveAnchor(highlightAnchor), highlightAnchor?.el?.hue)
527
528
  }
528
529
 
530
+ // spec 30 #26: a mode change that names its transition is acknowledged two animation frames after it applied - this
531
+ // document's modes as they stand then. A shell that records nothing sends no `t`, and hears nothing back.
532
+ const ackMode = (t) => {
533
+ if (typeof t !== 'string') return
534
+ requestAnimationFrame(() => requestAnimationFrame(() => post({ type: 'sh:mode-applied', id: getId(), t, boot: getBoot?.() ?? '', laser: laserOn, inspect: inspectOn, pick: pickOn })))
535
+ }
536
+
529
537
  const onMessage = (e) => {
530
538
  if (e.source !== window.parent || window.parent === window) return
531
539
  if (e.origin && e.origin !== location.origin) return // a navigated frame must not spoof shell commands
532
540
  const m = e?.data
533
541
  if (!m || typeof m !== 'object') return
534
542
  // (a shell from before 0.26.1 sends no `inspect`: its laser is the outlined one)
535
- if (m.type === 'sh:laser') { laserOn = !!m.on; inspectOn = laserOn && (m.inspect === undefined ? true : !!m.inspect); applyModes(); onModeChange?.(laserOn, pickOn) }
543
+ if (m.type === 'sh:laser') { laserOn = !!m.on; inspectOn = laserOn && (m.inspect === undefined ? true : !!m.inspect); applyModes(); onModeChange?.(laserOn, pickOn); ackMode(m.t) }
536
544
  else if (m.type === 'sh:pick') {
537
545
  pickOn = !!m.on; pickQuiet = !!m.quiet; applyModes()
538
546
  if (pickQuiet) clearHover() // a hover lit before the toggle landed must not linger
@@ -540,6 +548,7 @@ body [data-mv-hover] { outline: 2px solid hsl(var(--mv-hue) 95% 45%); outline-of
540
548
  // a shell-owned highlight (highlightAnchor set, e.g. #5) survives
541
549
  if (!pickOn && !highlightAnchor) clearLock()
542
550
  onModeChange?.(laserOn, pickOn)
551
+ ackMode(m.t)
543
552
  }
544
553
  else if (m.type === 'sh:copy-ok') showCopied(m.seq)
545
554
  else if (m.type === 'sh:highlight-anchor') {
@@ -3,12 +3,15 @@
3
3
  * Boot failures (theme, providers, layouts, the frame itself) render a plain-DOM error card
4
4
  * and post sh:error; an ErrorBoundary catches render-time throws the same way.
5
5
  */
6
- import { Component, createElement, useLayoutEffect, type ReactNode } from 'react'
6
+ import { Component, createElement, Profiler, useLayoutEffect, type ReactNode } from 'react'
7
7
  import { createRoot } from 'react-dom/client'
8
8
 
9
9
  import './bridge.js'
10
+ import { frameRenders } from './signals.js'
10
11
  import { frameFile, frames, layoutChain, layouts, providers } from './registry.ts'
11
12
  import { SLIDE_DOC_CSS } from '../const.ts'
13
+ import { fullRecorder } from '../recorder-level.ts'
14
+ import { rootCommitted, watchInplace } from './inplace.ts'
12
15
 
13
16
  const params = new URLSearchParams(location.search)
14
17
  const id = params.get('id') ?? ''
@@ -70,7 +73,8 @@ class Boundary extends Component<{ children: ReactNode }, { err: Error | null }>
70
73
  * outermost element runs after every child's, before the first paint of the tree). */
71
74
  function Committed({ onCommit, children }: { onCommit: () => void; children?: ReactNode }) {
72
75
  useLayoutEffect(onCommit, [])
73
- return children
76
+ // spec 30 #15: an in-place update's next observed commit (dev, the full level; a published frame has no hot module)
77
+ return import.meta.hot && fullRecorder() ? createElement(Profiler, { id: 'mv-inplace', onRender: rootCommitted }, children) : children
74
78
  }
75
79
 
76
80
  async function boot() {
@@ -113,7 +117,10 @@ async function boot() {
113
117
  // by a superseded document (one it auto-renavigated past) - a WindowProxy survives navigation, so
114
118
  // a stale ready could otherwise mark a reloading frame ready. Mirrors the sh:measure generation guard.
115
119
  const ready = () => { phases.commit = Math.round(performance.now()); post({ type: 'sh:ready', id, gen, boot: docId(), doc: document.querySelector('meta[name="mv-doc"]')?.getAttribute('content') ?? '', meta: frameMod.meta && typeof frameMod.meta === 'object' ? frameMod.meta : undefined, phases }) }
116
- createRoot(document.getElementById('root')!).render(createElement(Boundary, null, createElement(Committed, { onCommit: ready }, tree)))
120
+ const app = createElement(Boundary, null, createElement(Committed, { onCommit: ready }, tree))
121
+ // the recorder's minute of this root's commits (spec 30 #36): none where nothing records
122
+ const onRender = frameRenders(post, id, docId)
123
+ createRoot(document.getElementById('root')!).render(onRender ? createElement(Profiler, { id: 'frame', onRender }, app) : app)
117
124
  } catch (err) {
118
125
  fail((err as Error).message, err)
119
126
  }
@@ -128,3 +135,5 @@ boot()
128
135
  if (import.meta.hot) import.meta.hot.on('vite:afterUpdate', (p: { updates?: { acceptedPath?: string; path?: string }[] }) => {
129
136
  if (p.updates?.some((u) => !(u.acceptedPath ?? u.path ?? '').includes('/frame-host/registry'))) post({ type: 'sh:hmr', id })
130
137
  })
138
+ // spec 30 #15: what this document saw of an update applied in place, and only if it fetched it
139
+ if (import.meta.hot && fullRecorder()) watchInplace(import.meta.hot, (m) => post({ ...m, id, boot: docId() }))