Repository navigation
Make output channels for create commands consistent with others - #6020
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6020 +/- ##
==========================================
- Coverage 68.12% 68.10% -0.02%
==========================================
Files 170 170
Lines 12916 12921 +5
Branches 2573 2573
==========================================
+ Hits 8799 8800 +1
- Misses 3659 3662 +3
- Partials 458 459 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the Dart and Flutter project creation logic by renaming project-related variables to package-related ones and improving how display names are generated for output channels. It introduces a getOutputChannelNames function to retrieve sorted channel names and adds corresponding tests to verify that output channels are correctly named during project creation. I have no feedback to provide as there were no review comments.
There was a problem hiding this comment.
Pull request overview
This PR addresses Dart-Code issue #5988 by making the output channel names used during dart create / flutter create consistent with the naming used by other commands, reducing duplicate/near-duplicate entries in the Output panel.
Changes:
- Use
getPackageOrFolderDisplayName()to generate consistent output channel display names for Dart/Flutter create commands. - Rename
FlutterCreateCommandArgsfields fromproject*topackage*for consistency with other areas that treat these as package roots/names. - Add internal test-only API
getOutputChannelNames()and new tests asserting create output channel naming.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/flutter_create_tests/flutter_create.test.ts | Adds an assertion that Flutter create operations produce the expected output channel names. |
| src/test/dart_create_tests/dart_create.test.ts | Adds an assertion that Dart create operations produce the expected output channel name. |
| src/shared/vscode/interfaces.ts | Extends InternalExtensionApi with getOutputChannelNames() for test usage. |
| src/shared/vscode/display_names.ts | Updates getPackageOrFolderDisplayName() to optionally accept a provided package name. |
| src/shared/vscode/device_manager.ts | Updates Flutter create command args to use packagePath when enabling platforms. |
| src/shared/interfaces.ts | Renames FlutterCreateCommandArgs fields to packagePath/packageName. |
| src/extension/user_prompts.ts | Passes explicit packageName for Flutter create triggers to ensure stable output naming. |
| src/extension/extension.ts | Exposes getOutputChannelNames() via the internal test API. |
| src/extension/commands/flutter.ts | Uses getPackageOrFolderDisplayName() to generate stable output channel names for flutter create. |
| src/extension/commands/dart.ts | Runs dart create in-place and uses getPackageOrFolderDisplayName() for output channel naming. |
| src/extension/commands/channels.ts | Adds getOutputChannelNames() helper to enumerate created command output channels (used by tests). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #5988