Skip to content

[analytics] add DevToolsQueryParams.isVsCode - #10039

Open
pq wants to merge 3 commits into
flutter:masterfrom
pq:is-vs-code-helper
Open

pq wants to merge 3 commits into
flutter:masterfrom
pq:is-vs-code-helper

Conversation

@pq

@pq pq commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Part of #9811. (I'm pretty unfamiliar with this codebase so I leaned hard on Claude. I spent some time thinking it through but do let me know if I'm headed in the wrong direction!)

Ok, so... this, adds DevToolsQueryParams.isVsCode (dashTool == 'vscode-plugins' || ide == 'VSCode') and uses it in place of ide == 'VSCode' checks for:

  • the survey IDE filter
  • the WASM → JS fallback notification
  • the Property Editor docs link

This keeps VS Code–based editors that pass dashTool (and not ide) from being treated as CLI or Android Studio.

Follow-ups (tracked in #9811): IntelliJ survey mapping via dashTool and analytics support for dashTool/dashIdeName.

There are no user-visible changes so I applied release-notes-not-required. (Yell if this is incorrect!)

(Fixes: https://github.com/flutter/dash-devexp-internal/issues/95)

Pre-launch Checklist

General checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I updated/added relevant documentation (doc comments with ///).

Issues checklist

Tests checklist

  • I added new tests to check the change I am making...
  • OR there is a reason for not adding tests, which I explained in the PR description.

AI-tooling checklist

  • I did not use any AI tooling in creating this PR.
  • OR I did use AI tooling, and...
    • I read the AI contributions guidelines and agree to follow them.
    • I reviewed all AI-generated code before opening this PR.
    • I understand and am able to discuss the code in this PR.
    • I have verifed the accuracy of any AI-generated text included in the PR description.
    • I commit to verifying the accuracy of any AI-generated code or text that I upload in response to review comments.

Feature-change checklist

  • This PR does not change the DevTools UI or behavior and...
    • I added the release-notes-not-required label or left a comment requesting the label be added.
  • OR this PR does change the DevTools UI or behavior and...
    • I added an entry to packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.
    • I included before/after screenshots and/or a GIF demo of the new UI to my PR description.
    • I ran the DevTools app locally to manually verify my changes.

build.yaml badge

If you need help, consider asking for help on Discord.

@pq
pq requested a review from a team as a code owner October 12, 2026 23:50
@pq
pq requested review from srawlins and removed request for a team October 12, 2026 23:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for detecting VS Code based editors using the new 'dashTool' query parameter in addition to the legacy 'ide' parameter. It updates query parameter parsing, survey environment matching, preference checks, and documentation links to use the new 'isVsCode' helper, and adds corresponding unit tests. Feedback on the changes suggests a fix in 'meetsEnvironmentRequirement' to check the resolved environment from '_currentDevEnvironment()' instead of 'ga.ideLaunched.isEmpty' to prevent bypassing the environment check when 'ga.ideLaunched' is empty but VS Code is detected.

Comment thread packages/devtools_app/lib/src/shared/managers/survey.dart
@srawlins

Copy link
Copy Markdown
Contributor

I probably should have claimed #9811 or pinged you on #10037 😛

@pq

pq commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Ah. Yes. I think that corresponds w/ the work tracked by https://github.com/flutter/dash-devexp-internal/issues/94. Maybe?

If you want to take this bit too (tracked in https://github.com/flutter/dash-devexp-internal/issues/95), good by me!

And, thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants