@alwaysmeticulous/debug-workspace 2.275.1 → 2.276.2

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 (36) hide show
  1. package/README.md +8 -1
  2. package/dist/__tests__/extract-screenshot-dom-files.spec.d.ts +1 -0
  3. package/dist/__tests__/extract-screenshot-dom-files.spec.js +59 -0
  4. package/dist/__tests__/extract-screenshot-dom-files.spec.js.map +1 -0
  5. package/dist/__tests__/fetch-dom-diffs.spec.d.ts +1 -0
  6. package/dist/__tests__/fetch-dom-diffs.spec.js +316 -0
  7. package/dist/__tests__/fetch-dom-diffs.spec.js.map +1 -0
  8. package/dist/download-debug-data.js +25 -11
  9. package/dist/download-debug-data.js.map +1 -1
  10. package/dist/extract-screenshot-dom-files.d.ts +6 -0
  11. package/dist/extract-screenshot-dom-files.js +104 -0
  12. package/dist/extract-screenshot-dom-files.js.map +1 -0
  13. package/dist/fetch-dom-diffs.d.ts +36 -0
  14. package/dist/fetch-dom-diffs.js +338 -0
  15. package/dist/fetch-dom-diffs.js.map +1 -0
  16. package/dist/generate-debug-derived-files.js +57 -91
  17. package/dist/generate-debug-derived-files.js.map +1 -1
  18. package/dist/generate-debug-workspace.d.ts +10 -2
  19. package/dist/generate-debug-workspace.js +81 -84
  20. package/dist/generate-debug-workspace.js.map +1 -1
  21. package/dist/index.d.ts +2 -0
  22. package/dist/index.js +7 -3
  23. package/dist/index.js.map +1 -1
  24. package/dist/pipeline.d.ts +2 -1
  25. package/dist/pipeline.js +6 -5
  26. package/dist/pipeline.js.map +1 -1
  27. package/dist/replay-walk.d.ts +40 -0
  28. package/dist/replay-walk.js +57 -0
  29. package/dist/replay-walk.js.map +1 -0
  30. package/dist/resolve-debug-context.js +12 -15
  31. package/dist/resolve-debug-context.js.map +1 -1
  32. package/dist/screenshot-identifier.d.ts +19 -0
  33. package/dist/screenshot-identifier.js +51 -0
  34. package/dist/screenshot-identifier.js.map +1 -0
  35. package/dist/templates/CLAUDE.md +115 -78
  36. package/package.json +6 -6
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="705e4ec9-bebe-5a1f-a0c7-1ed6c389306f")}catch(e){}}();
3
+
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.screenshotIdentifierToBackendName = exports.screenshotIdentifierToFilename = exports.screenshotIdentifierToBaseName = void 0;
6
+ /**
7
+ * Single source of truth for the on-disk screenshot basename (no extension)
8
+ * derived from a timeline/screenshot `identifier` object.
9
+ */
10
+ const screenshotIdentifierToBaseName = (identifier) => {
11
+ const variantPortion = identifier.variant === "redacted" ? ".redacted" : "";
12
+ if (identifier.type === "end-state") {
13
+ return identifier.logicVersion == null
14
+ ? `final-state${variantPortion}`
15
+ : `final-state-v${identifier.logicVersion}${variantPortion}`;
16
+ }
17
+ if (identifier.type === "after-event" && identifier.eventNumber != null) {
18
+ const eventIndexStr = identifier.eventNumber.toString().padStart(5, "0");
19
+ return identifier.logicVersion == null
20
+ ? `screenshot-after-event-${eventIndexStr}${variantPortion}`
21
+ : `screenshot-after-event-${eventIndexStr}-v${identifier.logicVersion}${variantPortion}`;
22
+ }
23
+ return null;
24
+ };
25
+ exports.screenshotIdentifierToBaseName = screenshotIdentifierToBaseName;
26
+ const screenshotIdentifierToFilename = (identifier) => {
27
+ const baseName = (0, exports.screenshotIdentifierToBaseName)(identifier);
28
+ return baseName == null ? undefined : `${baseName}.png`;
29
+ };
30
+ exports.screenshotIdentifierToFilename = screenshotIdentifierToFilename;
31
+ /**
32
+ * Name accepted by the backend's replay-diff screenshot endpoints — differs
33
+ * from the on-disk basename: no zero-padding, no `logicVersion` suffix, and
34
+ * `end-state` instead of `final-state`. Returns `null` for redacted variants
35
+ * (backend naming unverified) and unknown types.
36
+ */
37
+ const screenshotIdentifierToBackendName = (identifier) => {
38
+ if (identifier.variant === "redacted") {
39
+ return null;
40
+ }
41
+ if (identifier.type === "end-state") {
42
+ return "end-state";
43
+ }
44
+ if (identifier.type === "after-event" && identifier.eventNumber != null) {
45
+ return `after-event-${identifier.eventNumber}`;
46
+ }
47
+ return null;
48
+ };
49
+ exports.screenshotIdentifierToBackendName = screenshotIdentifierToBackendName;
50
+ //# sourceMappingURL=screenshot-identifier.js.map
51
+ //# debugId=705e4ec9-bebe-5a1f-a0c7-1ed6c389306f
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenshot-identifier.js","sources":["../src/screenshot-identifier.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAOA;;;GAGG;AACI,MAAM,8BAA8B,GAAG,CAC5C,UAAgC,EACjB,EAAE;IACjB,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5E,IAAI,UAAU,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACpC,OAAO,UAAU,CAAC,YAAY,IAAI,IAAI;YACpC,CAAC,CAAC,cAAc,cAAc,EAAE;YAChC,CAAC,CAAC,gBAAgB,UAAU,CAAC,YAAY,GAAG,cAAc,EAAE,CAAC;IACjE,CAAC;IAED,IAAI,UAAU,CAAC,IAAI,KAAK,aAAa,IAAI,UAAU,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;QACxE,MAAM,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACzE,OAAO,UAAU,CAAC,YAAY,IAAI,IAAI;YACpC,CAAC,CAAC,0BAA0B,aAAa,GAAG,cAAc,EAAE;YAC5D,CAAC,CAAC,0BAA0B,aAAa,KAAK,UAAU,CAAC,YAAY,GAAG,cAAc,EAAE,CAAC;IAC7F,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAnBW,QAAA,8BAA8B,kCAmBzC;AAEK,MAAM,8BAA8B,GAAG,CAC5C,UAAgC,EACZ,EAAE;IACtB,MAAM,QAAQ,GAAG,IAAA,sCAA8B,EAAC,UAAU,CAAC,CAAC;IAC5D,OAAO,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,QAAQ,MAAM,CAAC;AAC1D,CAAC,CAAC;AALW,QAAA,8BAA8B,kCAKzC;AAEF;;;;;GAKG;AACI,MAAM,iCAAiC,GAAG,CAC/C,UAAgC,EACjB,EAAE;IACjB,IAAI,UAAU,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACpC,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,aAAa,IAAI,UAAU,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;QACxE,OAAO,eAAe,UAAU,CAAC,WAAW,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAbW,QAAA,iCAAiC,qCAa5C","debugId":"705e4ec9-bebe-5a1f-a0c7-1ed6c389306f"}
@@ -68,10 +68,18 @@ Each replay directory (`debug-data/replays/{head,base,other}/<replayId>/`) conta
68
68
  - `snapshotted-assets/` -- Static assets (JS/CSS) that were captured and used during replay.
69
69
  **Only present if `snapshotAssets` was enabled** -- check `launchBrowserAndReplayParams.json`
70
70
  for the `snapshotAssets` field before assuming this directory exists.
71
-
72
- Note: `screenshots/` are not copied into the workspace (they are large binary PNGs). Reference
73
- screenshot paths via `screenshotMap` in `context.json` instead; the actual files are in the
74
- replay cache at `~/.meticulous/replays/<replayId>/screenshots/`.
71
+ - `screenshots/<name>.metadata.json` -- Per-screenshot metadata, including the captured `before.dom`
72
+ (full HTML at screenshot time) and, when an interaction followed, `after.dom`.
73
+ - `screenshots/<name>.html` -- The `before.dom` extracted to a standalone HTML file. Prefer reading
74
+ this over grepping the metadata JSON. The one-line `<!-- screenshot=... url=... vt=... -->`
75
+ header at the top is for humans only and is not used when computing DOM diffs.
76
+ - `screenshots/<name>.after.html` -- Same for `after.dom`, only present when the metadata
77
+ carried a non-null `after` side.
78
+
79
+ Note: screenshot PNGs (the binary images themselves) are **not** copied into the workspace --
80
+ only the `*.metadata.json` files that carry their DOM and the `.html` files extracted from
81
+ them. Reference PNG paths via `screenshotMap` in `context.json`; the actual PNG files are in
82
+ the replay cache at `~/.meticulous/replays/<replayId>/screenshots/`.
75
83
 
76
84
  Per-replay generated summaries:
77
85
 
@@ -98,9 +106,6 @@ Per-replay generated summaries:
98
106
  timeline: total entries, virtual time range, screenshot timestamps, event kind breakdown.
99
107
  - `debug-data/formatted-assets/<role>/<replayId>/` -- Pretty-printed JS/CSS from
100
108
  `snapshotted-assets/`. Only present if snapshotted assets exist. Use these instead of the originals.
101
- - `context.json` fields: `screenshotMap` (screenshot-to-timestamp mapping), `replayComparison`
102
- (side-by-side event counts, virtual time, screenshot count), `fileMetadata` (byte sizes and
103
- line counts for key files).
104
109
 
105
110
  ### Diff Files (only when comparing replays)
106
111
 
@@ -126,6 +131,26 @@ or `meticulous debug replay` with `--baseReplayId`.
126
131
  - `debug-data/screenshot-context/<id>.txt` -- Only generated with `--screenshot`. Shows ±30 lines
127
132
  of `logs.deterministic.txt` surrounding the screenshot for both head and base, with the
128
133
  screenshot line marked `>>>`.
134
+ - `debug-data/dom-diffs/<headReplayId>-vs-<baseReplayId>-<screenshotBaseName>.diff` -- **Start
135
+ here for DOM changes.** Unified diff with 3 lines of context per hunk of the HEAD vs BASE
136
+ DOM at a specific screenshot, identical to the diff shown in the Meticulous product. Only
137
+ written when the DOMs actually differ.
138
+ - `debug-data/dom-diffs/<headReplayId>-vs-<baseReplayId>-<screenshotBaseName>.full.diff` --
139
+ The same hunks as the sibling `.diff`, but with full-file context. Read this when 3 lines
140
+ of context around a hunk isn't enough to understand the surrounding DOM structure.
141
+ - `debug-data/dom-diffs/<headReplayId>-vs-<baseReplayId>.summary.txt` -- Per-pair index of DOM
142
+ diffs: total screenshots compared, count breakdown by status, and a TSV table (`screenshot`,
143
+ `status`, `hunks`, `diff_bytes`, `url`).
144
+
145
+ Note: DOM diffs are only generated when a `replayDiffId` is available (the normal
146
+ `meticulous debug replay-diff <id>` path). On the rare `meticulous debug replay --baseReplayId`
147
+ path there is no `replayDiffId`, so `dom-diffs/` is not generated — diff the per-replay
148
+ `screenshots/<baseName>.html` files directly with the system `diff` command instead.
149
+
150
+ Individual screenshots may also be marked `skipped-error` (backend fetch failed) or
151
+ `skipped-unsupported` (e.g. redacted variants, or screenshots whose identifier couldn't
152
+ be resolved from `timeline.json`) in the per-pair `.summary.txt`. For those, fall back
153
+ to diffing the two `screenshots/<baseName>.html` files directly.
129
154
 
130
155
  ### Other Data
131
156
 
@@ -137,83 +162,90 @@ or `meticulous debug replay` with `--baseReplayId`.
137
162
  requests (HAR format), and application storage. Can be very large; prefer the session summary
138
163
  or use search to find relevant portions.
139
164
  - `debug-data/test-run/<testRunId>.json` -- Test run configuration, results, commit SHA, and status.
140
- - `debug-data/pr-metadata.json` -- Pull request metadata (title, URL, hosting provider, author, status) from
141
- the database. May not be present if no PR is associated with the test run.
142
165
  - `debug-data/pr-diff.txt` -- Source code changes between the base and head commits. May not be present if
143
166
  commit SHAs are unavailable.
144
167
  - `debug-data/project-repo/` -- Your codebase checked out at the relevant commit. Only present if
145
168
  the command was run from within a git repository.
146
169
 
147
- ## Screenshot Mapping
148
-
149
- `context.json` includes a `screenshotMap` that maps each screenshot to its virtual timestamp
150
- and event number. Use this to correlate screenshot filenames (e.g. `screenshot-after-event-00673.png`)
151
- with specific points in the replay timeline and logs.
152
-
153
- ## Replay Comparison
154
-
155
- `context.json` includes a `replayComparison` array with side-by-side stats for each replay:
156
- total events, network requests, animation frames, virtual time, and screenshot count. Compare
157
- head vs base entries to quickly spot drift (e.g. extra animation frames or different virtual time).
158
-
159
- ## File Sizes
160
-
161
- `context.json` includes a `fileMetadata` array with the byte size and line count of key files.
162
- Check this before attempting to read large files -- use grep/search or read specific line ranges
163
- for files over ~5000 lines instead of reading them in full.
170
+ ## Key `context.json` fields
171
+
172
+ - `screenshotMap` -- maps each screenshot filename to its virtual timestamp and event number.
173
+ Use this to correlate e.g. `screenshot-after-event-00673.png` with a timeline position.
174
+ - `replayComparison` -- side-by-side per-replay stats (events, network requests, animation
175
+ frames, virtual time, screenshots). Scan for head-vs-base drift.
176
+ - `domDiffMap` -- keyed by `"<headReplayId>-vs-<baseReplayId>/<screenshotBaseName>"`. Each
177
+ entry carries `diffPath` (3-line-context), `fullDiffPath` (full-file-context),
178
+ `totalHunks`, `bytes`, and `url`. Both paths are `null` when HEAD and BASE DOMs were
179
+ identical. `fullDiffPath` alone can also be `null` when the full-context fetch failed
180
+ while the canonical succeeded in that case `diffPath` is non-null and still usable.
181
+ Screenshots that are only-in-one-side, `skipped-error`, or `skipped-unsupported` have
182
+ **no entry** in the map; consult the per-pair `.summary.txt` for the full list. Empty
183
+ on the `--baseReplayId` single-replay path.
184
+ - `fileMetadata` -- byte sizes and line counts for key files. Check this before reading
185
+ anything large; for files over ~5000 lines prefer grep/search or ranged reads.
164
186
 
165
187
  ## Debugging Workflow
166
188
 
167
- 1. **Start with `debug-data/context.json`** -- Read this file for all IDs, statuses, file paths,
168
- `screenshotMap`, and `replayComparison`. If a `screenshot` field is present, this is the
169
- specific screenshot the user wants to investigate. Use `screenshotMap` to find its
170
- virtual timestamp and event number, then focus your analysis on events leading up to it.
171
- 2. **Check replay comparison** -- Compare head vs base entries in `replayComparison` for
172
- immediate drift signals (different event counts, animation frames, virtual time).
173
- 3. **Analyze log diffs** -- For diffs: **delegate to the log-diff-analyzer subagent** which
174
- reads the filtered diffs and summaries and returns a structured divergence report. Only
175
- read `debug-data/log-diffs/*.filtered.diff` directly if you need to verify specific details
176
- from the analyzer's report. For single replays (no diff): read `logs.deterministic.filtered.txt`
177
- inside the replay directory. Fall back to the raw `logs.deterministic.txt` only if you
178
- need unmodified output.
179
- 4. **Read events index** -- Check `debug-data/events-index/` for a greppable, one-line-per-event
180
- listing of the full timeline. Use grep to filter by kind, virtual time, or URL.
181
- For a higher-level overview, check `debug-data/timeline-summaries/`.
182
- 5. **Search log messages** -- Use `debug-data/logs-index/` for a greppable, one-line-per-entry
183
- summary of `logs.ndjson`. Grep by source (`source=application`), type (`type=warn`),
184
- keyword, or virtual time (`vt=1234`).
185
- 6. **Check screenshot timeline context** -- Read `debug-data/screenshot-timeline-context/` for
186
- the timeline events surrounding each screenshot (30 before, 10 after). The screenshot line
187
- is marked with `>>>`.
188
- 7. **Inspect screenshot diffs** -- Start with `debug-data/diffs/<id>.summary.json` for a compact view of
189
- which screenshots differ and by how much. If a `debug-data/screenshot-context/` file exists, read it
190
- for the log lines surrounding the screenshot in both head and base.
191
- Only read the full `debug-data/diffs/<id>.json` if you need complete replay metadata.
192
- 8. **Check network activity** -- Read `debug-data/network-log/` for a compact network request
193
- log. Grep for specific endpoints, status codes, or domains.
194
- 9. **Compare virtual time progression** -- Use `diff` on `debug-data/vt-progression/` files to
195
- find where head and base replays diverge in virtual time.
196
- 10. **Check replay parameters** -- Read `debug-data/params-diffs/` for pre-computed diffs. For single
197
- replays, read `launchBrowserAndReplayParams.json` directly.
198
- 11. **Check assets diffs** -- Read `debug-data/assets-diffs/` to see if the snapshotted JS/CSS chunks
199
- differ between head and base.
200
- 12. **Analyze session data** -- Start with `debug-data/session-summaries/` for a quick overview of the
201
- session (URL history, user events, network stats). Only read the raw `debug-data/sessions/` data
202
- if you need specific details like request/response bodies or exact event selectors.
203
- 13. **Analyze the PR diff** -- **Delegate to the pr-analyzer subagent** which reads
204
- `debug-data/pr-diff.txt` and the diff summaries, returning a structured correlation of
205
- code changes to screenshot diffs. Only read the PR diff directly if you need to verify
206
- specific details from the analyzer's report.
207
- 14. **Trace through formatted assets** -- Use `debug-data/formatted-assets/` (pretty-printed JS/CSS)
208
- instead of raw minified bundles when tracing code execution.
209
- 15. **Review your code** -- If `project-repo/` is present, check it for the relevant changes.
210
- For library source code, use `debug-data/formatted-assets/` which contains the bundled and
211
- pretty-printed versions of third-party code.
212
-
213
- **Important**: Do NOT use Python one-liners to parse `timeline.json` or `logs.ndjson`. The derived
214
- files above (`events-index/`, `network-log/`, `vt-progression/`, `logs-index/`,
215
- `screenshot-timeline-context/`) are pre-computed and greppable. Use `timeline.ndjson` (NDJSON format,
216
- one JSON object per line) if you need to grep the raw timeline data.
189
+ Don't work through this top-to-bottom -- pick the phases relevant to the question. Phase 1
190
+ applies to every investigation; then pick phase 2 (comparing replays) or phase 3 (single
191
+ replay), and drop into phase 4 only as needed.
192
+
193
+ ### 1. Orient
194
+
195
+ 1. **Read `debug-data/context.json`** for IDs, statuses, file paths, `screenshotMap`,
196
+ `replayComparison`, and `fileMetadata`. If a `screenshot` field is present, that's the
197
+ specific screenshot the user wants to investigate -- use `screenshotMap` to find its
198
+ virtual timestamp and focus analysis on events leading up to it.
199
+ 2. **Scan `replayComparison`** for head-vs-base drift signals (event counts, animation
200
+ frames, virtual time, screenshot count).
201
+
202
+ ### 2. Investigate a diff (head vs base)
203
+
204
+ 3. **Screenshot diffs** -- read `debug-data/diffs/<id>.summary.json` for which screenshots
205
+ changed and by how much. If `debug-data/screenshot-context/` is present, read it for the
206
+ log lines around each screenshot. Only open the full `diffs/<id>.json` for complete
207
+ replay metadata.
208
+ 4. **DOM diffs** -- for each changed screenshot, open the matching `.diff` under
209
+ `debug-data/dom-diffs/` (use `domDiffMap` to navigate). If 3 lines of context around a
210
+ hunk isn't enough, open the sibling `.full.diff` file (same hunks with full-file context,
211
+ path on `domDiffMap[...].fullDiffPath`).
212
+ 5. **Log diffs** -- **delegate to the log-diff-analyzer subagent** instead of reading
213
+ `debug-data/log-diffs/*.filtered.diff` directly; only open the raw diff to verify
214
+ specific findings.
215
+ 6. **PR diff** -- **delegate to the pr-analyzer subagent** to correlate code changes with
216
+ visual diffs. Only open `debug-data/pr-diff.txt` directly to verify findings.
217
+
218
+ ### 3. Investigate a single replay
219
+
220
+ 7. **Filtered logs** -- read `logs.deterministic.filtered.txt` inside the replay directory.
221
+ Fall back to the raw `logs.deterministic.txt` only if you need unmodified output.
222
+ 8. **Events index** -- grep `debug-data/events-index/<role>-<replayId>.txt` by kind,
223
+ virtual time, or URL (e.g. `grep 'kind=screenshot'`, `grep 'api/v9/users'`). Prefer this
224
+ over parsing `timeline.json`.
225
+ 9. **Logs index** -- grep `debug-data/logs-index/<role>-<replayId>.txt` by source
226
+ (`source=application`), type (`type=warn`), keyword, or virtual time (`vt=1234`).
227
+
228
+ ### 4. Deeper dives (as needed)
229
+
230
+ 10. **Screenshot timeline context** -- `debug-data/screenshot-timeline-context/` for the 30
231
+ events before and 10 after each screenshot.
232
+ 11. **Network activity** -- grep `debug-data/network-log/` for endpoints, status codes,
233
+ domains.
234
+ 12. **Virtual time progression** -- `diff` on `debug-data/vt-progression/` files to find
235
+ where head and base diverge.
236
+ 13. **Replay parameters** -- `debug-data/params-diffs/` for computed diffs, or
237
+ `launchBrowserAndReplayParams.json` for a single replay.
238
+ 14. **Assets** -- `debug-data/assets-diffs/` for snapshotted JS/CSS diffs,
239
+ `debug-data/formatted-assets/` for pretty-printed bundles.
240
+ 15. **Session data** -- `debug-data/session-summaries/<sessionId>.txt` first; only read raw
241
+ `sessions/<id>/data.json` for specific request bodies or event selectors.
242
+ 16. **Project source** -- `project-repo/` when present; `formatted-assets/` for third-party
243
+ library code.
244
+
245
+ **Important**: Do NOT use Python one-liners to parse `timeline.json` or `logs.ndjson`. The
246
+ derived files above (`events-index/`, `logs-index/`, `network-log/`, `vt-progression/`,
247
+ `screenshot-timeline-context/`) are pre-computed and greppable. Use `timeline.ndjson`
248
+ (NDJSON format, one JSON object per line) if you need to grep the raw timeline data.
217
249
 
218
250
  ## Subagents
219
251
 
@@ -263,6 +295,11 @@ on expected vs unexpected changes.
263
295
  since real-time timestamps are stripped.
264
296
  - Session data files can be very large. Use grep/search to find relevant portions rather than
265
297
  reading entire files.
266
- - Screenshot images are binary PNG files stored in the replay cache (not in this workspace).
267
- Reference them by path but analyze the diff metadata in JSON files instead.
298
+ - Screenshot PNGs (the binary images) are stored in the replay cache (not in this workspace).
299
+ Reference them by path; for DOM content prefer reading
300
+ `debug-data/replays/<role>/<replayId>/screenshots/<name>.html` (or `.after.html`) rather than
301
+ parsing the raw `<name>.metadata.json`.
302
+ - For DOM changes between replays, prefer `debug-data/dom-diffs/` over diffing the two
303
+ `<name>.html` files yourself -- the pre-computed `.diff` is identical to the diff shown
304
+ in the Meticulous product and already has context lines added.
268
305
  - Check `fileMetadata` in `context.json` for file sizes before reading large files.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwaysmeticulous/debug-workspace",
3
- "version": "2.275.1",
3
+ "version": "2.276.2",
4
4
  "description": "Shared debug workspace pipeline for investigating Meticulous diffs and replays",
5
5
  "license": "ISC",
6
6
  "main": "dist/index.js",
@@ -21,9 +21,9 @@
21
21
  "test": "vitest run --passWithNoTests"
22
22
  },
23
23
  "dependencies": {
24
- "@alwaysmeticulous/client": "2.275.0",
25
- "@alwaysmeticulous/common": "2.275.0",
26
- "@alwaysmeticulous/downloading-helpers": "2.275.1",
24
+ "@alwaysmeticulous/client": "2.276.2",
25
+ "@alwaysmeticulous/common": "2.276.2",
26
+ "@alwaysmeticulous/downloading-helpers": "2.276.2",
27
27
  "chalk": "^4.1.2",
28
28
  "p-limit": "^3.1.0"
29
29
  },
@@ -36,7 +36,7 @@
36
36
  "url": "https://meticulous.ai"
37
37
  },
38
38
  "engines": {
39
- "node": ">= 12"
39
+ "node": ">= 18"
40
40
  },
41
41
  "homepage": "https://github.com/alwaysmeticulous/meticulous-sdk",
42
42
  "repository": {
@@ -47,5 +47,5 @@
47
47
  "bugs": {
48
48
  "url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
49
49
  },
50
- "gitHead": "ac746f70ab68d7feda8629aa06d898e7371497bd"
50
+ "gitHead": "01bc1fa14391f4a39322c7a70e5f51b5ebb45032"
51
51
  }