Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ for every approved plan. Desktop's version follows the engine generation, so it
a sticky header, or the suggestion list a field opens when it is filled.

### Fixed
- **The "no agents open" message stays readable over a chat background image.** With a background
image set, closing the last agent left the message painted straight onto the picture, where a
busy or light image could make it hard to read. The message now sits in a translucent card — the
same treatment the chat's own message bubbles use — so the image still shows through while the
text keeps a predictable surface behind it. The explanatory line under the heading is also less
dimmed, since dimming costs contrast that a background image has already spent.
- **The preview pane's open and attach buttons now work on web pages.** Both acted only on a
project file, so on a website they did nothing at all and gave no reason why. Open now hands the
page to the system's default browser and the attach button puts its address into the prompt,
Expand Down
12 changes: 11 additions & 1 deletion src/MandoCode.Desktop/App.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Application
<Application
x:Class="MandoCode.Desktop.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down Expand Up @@ -44,6 +44,16 @@
<Color x:Key="MandoRaisedColor">#3E2753</Color>
<SolidColorBrush x:Key="MandoRaisedBrush" Color="{StaticResource MandoRaisedColor}" />

<!-- Translucent panel, for native surfaces that sit OVER the user's chat background
image and have to stay readable on top of whatever it happens to be. Same recipe
as the transcript's message bubbles (transcript.css: panel at ~82-90%), so the
empty state reads like the chat it replaces. Alpha, not Opacity: Opacity on a
container fades its text too, which is the readability problem, not the fix.
This literal is the Mando Dark value, used only until Initialize applies the
saved theme — ThemeManager.ApplyCore re-derives it from each theme's Panel. -->
<Color x:Key="MandoGlassColor">#E6201A2E</Color>
<SolidColorBrush x:Key="MandoGlassBrush" Color="{StaticResource MandoGlassColor}" />

<!-- Replace the user's Windows accent color with MandoCode purple so
accent buttons, toggle switches, sliders, and selection highlights
match the brand on every machine -->
Expand Down
51 changes: 32 additions & 19 deletions src/MandoCode.Desktop/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -925,25 +925,38 @@
<Image x:Name="EmptyBgImage" Visibility="Collapsed" Stretch="UniformToFill"
Grid.ColumnSpan="5" Grid.RowSpan="3"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
<StackPanel x:Name="EmptyAgentsState" Visibility="Collapsed"
Grid.ColumnSpan="5" Grid.RowSpan="3"
HorizontalAlignment="Center" VerticalAlignment="Center"
Spacing="14" MaxWidth="360">
<FontIcon Glyph="&#xE8BD;" FontSize="40" HorizontalAlignment="Center"
Foreground="{StaticResource MandoAccentBrush}" Opacity="0.85"/>
<TextBlock Text="No agents open" FontSize="20" FontWeight="SemiBold"
HorizontalAlignment="Center"/>
<TextBlock Text="You've closed every agent. Start a new one to begin a conversation — your snapshots and closed conversations are still saved in the rail."
Opacity="0.6" FontSize="13" TextWrapping="Wrap" TextAlignment="Center"/>
<Button Click="AddTab_Click" HorizontalAlignment="Center" Padding="14,7"
Background="{StaticResource MandoAccentBrush}" BorderThickness="0"
AutomationProperties.Name="New agent">
<StackPanel Orientation="Horizontal" Spacing="8">
<FontIcon Glyph="&#xE710;" FontSize="13" Foreground="White"/>
<TextBlock Text="New agent" FontSize="13" Foreground="White"/>
</StackPanel>
</Button>
</StackPanel>
<!-- The copy sits in a bubble, not loose on the backdrop: with a chat background
image behind it (EmptyBgImage, above) plain text landed on whatever the picture
happened to be and was often unreadable. MandoGlassBrush is the panel color with
alpha, the same recipe as the transcript's message bubbles, so the image still
reads THROUGH the card while the text sits on a predictable surface. It stays on
without an image too — panel-on-background is a normal card there, and one
appearance beats a card that pops in and out with the user's wallpaper choice. -->
<Border x:Name="EmptyAgentsState" Visibility="Collapsed"
Grid.ColumnSpan="5" Grid.RowSpan="3"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="{StaticResource MandoGlassBrush}"
BorderBrush="{StaticResource MandoBorderBrush}" BorderThickness="1"
CornerRadius="14" Padding="32,28">
<StackPanel HorizontalAlignment="Center" Spacing="14" MaxWidth="360">
<FontIcon Glyph="&#xE8BD;" FontSize="40" HorizontalAlignment="Center"
Foreground="{StaticResource MandoAccentBrush}" Opacity="0.85"/>
<TextBlock Text="No agents open" FontSize="20" FontWeight="SemiBold"
HorizontalAlignment="Center"/>
<!-- 0.8, not the 0.6 this used to be. Dimming reads as secondary against a
flat panel; over a background image it just costs contrast. -->
<TextBlock Text="You've closed every agent. Start a new one to begin a conversation — your snapshots and closed conversations are still saved in the rail."
Opacity="0.8" FontSize="13" TextWrapping="Wrap" TextAlignment="Center"/>
<Button Click="AddTab_Click" HorizontalAlignment="Center" Padding="14,7"
Background="{StaticResource MandoAccentBrush}" BorderThickness="0"
AutomationProperties.Name="New agent">
<StackPanel Orientation="Horizontal" Spacing="8">
<FontIcon Glyph="&#xE710;" FontSize="13" Foreground="White"/>
<TextBlock Text="New agent" FontSize="13" Foreground="White"/>
</StackPanel>
</Button>
</StackPanel>
</Border>

<!-- ============ SETTINGS PAGE (global defaults) ============
The starting point every NEW agent is seeded from. The identical form, bound to
Expand Down
6 changes: 5 additions & 1 deletion src/MandoCode.Desktop/Services/ThemeManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
using Windows.UI;
Expand Down Expand Up @@ -446,6 +446,10 @@ private static void ApplyCore(UiTheme t, FrameworkElement root)
SetBrush(res, "MandoTextBrush", t.Text);
SetBrush(res, "MandoDimBrush", t.Dim);
SetBrush(res, "MandoRaisedBrush", Raised(t));
// Panel with alpha, for native surfaces painted over the chat background image.
// 0xE6 rather than the transcript's 82%, because XAML has no backdrop blur to
// soften what shows through — the extra opacity does that job instead.
SetBrush(res, "MandoGlassBrush", WithAlpha(C(t.Panel), 0xE6));

// Accent family: Light2 feeds accent fills in dark themes, Dark1 in light
// themes — both pinned to the exact brand accent so fills never drift.
Expand Down
Loading