Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update devtools patches and show performance tab #7137

Merged
merged 20 commits into from
Nov 7, 2024

Conversation

andyjessop
Copy link
Contributor

@andyjessop andyjessop commented Oct 31, 2024

What this PR solves / how to test

Fixes #000.

  • Updates the DevTools patches.
  • Enables the display of the performance tab.
  • Disables the display of the profiling tab.

Tip

In order to test, find the automated comment below ⬇️ which contains the latest link. This comment and link will be present on EVERY pull request that contains both the preview:workers-playground and preview:wrangler-devtools labels.

Acceptance criteria:

General:

  • No CSP errors
  • Supports forcing the theme from outside using the theme=dark|default|systemPreferred query parameter

Console tab:

  • Logging plain text
  • Logging numbers
  • Maintaining connection across script reloads (i.e. the "Script modified; context reset." message)
  • Logging (explorable) structured data
  • Logging thrown errors
  • Filter by log level
  • Ability to clear logs

Sources tab:

  • View worker source
  • Source updates (after deployed and request sent to edgeworker)
  • Throwing an error correctly underlines the line of code which threw (1)
  • Split code by authored (sourcemapped)/deployed (not sourcemapped)
  • "Cloudflare" network file system is the only file viewer visible (i.e. "Workspace" not visible)

Network tab:

  • Subrequests are shown
  • Response headers are shown
  • Response bodies are shown

Performance tab:

  • Can select Cloudflare worker as source and measure performance of request

[1] Not underlining throwing code in sources tab

However, note that this doesn't work on the existing production workers playground, so I don't think it should hold up this PR.

Screenshot 2024-10-18 at 14 54 43

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: not covered by tests
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: doesn't affect existing tests
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Changeset included
    • Changeset not necessary because: just a refactor to keep it up-to-date
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: not user facing

@andyjessop andyjessop requested a review from a team as a code owner October 31, 2024 08:44
Copy link

changeset-bot bot commented Oct 31, 2024

🦋 Changeset detected

Latest commit: b29df38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/wrangler-devtools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Oct 31, 2024

The Wrangler DevTools and Workers Playground previews are now live. The Playground preview embeds the DevTools preview, so you can see them working together at:
https://261b0c5b.workers-playground.pages.dev/playground

@andyjessop andyjessop added preview:workers-playground Trigger a workers playground preview deploy preview:chrome-devtools-patches Trigger a devtools preview deploy labels Nov 7, 2024
@andyjessop andyjessop merged commit 1b195bd into main Nov 7, 2024
33 of 36 checks passed
@andyjessop andyjessop deleted the aj/dev-tools-upgrade-2 branch November 7, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview:chrome-devtools-patches Trigger a devtools preview deploy preview:workers-playground Trigger a workers playground preview deploy
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants