Summary
In-app Verification Mode currently observes window.fetch and navigator.sendBeacon, but it does not observe every browser network path that matters for Byteflow's external-request and media-preview tools.
This can make the verification panel undercount network activity. For example, an external media preview rendered through <img src="...">, a direct anchor download/navigation, an XHR request, or other resource load would not necessarily be captured by the current monkey-patches.
Why this matters
Verification Mode is framed as a way to help users verify local processing and external-request boundaries. If it misses browser resource loads, users may interpret "0 external hosts observed" as stronger evidence than the feature can actually provide.
This is especially relevant for tools that use public image/video thumbnail URLs or browser-native resource loading rather than only fetch().
Current behavior
Relevant code:
src/components/layout/verification-mode-panel.tsx- wraps
window.fetch; - wraps
navigator.sendBeacon; - wraps
Storage.prototype.setItem/removeItem/clear; - records only sanitized origin, method, path type, and timestamp.
src/core/trust/verification-mode.tssanitizeVerificationUrl() intentionally strips path/query and keeps origin only.
This is good from a privacy perspective, but the network capture scope is incomplete.
Expected behavior
Choose one of these implementation paths.
Option A: make capture broader
Add browser-safe observation for resource loads without recording paths/query strings/payloads:
- use
PerformanceObserver for resource entries where available; - also inspect
performance.getEntriesByType("resource") when enabling the panel so already-loaded resources can be reported; - record sanitized
origin, resource initiator type, same-origin/external classification, and timestamp only; - keep payload/body/query/header values out of the panel.
Resource initiator types worth distinguishing:
fetch
xmlhttprequest
img
script
link
css
beacon
other
Option B: make scope explicit
If broad resource observation is too noisy or browser-dependent, clearly label the panel as fetch/beacon/storage verification only:
- UI copy should say it does not capture every browser resource load;
- Trust Center copy should explain when DevTools Network is still required;
- tests should lock the disclaimer.
Suggested implementation plan
- Add a
captureScope or observedBy field to VerificationNetworkEntry. - Add
PerformanceObserver support behind a feature check. - Deduplicate observed entries by origin + initiator type + coarse time bucket so the panel stays readable.
- Preserve the existing privacy rule: never record full URL, query string, request body, response body, headers, or filenames.
- Update UI copy and Trust Center copy to explain the scope.
- Add tests for:
- fetch is observed;
- sendBeacon is observed;
- synthetic resource entries are sanitized if PerformanceObserver logic is factored into a pure helper;
- paths/query strings never appear;
- the UI includes the scope disclaimer if Option B is chosen.
Acceptance criteria
Related code pointers
src/components/layout/verification-mode-panel.tsxsrc/core/trust/verification-mode.tssrc/app/[lang]/trust-center/page.tsx- media/external-request tools that display external resources
Summary
In-app Verification Mode currently observes
window.fetchandnavigator.sendBeacon, but it does not observe every browser network path that matters for Byteflow's external-request and media-preview tools.This can make the verification panel undercount network activity. For example, an external media preview rendered through
<img src="...">, a direct anchor download/navigation, an XHR request, or other resource load would not necessarily be captured by the current monkey-patches.Why this matters
Verification Mode is framed as a way to help users verify local processing and external-request boundaries. If it misses browser resource loads, users may interpret "0 external hosts observed" as stronger evidence than the feature can actually provide.
This is especially relevant for tools that use public image/video thumbnail URLs or browser-native resource loading rather than only
fetch().Current behavior
Relevant code:
src/components/layout/verification-mode-panel.tsxwindow.fetch;navigator.sendBeacon;Storage.prototype.setItem/removeItem/clear;src/core/trust/verification-mode.tssanitizeVerificationUrl()intentionally strips path/query and keeps origin only.This is good from a privacy perspective, but the network capture scope is incomplete.
Expected behavior
Choose one of these implementation paths.
Option A: make capture broader
Add browser-safe observation for resource loads without recording paths/query strings/payloads:
PerformanceObserverforresourceentries where available;performance.getEntriesByType("resource")when enabling the panel so already-loaded resources can be reported;origin, resource initiator type, same-origin/external classification, and timestamp only;Resource initiator types worth distinguishing:
Option B: make scope explicit
If broad resource observation is too noisy or browser-dependent, clearly label the panel as fetch/beacon/storage verification only:
Suggested implementation plan
captureScopeorobservedByfield toVerificationNetworkEntry.PerformanceObserversupport behind a feature check.Acceptance criteria
npm run test -- tests/component/verification-mode-panel.test.tsx tests/guards/verification-mode-acceptance.test.tspasses.npm run check:typesandnpm run lintpass.Related code pointers
src/components/layout/verification-mode-panel.tsxsrc/core/trust/verification-mode.tssrc/app/[lang]/trust-center/page.tsx