Skip to content

Make output channels for create commands consistent with others - #6020

Merged
DanTup merged 1 commit into
masterfrom
make-output-channels-consistent
Apr 1, 2026
Merged

DanTup merged 1 commit into
masterfrom
make-output-channels-consistent

Conversation

@DanTup

@DanTup DanTup commented Apr 1, 2026

Copy link
Copy Markdown
Member

Fixes #5988

@DanTup DanTup added this to the v3.134.0 milestone Apr 1, 2026
@DanTup DanTup added is bug fix in commands Relates to commands (usually invoked from the command Palette) labels Apr 1, 2026
@DanTup
DanTup requested a review from Copilot April 1, 2026 11:30
@codecov

codecov Bot commented Apr 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.10%. Comparing base (5b1ddcf) to head (22031a8).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/extension/commands/flutter.ts 55.55% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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

Copy link
Copy Markdown

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 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 FlutterCreateCommandArgs fields from project* to package* 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.

Comment thread src/shared/vscode/display_names.ts
@DanTup
DanTup merged commit a322bd0 into master Apr 1, 2026
30 checks passed
@DanTup
DanTup deleted the make-output-channels-consistent branch April 1, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in commands Relates to commands (usually invoked from the command Palette) is bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Output tab show two different entries for a single package when no pub get has been run

2 participants