Skip to content

fix(extension): restore interaction capture on HTTP pages - #528

Merged
iuyo5678 merged 1 commit into
mainfrom
fix/http-cooperation-capture
Oct 30, 2026
Merged

iuyo5678 merged 1 commit into
mainfrom
fix/http-cooperation-capture

Conversation

@iuyo5678

Copy link
Copy Markdown
Collaborator

On ordinary HTTP intranet pages, the interaction collector called crypto.randomUUID() before registering its message listener. This API is unavailable outside secure contexts, so collection failed with Interaction collection is unavailable in frame 0 (no reply) while secure pages continued to work.

Reuse the existing createRandomUuid() helper, which falls back to crypto.getRandomValues(). The production change is limited to the collector's document ID initialization.

Regression coverage:

  • A unit test verifies collection, input arming, stable document identity and a new identity after restarting the collector when randomUUID is absent.
  • An isolated extension/browser test exercises the production collector and message bridge on both loopback HTTP and a mapped intranet HTTP hostname, covering the top document and an iframe. It explicitly checks that the intranet contexts are insecure and lack randomUUID.
  • The browser regression runs in CI using the existing Chrome for Testing installation.

Validation:

  • Confirmed the new unit test fails before the fix with crypto.randomUUID is not a function; the browser test reproduces the original frame 0 error.
  • Extension suite: 3,368 passed, 335 skipped; the new browser regression passed separately on Chrome for Testing 149 and 156.
  • Extension TypeScript check and production build passed.
  • Biome, stylelint, plugin typecheck and 668 plugin tests passed; local ignored worktrees were excluded from lint discovery. Workflow validation with actionlint passed.

@iuyo5678
iuyo5678 merged commit e58b95b into main Oct 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants