Repository navigation
Hide terminal hosts by default without a visibility option - #20756
Conversation
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 11f2628f-1325-4704-8587-05bc05888046
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20756Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20756" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unconditional OTLP registration causes terminal hosts to export to a nonexistent default endpoint when the dashboard is disabled.
Review effort: Balanced
Findings: 1
What changed in this PR
Removes the terminal-host visibility option, hides terminal hosts by default, and decouples telemetry export from visibility.
Changes:
- Removes
TerminalOptions.ShowTerminalHost. - Always hides generated terminal hosts while enabling OTLP telemetry.
- Updates tests, documentation, and playground usage.
| File | Description |
|---|---|
tests/Aspire.Hosting.Tests/WithTerminalTests.cs |
Updates visibility and telemetry tests. |
src/Aspire.TerminalHost/TerminalHostTelemetry.cs |
Clarifies telemetry behavior. |
src/Aspire.TerminalHost/TerminalHostApp.cs |
Updates telemetry activation comments. |
src/Aspire.Hosting/TerminalResourceBuilderExtensions.cs |
Hides hosts and enables telemetry independently. |
src/Aspire.Hosting/ApplicationModel/TerminalAnnotation.cs |
Removes the visibility option. |
playground/Terminals/Terminals.AppHost/AppHost.cs |
Removes visibility configuration. |
docs/specs/with-terminal.md |
Documents hidden-host discovery and telemetry. |
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 11f2628f-1325-4704-8587-05bc05888046
This comment has been minimized.
This comment has been minimized.
PR testing reportPR information
Artifact version verification
Changes analyzedThe PR removes There are no CLI, dashboard-source, template, client-integration, VS Code extension, or CI infrastructure changes. Scenarios executed1. Published API and two-replica startupCoverage: Happy path. Result: Passed. Created a fresh C# AppHost and a long-running .NET 10 console project: builder.AddProject("shell", "Shell/Shell.csproj")
.WithReplicas(2)
.WithTerminal();Started it with the PR CLI using A {
"OptionsProperties": ["Columns", "Rows"],
"Hosts": [
{ "Name": "shell-terminalhost-0", "IsHidden": true },
{ "Name": "shell-terminalhost-1", "IsHidden": true }
]
}Evidence: 2. Normal dashboard hide/reveal workflowCoverage: Happy path. Result: Passed. Used headless Chromium/Playwright against the running PR dashboard. Asserted that neither terminal host appeared in the default resource grid. Selected View options → Show hidden resources and asserted that both terminal hosts appeared with their running state. The normal CLI resource listing also excluded hidden hosts; Evidence: 3. Host diagnostic telemetry independent of parent configurationCoverage: Happy path. Result: Logs, metrics, and identity passed; runtime trace emission not verified. The parent project did not configure an OTLP exporter. Both terminal hosts nevertheless had telemetry enabled, used the dashboard's allocated OTLP endpoint, and received distinct DCP instance identities: Queried Selected Trace limitation: Evidence: 4. Stopped hidden host remains inspectableCoverage: Unhappy path. Result: Passed. Stopped Opened its normal Actions → View details panel and inspected the resource state, state details, stop time, exit code, process information, relationships, and masked environment-variable table. The panel reported exit code Evidence: 5. Invalid terminal dimensions fail explicitlyCoverage: Negative/boundary. Result: Passed. Created separate fresh PR AppHosts for: .WithTerminal(options => options.Columns = 0);.WithTerminal(options => options.Rows = -1);Both Evidence: Local validation before published-artifact scenarios
Environment and harness notesThe repository SDK's default console template targeted .NET 11, which did not run under the system SDK selected by DCP outside the repository. Retargeting the temporary workload to .NET 10 resolved that environment mismatch. No product or repository configuration was changed. Intermediate browser automation attempts were corrected to interact with Fluent option/menu-item elements and to await the actual resource-details title. The final hide/reveal, metrics, and stopped-details observations came from the real PR dashboard. Summary
Overall: The requested visibility/API change is verified against the published PR artifacts. Trace emission is explicitly unverified. Evidence and cleanupEvidence is saved alongside this report in the session artifact directory. Credentials are excluded from the resource evidence; screenshots retain masked environment values. No screenshots or logs have been uploaded publicly. The test AppHost and the independent workload probe were stopped. The isolated test-install/project directory was removed after evidence capture. No test projects or browser dependencies were added to the repository. The user approved posting this report. The PR remains open and was not merged. |
|
The API is already experimental so I don't think we need to obsolete (I doubt anyone uses it so I think its a clean remove at this point). |
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 11f2628f-1325-4704-8587-05bc05888046
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 11f2628f-1325-4704-8587-05bc05888046
Main now excludes the dropped net8 package-validation baseline, so the intentional terminal visibility API removal no longer requires these suppressions. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 11f2628f-1325-4704-8587-05bc05888046
Tests selector52 / 98 PR test projects · 4 PR jobs, from 6 changed files. Selected PR test projects (52 / 98)
Selected PR jobs (4)
How these were chosen — grouped by what changed
🔧 show 45
🧪 🔧 📦 affected project 📄 Job reasons
Selection computed for commit |
…inal hosts Terminal host resources are now always hidden in the dashboard and CLI resource lists; the TerminalOptions.ShowTerminalHost toggle was removed. Users reveal terminal hosts via the dashboard's Show hidden resources control instead. Diagnostic telemetry export is now independent of visibility and is instead gated by DistributedApplicationOptions.DisableDashboard. Documents changes from microsoft/aspire#20756. Co-authored-by: Copilot <[email protected]>
|
Pull request created: #1835
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1835 targeting Triggered signals: Updated Note This draft PR needs human review before merging. |

Description
Terminal hosts are implementation details that should use the dashboard's normal hidden-resource workflow rather than a separate AppHost visibility option. This removes
TerminalOptions.ShowTerminalHostand always marks per-replica terminal hosts as hidden. Users can reveal them with Show hidden resources in the dashboard without changing or restarting their AppHost.Diagnostic logs, metrics, and traces are configured independently of resource visibility, using the existing dashboard OTLP configuration and DCP resource identity. Terminal-host telemetry is disabled whenever
DistributedApplicationOptions.DisableDashboardistrue, including when an explicit collector endpoint is configured. The child process receives an explicit disabled activation flag so inherited telemetry settings cannot enable export. The Terminals playground, documentation, and regression tests are updated. No new dependencies are required.User-facing usage
Select Show hidden resources in the dashboard to inspect the generated terminal hosts.
Breaking changes
Consumers of the experimental terminal API must remove assignments to
TerminalOptions.ShowTerminalHostand use the dashboard's Show hidden resources control instead. Terminal dimensions remain configurable throughColumnsandRows.Validation
./restore.sh— passed after syncing with main's .NET 10 baseline.MSBUILDTERMINALLOGGER=false dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class '*.WithTerminalTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed after the telemetry-gating fix and main sync: 64 succeeded, 1 platform-specific skip. Coverage includes disabled-dashboard cases without a collector and with current/legacy gRPC and HTTP collector configuration.MSBUILDTERMINALLOGGER=false dotnet test --project tests/Aspire.TerminalHost.Tests/Aspire.TerminalHost.Tests.csproj --no-launch-profile -- --filter-class '*.TerminalHostTelemetryTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'— passed after the telemetry-gating fix and main sync: 14 succeeded.MSBUILDTERMINALLOGGER=false dotnet pack src/Aspire.Hosting/Aspire.Hosting.csproj --no-restore -c Debug— passed after main sync, with package validation enabled and no compatibility suppressions. Main excludes the deliberately dropped .NET 8/9 baseline frameworks, making the earlier two suppressions unnecessary.MSBUILDTERMINALLOGGER=false dotnet build playground/Terminals/Terminals.AppHost/Terminals.AppHost.csproj --no-restore /p:SkipDashboardReference=true /p:SkipNativeBuild=true— passed with no warnings or errors before the telemetry-gating follow-up.0549a86c9c013297b82ae082e09f039abb4efddd, including the telemetry-gating fix and removal of obsolete baseline suppressions. Final refresh found no failed or pending checks.17.0.0-pr.20756.g8b092707— verified two project replicas and two terminal hosts start; terminal options contain onlyColumnsandRows; hosts are hidden initially and reveal through the normal dashboard control; diagnostic logs and metrics match the host identities without a parent OTLP exporter; stopped hosts remain inspectable; zero columns and negative rows fail explicitly. These artifact scenarios preceded the telemetry-gating follow-up and have not been rerun against its artifacts.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?