Skip to content

Dashboard terminal colors have poor contrast, with no light theme or palette controls #20439

Description

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Directory names produced by Alpine's ls are very difficult to read in the dashboard's docked terminal: they appear dark blue/purple against a near-black background. The terminal stays dark even when the dashboard uses its light theme, and there is no exposed terminal theme or ANSI palette setting to improve the contrast.

This was observed in an AppHost-owned docked /bin/sh session opened with docker exec into an Alpine container. Resource-owned terminal views use the same TerminalView component, so theme configuration should be addressed consistently across the two experiences.

Alpine ls directory names rendered dark blue on a near-black terminal background

Expected Behavior

Default terminal colors should make common ANSI output, including directory names from ls, readable. Users should have a supported way to select a terminal theme or customize its palette/background, including a usable light appearance, rather than being forced to disable application colors.

A terminal theme preference could follow the dashboard theme or be independent, but changing the dashboard theme should not leave users with an unreadable terminal and no remedy in the UI.

Steps To Reproduce

Use a C# AppHost with a build containing the terminal dock support from #19887. This example enables both a resource-owned terminal and a command that opens a second shell in the dock:

#pragma warning disable ASPIRETERMINAL001

using Aspire.Hosting.ApplicationModel;
using Microsoft.Extensions.DependencyInjection;

var builder = DistributedApplication.CreateBuilder(args);
const string containerName = "aspire-terminal-color-repro";

var demo = builder.AddContainer("terminal-demo", "alpine")
    .WithContainerName(containerName)
    .WithArgs("/bin/sh", "-i")
    .WithTerminal();

demo.WithCommand("open-shell", "Open shell", context =>
{
    var terminals = context.Services.GetRequiredService<TerminalService>();
    var terminal = terminals.CreateTerminal(new TerminalLaunchOptions
    {
        Title = "Alpine shell",
        Executable = "docker",
        Arguments = ["exec", "-it", containerName, "/bin/sh"],
        Placement = TerminalPlacement.Dock
    });
    terminal.Start();
    terminal.Show();
    return Task.FromResult(CommandResults.Success());
});

builder.Build().Run();
  1. Start the AppHost and wait for the container to be running.
  2. Execute Open shell on terminal-demo in the dashboard.
  3. Run ls / in the docked terminal. If necessary, explicitly request colors with ls --color=always /.
  4. Observe the low-contrast directory names.
  5. Switch the dashboard theme to light. The terminal remains dark, and its controls offer font/grid sizing but no theme or palette selection.

Exceptions (if any)

None. This is a readability/theme-control issue.

Aspire doctor output

Not collected. The tested AppHost uses Aspire.AppHost.Sdk and hosting packages 13.6.0-preview.1.26473.12 on Windows, with .NET SDK 10.0.302. The running alpine:latest container reports Alpine 3.24.2. The feature is being exercised from a preview build; a stable-version comparison was not performed.

Anything else?

Source inspection confirms the current forced-dark behavior:

  • src/Aspire.Dashboard/Components/Controls/TerminalView.razor sets data-theme="dark".
  • src/Aspire.Dashboard/Components/Layout/TerminalDock.razor.css explicitly states that the dock stays dark in both dashboard themes and pins dark colors.
  • The terminal toolbar exposes font size and, where applicable, sizing controls, but no theme/palette setting. The WebTerminal.mount call in TerminalView.razor.js does not expose an application-level palette override.

A read-only check in the reported Alpine container confirmed that BusyBox ls emits ESC[1;34m (bold blue) for directories. Setting LS_COLORS="di=1;36:ln=1;36" did not change those escape sequences in this build. ls --color=never did remove them.

Temporary workaround, entered separately in each affected shell:

alias ls='ls --color=never'

This only disables colors for ls in that shell; it does not provide a light terminal theme or solve low-contrast output from other applications. The screenshot is the user's observed behavior; source and shell-output checks corroborate it, but an independent browser reproduction was not performed.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dashboardarea-terminalTerminal/PTY support — TerminalHost, WithTerminal, dashboard terminal view

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions