theme-tools icon indicating copy to clipboard operation
theme-tools copied to clipboard

[vscode extension] Profile annotations and webview

Open madmath opened this issue 11 months ago • 1 comments

What are you adding in this PR?

Command to call out to shopify theme profile (https://github.com/Shopify/cli/pull/5109) which will

  • Put profile annotations (vscode "decorations") in the relevant files
  • Show a webview with the speedscope profile, similar to if the command was run from shopify theme profile

Screenshot 2025-01-10 at 8 53 46 AM

Here's the error if shopify theme profile fails to execute (for example, CLI version is not up to date or not authenticated)

Screenshot 2025-01-10 at 9 25 20 AM

What's next? Any followup issues?

Very much a v1, I think we can improve a few ways from here

  • Ability to clear the annotations.
  • Better resiliency regarding calling shopify CLI (open to suggestions).
  • Interactivity between the webview profile and the code.
  • Better UX around calling the command.

Before you deploy

Public API changes, new features

  • [x] I included a minor bump changeset
  • [x] My feature is backward compatible

madmath avatar Jan 10 '25 14:01 madmath

I'm converting this back to draft because there's these things we need to worry about:

  • Am I profiling the code I'm looking at?
  • How do we deal with VS Code workspaces?

charlespwd avatar Jan 15 '25 13:01 charlespwd