Rebuilt the capture and mapping pipeline after an audit found the simulator's data could not be trusted: * Hotspot coordinates never matched the screenshots. Capture now scrolls the page over CDP and pastes each frame at the measured scrollY, so image pixels and DOM coordinates share one grid by construction. * Metrics were synthesised (1200 + n*410) and presented as analytics. Numbers are now attached only when the catalog has a matching row; metrics.json carries a `source` label and the UI says "no data" instead of showing zeros. * Event interception hooked a connector bridge that never fires. The app posts to api.amplitude.com using the legacy form-urlencoded v1 API; the hook now reads event_type off the wire. 36 keys are verified as `observed`. * All device access moved into tools/telecom_cdp.py: dynamic WebView socket discovery (the PID was hardcoded), id-matched CDP, measured native geometry. * Editor edits can now be saved to disk; API failures no longer report success from a stale result file; screenId is no longer interpolated into a shell. Screens went from 7 (with fabricated markup) to 32, all verified: image height equals map height, no out-of-bounds hotspots, no dead links. The id_card screenshot has been manually redacted - it showed a national ID. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
17 lines
836 B
Markdown
17 lines
836 B
Markdown
# Legacy tools (kept for reference, not used)
|
|
|
|
Original versions of scripts that were superseded during the 2026-08-24 audit.
|
|
Each had at least one of these defects:
|
|
|
|
* hardcoded WebView debug socket `webview_devtools_remote_18732` (the PID changes
|
|
every time the app restarts, so they broke on the next launch);
|
|
* `targets[0]` without checking the target type;
|
|
* one `ws.recv()` after `Page.enable`/`Network.enable` treated as the command reply,
|
|
when CDP interleaves events with replies;
|
|
* screenshot geometry that did not match the DOM coordinate space used for hotspots;
|
|
* synthesised metrics (`1200 + n * 410`) presented as measured analytics.
|
|
|
|
The working replacements are `tools/capture_screen.py`, `tools/crawl_and_map_all.py`,
|
|
`tools/monitor_live_events.py` and `tools/inspect_page.py`, all built on
|
|
`tools/telecom_cdp.py`.
|