Skip to content

Conversation

jonathanKingston
Copy link
Contributor

@jonathanKingston jonathanKingston commented Oct 2, 2025

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/414235014887631/task/1211309170962125?focus=true

Description

  • Adds a expanded parameters to breakage reports
  • Adds a new message sent on page load expandedPerformanceMetricsResult

Testing Steps

  • In the apple repos we should listen for expandedPerformanceMetricsResult
  • To use this repo:
    • Change the npm branch to this one: npm i github:duckduckgo/content-scope-scripts#ff164dd9bc074de381a48c28115728ff5ddb3ba3 (this will update below in the comment if we push more).
    • Call npm run build-content-scope-scripts in the apple repo.

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Adds expanded performance metrics (LCP, navigation, sizes, etc.) collection and messaging, gated by feature flags and included in breakage reports when enabled.

  • Utilities (injected/src/features/breakage-reporting/utils.js):
    • New: getExpandedPerformanceMetrics with error handling; gathers navigation timings, paint (incl. FCP), awaits LCP, network timings, sizes, resource stats, and metadata.
    • Helper: waitForLCP to observe largest-contentful-paint with timeout.
  • Features:
    • PerformanceMetrics (injected/src/features/performance-metrics.js):
      • Emits expanded metrics on page load via expandedPerformanceMetricsResult when expandedPerformanceMetricsOnLoad is enabled; skips when isBeingFramed().
    • BreakageReporting (injected/src/features/breakage-reporting.js):
      • Conditionally appends expandedPerformanceMetrics to breakageReportResult when expandedPerformanceMetrics is enabled.

Written by Cursor Bugbot for commit f3f4fa8. This will update automatically on new commits. Configure here.

Copy link

netlify bot commented Oct 2, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit f3f4fa8
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/68defc71bc9ed100089991c9
😎 Deploy Preview https://deploy-preview-1989--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

github-actions bot commented Oct 2, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

Copy link

github-actions bot commented Oct 2, 2025

[Beta] Generated file diff

Time updated: Thu, 02 Oct 2025 22:28:50 GMT

Android
    - android/adsjsContentScope.js
  • android/contentScope.js

File has changed

Apple
    - apple/contentScopeIsolated.js

File has changed

Integration
    - integration/contentScope.js

File has changed

Windows
    - windows/contentScope.js

File has changed

@jonathanKingston jonathanKingston marked this pull request as ready for review October 2, 2025 22:14
@jonathanKingston jonathanKingston requested a review from a team as a code owner October 2, 2025 22:14
cursor[bot]

This comment was marked as outdated.

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