Use dashTool and dashIdeName to identify the launching IDE (#10037)

Use dashTool and dashIdeName to identify the launching IDE

IDE integrations now pass the `dashTool` and `dashIdeName` query
parameters when they launch or embed DevTools, alongside the legacy
`ide` parameter:

* `dashTool` is the canonical label of the Dash tool that hosts
  DevTools, such as `vscode-plugins` or `intellij-plugins`. It is shared
  by every variant of an IDE that uses the same plugin; VS Code, Cursor
  and Antigravity all pass `vscode-plugins`.
* `dashIdeName` is the name of the IDE, such as `Visual Studio Code`,
  `Cursor` or `Android Studio`. Its values are open-ended, so it is only
  suitable for display and diagnostics.

The legacy `ide` parameter (`VSCode`, `Android-Studio`, `IntelliJ-IDEA`)
is an ad-hoc vocabulary that cannot describe new IDEs or forks of IDEs,
and it is expected to be removed once IDE integrations have passed
`dashTool` and `dashIdeName` for long enough (at least two years). This
change moves DevTools over to the new parameters, while remaining
compatible with IDE integrations that only pass `ide`:

* DevToolsQueryParams gains `dashTool`, `dashIdeName`, `ideDisplayName`
  (`dashIdeName`, falling back to `ide`) and `isVsCode`. `isVsCode` is
  true when `dashTool` is `vscode-plugins` or when `ide` is `VSCode`.
  The `ide` getter is documented as legacy, with a TODO to remove it.
* The two checks of `ide == 'VSCode'` now use `isVsCode`: the choice of
  docs that the Property Editor links to, and the decision not to notify
  users that DevTools fell back from WebAssembly to JavaScript when
  embedded in VS Code, which disables cross-origin isolation.
* A survey's `devEnvironments` may now list `dashTool` labels (like
  `vscode-plugins`) as well as the legacy `ide` values (like `VSCode`).
  The legacy `VSCode` environment also matches VS Code forks. The
  matching moves to `meetsEnvironmentRequirementFor`, which takes the
  query parameters as an argument so that it can be unit tested. Older
  versions of DevTools only know the legacy values, so surveys that need
  to reach them should keep listing those.
* The environment details that DevTools pre-fills into bug reports use
  `ideDisplayName`, so they name the actual IDE (like Cursor).

Analytics are not changed by this commit. `Event.devtoolsEvent` in
`package:unified_analytics` does not accept `dashTool` or `dashIdeName`
yet, so DevTools continues to report only the legacy `ide` value. That
needs a change to `unified_analytics`, and follows once it is published.

Part of https://github.com/flutter/devtools/issues/9811
8 files changed
tree: df2eb9b0fd7f813663adc34704a1278f0e0c7ca3
  1. .agents/
  2. .gemini/
  3. .github/
  4. .vscode/
  5. _markdown_images/
  6. docs/
  7. packages/
  8. third_party/
  9. tool/
  10. .gitattributes
  11. .gitignore
  12. AGENTS.md
  13. analysis_options.yaml
  14. AUTHORS
  15. BETA_TESTING.md
  16. CLAUDE.md
  17. CODE_OF_CONDUCT.md
  18. CODEOWNERS
  19. CONTRIBUTING.md
  20. DEBUGGING.md
  21. devtools_options.yaml
  22. DOCUMENTATION.md
  23. flutter-candidate.txt
  24. LICENSE
  25. pubspec.lock
  26. pubspec.yaml
  27. README.md
  28. STYLE.md
  29. TESTING.md
  30. TRIAGE.md
README.md

Dart & Flutter DevTools

Build Status OpenSSF Scorecard

What is this?

Dart & Flutter DevTools is a suite of performance tools for Dart and Flutter.

Getting started

For documentation on installing and trying out DevTools, please see our docs.

Contributing and development

Contributions welcome! See our contributing page for an overview of how to build and contribute to the project.

Terms and Privacy

By using Dart DevTools, you agree to the Google Terms of Service. To understand how we use data collected from this service, see the Google Privacy Policy.