fix(ui): group radio buttons by their panel; the RTL dialog test waits for Loaded

The installer capture builds one window per stage, each with its own view model.
Radio buttons named into one group are shared by every window not yet on screen,
so Just me / All users of two windows unchecked each other forever.
The right-to-left smoke test now waits for the dialog's Loaded event (the first
render can come after an idle tick) instead of an idle dispatcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-06 08:03:13 +00:00
1 parent a56944b628
commit b82f7462f2
7 files changed
+27 -24

No files matched your search

+1
View File
@@ -152,3 +152,4 @@ One line per decision: date · decision · alternative · reason.
| 2026-10-03 | Import sessions merge in the session table and split per photo in Show plan (merges only into the earlier session of the same body and format). Folder and Server destinations run in the screen with a partial result on failure; a server 4xx (not 401/403) fails only that file. Automatic import always goes to this PC's archive. | New job kinds / abort on any error | No job handlers exist for those destinations; §13 lists errors per file; the archive is the gated destination for erase/format. |
| 2026-10-03 | Format gate: every photo on the card must be verified by the job's own import records; non-photo files are listed in the typed confirmation, not blocking; the card is re-listed right before SHFormatDrive, behind a typed confirmation of the card name; a card that leaves needs a new check. | Count only DCIM photos / block on any file | Sony and Canon cards always carry camera files; §8.6 and DESIGN §4. |
| 2026-10-03 | Archive manager: Overview (tree, tiles, charts, mass operations on the tree selection narrowed by a Camera/Status/Tag filter) and Maintenance (health with one fix per line, recent runs, duplicates, orphans); duplicates/orphans searches and retag run in-screen, cancellable and logged; rename apply is journaled and completed at the next open; Maintenance adds a database backup. No Delete… or Merge/split yet. | Engine jobs for every action / Archive.html's single page | No result store for read-only reports; deleting or moving frames needs engine operations (the trash lives in the server). |
| 2026-10-06 | Radio buttons that bind TwoWay are grouped by their shared panel, never by GroupName (kept only for chips in item templates, which bind OneWay). | GroupName on every group | WPF shares a GroupName across every window not yet connected to the screen, so the installer capture (one window per stage, each with its own view model) cross-wired Just me / All users into an endless loop; the same applies to views built in tests and captures. |
+3 -3
View File
@@ -41,11 +41,11 @@
</Grid.ColumnDefinitions>
<StackPanel Margin="0,0,10,0" VerticalAlignment="Top" AutomationProperties.Name="{l:Loc Editor.Chart.Switch}">
<RadioButton Style="{StaticResource RadioButton.ChartSegment}" ui:ControlState.CornerRadius="6,6,0,0" Content="{l:Loc Editor.Chart.Luminance}"
IsChecked="{Binding IsLuminance}" GroupName="ExposureChart" ToolTip="{l:Loc Tooltips.Editor.Chart.Luminance}" />
IsChecked="{Binding IsLuminance}" ToolTip="{l:Loc Tooltips.Editor.Chart.Luminance}" />
<RadioButton Style="{StaticResource RadioButton.ChartSegment}" ui:ControlState.CornerRadius="0" Content="{l:Loc Editor.Chart.Flicker}"
IsChecked="{Binding IsFlicker}" GroupName="ExposureChart" ToolTip="{l:Loc Tooltips.Editor.Chart.Flicker}" />
IsChecked="{Binding IsFlicker}" ToolTip="{l:Loc Tooltips.Editor.Chart.Flicker}" />
<RadioButton Style="{StaticResource RadioButton.ChartSegment}" ui:ControlState.CornerRadius="0,0,6,6" Content="{l:Loc Editor.Chart.Waveform}"
IsChecked="{Binding IsWaveform}" GroupName="ExposureChart" ToolTip="{l:Loc Tooltips.Editor.Chart.Waveform}" />
IsChecked="{Binding IsWaveform}" ToolTip="{l:Loc Tooltips.Editor.Chart.Waveform}" />
</StackPanel>
<v:SeriesChart Grid.Column="1" Series="{Binding Series}" Legend="{Binding Legend}" Markers="{Binding Markers}" Summary="{Binding Summary}"
YLabelFormatter="{Binding YFormatter}" CurrentIndex="{Binding Editor.CurrentIndex, Mode=TwoWay}" ToolTip="{l:Loc Tooltips.Editor.Chart.Seek}"
+8 -8
View File
@@ -341,9 +341,9 @@
<StackPanel Grid.Row="1" IsEnabled="{Binding IsFormEnabled}" Grid.IsSharedSizeScope="True">
<HeaderedContentControl Style="{StaticResource Import.Row}" Header="{l:Loc Import.Label.Destination}">
<WrapPanel>
<RadioButton GroupName="Destination" Content="{l:Loc Import.Destination.Archive}" IsChecked="{Binding IsArchiveDestination}"
<RadioButton Content="{l:Loc Import.Destination.Archive}" IsChecked="{Binding IsArchiveDestination}"
IsEnabled="{Binding CanUseArchive}" ToolTip="{Binding ArchiveToolTip}" />
<RadioButton GroupName="Destination" Content="{l:Loc Import.Destination.Folder}" IsChecked="{Binding IsFolderDestination}"
<RadioButton Content="{l:Loc Import.Destination.Folder}" IsChecked="{Binding IsFolderDestination}"
ToolTip="{l:Loc Tooltips.Import.FolderDestination}" Margin="0,4,8,4" />
<TextBox x:Name="FolderPathBox" Style="{StaticResource TextBox.FolderPath}"
Text="{Binding FolderPath.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}" shell:EditBehavior.Field="{Binding FolderPath}"
@@ -351,7 +351,7 @@
ui:Field.Placeholder="{l:Loc Import.Destination.FolderPlaceholder}" />
<Button Style="{StaticResource Button.Icon}" Width="30" MinWidth="30" Height="30" Margin="6,0,18,0" Content="…" Command="{Binding ChooseDestinationCommand}"
ToolTip="{l:Loc Tooltips.Import.ChooseFolder}" AutomationProperties.Name="{l:Loc Import.Destination.Choose}" />
<RadioButton GroupName="Destination" IsChecked="{Binding IsServerDestination}" IsEnabled="{Binding CanUseServer}" ToolTip="{Binding ServerToolTip}"
<RadioButton IsChecked="{Binding IsServerDestination}" IsEnabled="{Binding CanUseServer}" ToolTip="{Binding ServerToolTip}"
AutomationProperties.Name="{Binding ServerChoiceName}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{l:Loc Import.Destination.Server}" />
@@ -421,17 +421,17 @@
<HeaderedContentControl Style="{StaticResource Import.Row}" Header="{l:Loc Import.Label.Duplicates}">
<WrapPanel>
<RadioButton GroupName="Duplicates" Content="{l:Loc Import.Duplicates.Skip}" IsChecked="{Binding SkipDuplicates}" ToolTip="{l:Loc Tooltips.Import.Skip}" />
<RadioButton GroupName="Duplicates" Content="{l:Loc Import.Duplicates.Again}" IsChecked="{Binding ImportDuplicatesAgain}" ToolTip="{l:Loc Tooltips.Import.Again}" />
<RadioButton Content="{l:Loc Import.Duplicates.Skip}" IsChecked="{Binding SkipDuplicates}" ToolTip="{l:Loc Tooltips.Import.Skip}" />
<RadioButton Content="{l:Loc Import.Duplicates.Again}" IsChecked="{Binding ImportDuplicatesAgain}" ToolTip="{l:Loc Tooltips.Import.Again}" />
</WrapPanel>
</HeaderedContentControl>
<HeaderedContentControl Style="{StaticResource Import.Row}" Header="{l:Loc Import.Label.After}" Margin="0">
<WrapPanel>
<RadioButton GroupName="After" Content="{l:Loc Import.After.Keep}" IsChecked="{Binding KeepCard}" ToolTip="{l:Loc Tooltips.Import.Keep}" />
<RadioButton GroupName="After" Content="{l:Loc Import.After.Delete}" IsChecked="{Binding DeleteImported}" IsEnabled="{Binding CardActionsApply}"
<RadioButton Content="{l:Loc Import.After.Keep}" IsChecked="{Binding KeepCard}" ToolTip="{l:Loc Tooltips.Import.Keep}" />
<RadioButton Content="{l:Loc Import.After.Delete}" IsChecked="{Binding DeleteImported}" IsEnabled="{Binding CardActionsApply}"
ToolTip="{Binding DeleteChoiceToolTip}" />
<RadioButton GroupName="After" Content="{l:Loc Import.After.Format}" IsChecked="{Binding FormatCard}" IsEnabled="{Binding CardActionsApply}"
<RadioButton Content="{l:Loc Import.After.Format}" IsChecked="{Binding FormatCard}" IsEnabled="{Binding CardActionsApply}"
ToolTip="{Binding FormatChoiceToolTip}" />
<Border Width="1" Height="20" Background="{DynamicResource Brush.Stroke}" Margin="0,0,18,0" VerticalAlignment="Center" />
<CheckBox Content="{l:Loc Import.After.Eject}" IsChecked="{Binding Eject}" ToolTip="{l:Loc Tooltips.Import.EjectChoice}" />
+6 -6
View File
@@ -129,9 +129,9 @@
</HeaderedContentControl>
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.General.Theme}">
<WrapPanel VerticalAlignment="Center" Margin="0,4,0,0">
<RadioButton GroupName="Theme" Content="{l:Loc Settings.General.Theme.Dark}" IsChecked="{Binding IsDarkTheme}" ToolTip="{l:Loc Tooltips.Settings.ThemeDark}" Margin="0,0,20,0" />
<RadioButton GroupName="Theme" Content="{l:Loc Settings.General.Theme.Light}" IsChecked="{Binding IsLightTheme}" ToolTip="{l:Loc Tooltips.Settings.ThemeLight}" Margin="0,0,20,0" />
<RadioButton GroupName="Theme" Content="{l:Loc Settings.General.Theme.System}" IsChecked="{Binding IsSystemTheme}" ToolTip="{l:Loc Tooltips.Settings.ThemeSystem}" />
<RadioButton Content="{l:Loc Settings.General.Theme.Dark}" IsChecked="{Binding IsDarkTheme}" ToolTip="{l:Loc Tooltips.Settings.ThemeDark}" Margin="0,0,20,0" />
<RadioButton Content="{l:Loc Settings.General.Theme.Light}" IsChecked="{Binding IsLightTheme}" ToolTip="{l:Loc Tooltips.Settings.ThemeLight}" Margin="0,0,20,0" />
<RadioButton Content="{l:Loc Settings.General.Theme.System}" IsChecked="{Binding IsSystemTheme}" ToolTip="{l:Loc Tooltips.Settings.ThemeSystem}" />
</WrapPanel>
</HeaderedContentControl>
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.General.Usage}">
@@ -221,9 +221,9 @@
</HeaderedContentControl>
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc Settings.Rendering.Hardware}">
<WrapPanel Margin="0,4,0,0">
<RadioButton GroupName="Hardware" Content="{l:Loc Settings.Rendering.PreferHardware}" IsChecked="{Binding IsPreferHardware}" ToolTip="{l:Loc Tooltips.Settings.PreferHardware}" Margin="0,0,18,0" />
<RadioButton GroupName="Hardware" Content="{l:Loc Settings.Rendering.SoftwareOnly}" IsChecked="{Binding IsSoftwareOnly}" ToolTip="{l:Loc Tooltips.Settings.SoftwareOnly}" Margin="0,0,18,0" />
<RadioButton GroupName="Hardware" Content="{l:Loc Settings.Rendering.PreviewsOnly}" IsChecked="{Binding IsHardwareForPreviews}" ToolTip="{l:Loc Tooltips.Settings.PreviewsOnly}" />
<RadioButton Content="{l:Loc Settings.Rendering.PreferHardware}" IsChecked="{Binding IsPreferHardware}" ToolTip="{l:Loc Tooltips.Settings.PreferHardware}" Margin="0,0,18,0" />
<RadioButton Content="{l:Loc Settings.Rendering.SoftwareOnly}" IsChecked="{Binding IsSoftwareOnly}" ToolTip="{l:Loc Tooltips.Settings.SoftwareOnly}" Margin="0,0,18,0" />
<RadioButton Content="{l:Loc Settings.Rendering.PreviewsOnly}" IsChecked="{Binding IsHardwareForPreviews}" ToolTip="{l:Loc Tooltips.Settings.PreviewsOnly}" />
</WrapPanel>
</HeaderedContentControl>
+3 -3
View File
@@ -64,7 +64,7 @@
<StackPanel Margin="0,20,0,0">
<!-- Create a local archive -->
<RadioButton x:Name="LocalChoice" Style="{StaticResource RadioButton.Choice}" GroupName="Welcome" IsChecked="{Binding IsLocal}" ToolTip="{l:Loc Tooltips.Welcome.Local}"
<RadioButton x:Name="LocalChoice" Style="{StaticResource RadioButton.Choice}" IsChecked="{Binding IsLocal}" ToolTip="{l:Loc Tooltips.Welcome.Local}"
AutomationProperties.Name="{l:Loc Shell.Welcome.Local}">
<DockPanel>
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Subtle}" Content="{l:Loc Shell.Welcome.Change}" Command="{Binding ChangeRootCommand}"
@@ -78,7 +78,7 @@
</RadioButton>
<!-- Adopt an existing folder -->
<RadioButton x:Name="AdoptChoice" Style="{StaticResource RadioButton.Choice}" GroupName="Welcome" IsChecked="{Binding IsAdopt}" ToolTip="{l:Loc Tooltips.Welcome.Adopt}"
<RadioButton x:Name="AdoptChoice" Style="{StaticResource RadioButton.Choice}" IsChecked="{Binding IsAdopt}" ToolTip="{l:Loc Tooltips.Welcome.Adopt}"
AutomationProperties.Name="{l:Loc Shell.Welcome.Adopt}">
<DockPanel>
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Subtle}" Content="{l:Loc Shell.Welcome.Choose}" Command="{Binding ChooseAdoptCommand}"
@@ -92,7 +92,7 @@
</RadioButton>
<!-- Connect to a server -->
<RadioButton x:Name="ServerChoice" Style="{StaticResource RadioButton.Choice}" GroupName="Welcome" IsChecked="{Binding IsServer}" ToolTip="{l:Loc Tooltips.Welcome.Server}"
<RadioButton x:Name="ServerChoice" Style="{StaticResource RadioButton.Choice}" IsChecked="{Binding IsServer}" ToolTip="{l:Loc Tooltips.Welcome.Server}"
AutomationProperties.Name="{l:Loc Shell.Welcome.Server}" Margin="0">
<DockPanel>
<ui:StatusGlyph DockPanel.Dock="Right" Kind="Online" Text="{l:Loc Shell.Welcome.Found}" VerticalAlignment="Center" ToolTip="{l:Loc Tooltips.Welcome.Found}"
+2 -2
View File
@@ -53,9 +53,9 @@
<TextBlock Grid.Row="1" Text="{l:Loc Setup.Field.Scope}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Margin="0,0,16,0" />
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
<RadioButton GroupName="Scope" Content="{l:Loc Setup.Scope.JustMe}" IsChecked="{Binding IsJustMe}" IsEnabled="{Binding CanChangeLocation}"
<RadioButton Content="{l:Loc Setup.Scope.JustMe}" IsChecked="{Binding IsJustMe}" IsEnabled="{Binding CanChangeLocation}"
ToolTipService.ShowOnDisabled="True" ToolTip="{Binding JustMeToolTip}" Margin="0,0,20,0" />
<RadioButton GroupName="Scope" Content="{l:Loc Setup.Scope.AllUsers}" IsChecked="{Binding IsAllUsers}" IsEnabled="{Binding CanChangeLocation}"
<RadioButton Content="{l:Loc Setup.Scope.AllUsers}" IsChecked="{Binding IsAllUsers}" IsEnabled="{Binding CanChangeLocation}"
ToolTipService.ShowOnDisabled="True" ToolTip="{Binding AllUsersToolTip}" />
</StackPanel>
@@ -3,7 +3,6 @@ using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
using Titano.App.Infrastructure;
using Titano.App.Sections;
using Titano.App.Server;
@@ -142,8 +141,11 @@ public sealed class SettingsScreenSmokeTests
try
{
Assert.Equal(FlowDirection.RightToLeft, main.FlowDirection);
// Loaded comes with the first render, which can follow an idle tick; class handlers run before this one.
var loaded = new TaskCompletionSource();
dialog.Loaded += (_, _) => loaded.TrySetResult();
dialog.Show();
await dialog.Dispatcher.InvokeAsync(() => { }, DispatcherPriority.ApplicationIdle);
await loaded.Task.WaitAsync(TimeSpan.FromSeconds(10));
Assert.Equal(FlowDirection.RightToLeft, dialog.FlowDirection, "a window opened after the switch (a dialog) is mirrored too");
await app.ExpectAsync<AboutView>("about-ar");