fix(copies): close the fourth verification round of owner review 6
The fourth verification round of the matches work found 18 defects in the merge, Integrate and Matches surfaces. This commit fixes them: - An Integrate job now carries the planning account's id, so its re-plan decides ownership the way the dialog did. - A merge skips only a project the kept sequence holds a real copy of (name, offset head and history content) and re-points its renders to that copy. - A merge runs its trash checks before the Links stage and records an undo, so an abandoned merge gives the other sequence back its link, session keys and pairs. - The metered hold adopts automatic transfers that were paused before a restart. - Apply in the Compare dialog re-plans when the plan is pending or stale. - The Library's Two versions... lists the second versions a Union merge leaves, each with Drop... (dry run, confirmation, verified partner). A merge job's Open shows that list. - The merge's typed confirmation is the invariant count, and the prompt names it in all 38 languages. - Italian text uses Principale and Gemello. The Main project is named through WorkspaceText in the Projects part and in the twin tooltip. - The session keys tooltip is split into two keys, and To trash... and Delete on server... say why they are disabled. - The capture restores the editor account before the Matches scenes. - Upload again follows SyncHost.CanSendSync (Upload with Edit). - Matches rows trim archive names in the middle on a rebalanced grid; the Projects part rows trim, with the full text in the tooltip. - The sample project targets use ProjectTransplant.FreeName. DECISIONS, CHANGELOG, STATUS 8.7, the request doc and the 16 changed capture baselines are updated. Refs #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3c99badcfe
commit
2c06e7ac2b
171 files changed
+1591
-218
No files matched your search
@@ -507,7 +507,8 @@ public sealed class JobsViewModel : SectionViewModel
|
||||
{
|
||||
var db = Shell.Services.Database;
|
||||
if (db is null || job.TargetIds.Count == 0) return;
|
||||
// Owner review 6, #73: an Integrate shows its pair in Server › Matches; a merge opens the sequence it kept.
|
||||
// Owner review 6, #73: an Integrate shows its pair in Server › Matches; a merge opens the photos the kept sequence
|
||||
// now has in two versions (Union), or the kept sequence when it has none.
|
||||
if (job.Kind == JobKind.Integrate)
|
||||
{
|
||||
var title = await db.Sequences.GetAsync(job.TargetIds[0]) is { } local ? local.DisplayTitle : null;
|
||||
@@ -517,7 +518,15 @@ public sealed class JobsViewModel : SectionViewModel
|
||||
}
|
||||
if (job.Kind == JobKind.MergeSequences)
|
||||
{
|
||||
Shell.OpenSequence(job.TargetIds[0]);
|
||||
var kept = job.TargetIds[0];
|
||||
if (Shell.Services.Sync.Copies is { } copies && await db.Sequences.GetAsync(kept) is not null
|
||||
&& (await copies.VersionsAsync(kept, CancellationToken.None)).Count > 0)
|
||||
{
|
||||
Shell.Navigate(SectionKey.Library);
|
||||
await Shell.Library.ShowVersionsAsync(kept);
|
||||
return;
|
||||
}
|
||||
Shell.OpenSequence(kept);
|
||||
return;
|
||||
}
|
||||
var targets = job.TargetIds.Distinct().ToList();
|
||||
|
||||
@@ -12,11 +12,22 @@
|
||||
<ResourceDictionary Source="pack://application:,,,/Chronos;component/Archive/ArchiveDialogs.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<!-- A double-click is read on the card or row itself: it takes the mouse-down to select, so a gesture on the list never sees it. -->
|
||||
<!-- A card of a sequence in a match that asks for a choice offers Compare… in its menu (owner review 6, #73). -->
|
||||
<!--
|
||||
A card or row of a local sequence offers Two versions… in its menu (the photos it keeps in two versions, owner Q3);
|
||||
one in a match that asks for a choice offers Compare… first (owner review 6, #73).
|
||||
-->
|
||||
<ContextMenu x:Key="Menu.Card" x:Shared="False">
|
||||
<MenuItem Header="{l:Loc Library.Action.Versions}" ToolTip="{l:Loc Tooltips.Library.Versions}"
|
||||
Command="{Binding PlacementTarget.Tag.VersionsItemCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
||||
CommandParameter="{Binding}" />
|
||||
</ContextMenu>
|
||||
<ContextMenu x:Key="Menu.CardMatch" x:Shared="False">
|
||||
<MenuItem Header="{l:Loc Library.Action.Compare}" ToolTip="{l:Loc Tooltips.Library.Compare}"
|
||||
Command="{Binding PlacementTarget.Tag.CompareItemCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
||||
CommandParameter="{Binding}" />
|
||||
<MenuItem Header="{l:Loc Library.Action.Versions}" ToolTip="{l:Loc Tooltips.Library.Versions}"
|
||||
Command="{Binding PlacementTarget.Tag.VersionsItemCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
|
||||
CommandParameter="{Binding}" />
|
||||
</ContextMenu>
|
||||
<Style x:Key="ListBoxItem.LibraryCard" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.Card}">
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
@@ -24,6 +35,9 @@
|
||||
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBox}}" />
|
||||
<EventSetter Event="MouseDoubleClick" Handler="OnItemDoubleClick" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsRemote}" Value="False">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource Menu.Card}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding HasMatch}" Value="True">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource Menu.CardMatch}" />
|
||||
</DataTrigger>
|
||||
@@ -33,7 +47,16 @@
|
||||
<Setter Property="Height" Value="38" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
||||
<Setter Property="AutomationProperties.Name" Value="{Binding Title}" />
|
||||
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBox}}" />
|
||||
<EventSetter Event="MouseDoubleClick" Handler="OnItemDoubleClick" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsRemote}" Value="False">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource Menu.Card}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding HasMatch}" Value="True">
|
||||
<Setter Property="ContextMenu" Value="{StaticResource Menu.CardMatch}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="Button.Header" TargetType="Button" BasedOn="{StaticResource Button.Subtle}">
|
||||
<Setter Property="Height" Value="28" />
|
||||
@@ -99,6 +122,48 @@
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
|
||||
<!-- Two versions…: each version of each photo the sequence keeps in two, with Drop…; an empty list says so. -->
|
||||
<DataTemplate DataType="{x:Type lib:VersionsDialogViewModel}">
|
||||
<Border Style="{StaticResource Border.Dialog}" Width="640" MaxHeight="520">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Heading}" Style="{StaticResource Text.Title}" TextTrimming="CharacterEllipsis" ToolTip="{Binding Heading}" />
|
||||
<TextBlock Grid.Row="1" Text="{l:Loc Library.Versions.Empty}" Foreground="{DynamicResource Brush.TextMuted}" Margin="0,12,0,0"
|
||||
Visibility="{Binding IsEmpty, Converter={StaticResource BoolToVisibility}}" />
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding Rows}" MinHeight="120" Margin="0,12,0,0" AutomationProperties.Name="{Binding Heading}"
|
||||
KeyboardNavigation.TabNavigation="Continue" Visibility="{Binding HasRows, Converter={StaticResource BoolToVisibility}}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.PlainRow}">
|
||||
<Setter Property="AutomationProperties.Name" Value="{Binding FileName}" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type lib:VersionRow}">
|
||||
<DockPanel Height="48">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Content="{l:Loc Server.Copies.Action.Drop}" Command="{Binding DropCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Versions.Drop}" />
|
||||
<StackPanel VerticalAlignment="Center" Margin="0,0,12,0">
|
||||
<TextBlock Text="{Binding FileName}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" ToolTip="{Binding FileName}" />
|
||||
<TextBlock Text="{Binding Detail}" Style="{StaticResource Text.Secondary}" TextTrimming="CharacterEllipsis" ToolTip="{Binding Detail}"
|
||||
Typography.NumeralAlignment="Tabular" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<DockPanel Grid.Row="2" Margin="0,16,0,0">
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Archive.Dialog.Close}" Command="{Binding CloseCommand}" ToolTip="{Binding CloseToolTip}" IsCancel="True"
|
||||
IsDefault="True" MinWidth="96" />
|
||||
<ui:StatusGlyph Style="{StaticResource Status.DialogError}" Margin="0,0,12,0" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Save view / Rename view: one name field. -->
|
||||
<DataTemplate DataType="{x:Type lib:ViewNameDialogViewModel}">
|
||||
<Border Style="{StaticResource Border.Dialog}" Width="460">
|
||||
|
||||
@@ -152,6 +152,8 @@ public sealed class LibraryViewModel : SectionViewModel
|
||||
{
|
||||
if (p is SequenceItem item) CompareItem(item);
|
||||
}, p => p is SequenceItem { HasMatch: true });
|
||||
VersionsItemCommand = new AsyncRelayCommand((p, _) => p is SequenceItem item ? ShowVersionsAsync(item.Id) : Task.CompletedTask,
|
||||
p => p is SequenceItem { IsRemote: false } && Shell.Services.Sync.Copies is not null);
|
||||
SyncItemCommand = new AsyncRelayCommand((p, _) => p is SequenceItem item ? SyncItemAsync(item) : Task.CompletedTask, p => p is SequenceItem { CanSync: true });
|
||||
|
||||
SaveViewCommand = new RelayCommand(() => OpenViewName(rename: false), () => _viewStore is not null);
|
||||
@@ -210,6 +212,20 @@ public sealed class LibraryViewModel : SectionViewModel
|
||||
Shell.Navigate(SectionKey.Server);
|
||||
Shell.Server.Sync.ShowFilter(Chronos.App.Server.SyncFilter.FoundCopies, item.Title);
|
||||
}
|
||||
|
||||
/// <summary>Two versions…: the photos a local sequence keeps in two versions, each with Drop… (owner Q3, #73).</summary>
|
||||
public ICommand VersionsItemCommand { get; }
|
||||
|
||||
/// <summary>Opens Two versions… of local sequence <paramref name="sequenceId"/> (a merge job's Open, the card menu).</summary>
|
||||
public async Task ShowVersionsAsync(Guid sequenceId)
|
||||
{
|
||||
if (Shell.Services.Sync.Copies is not { } copies) return;
|
||||
var title = Items.FirstOrDefault(i => i.Id == sequenceId)?.Title
|
||||
?? (_db is not null && await _db.Sequences.GetAsync(sequenceId) is { } sequence ? sequence.DisplayTitle : string.Empty);
|
||||
var dialog = new VersionsDialogViewModel(copies, sequenceId, title, Shell.Services.Dialogs.Confirm, CloseDialog);
|
||||
OpenDialog(dialog);
|
||||
await dialog.LoadAsync();
|
||||
}
|
||||
public ICommand SaveViewCommand { get; }
|
||||
public ICommand RenameViewCommand { get; }
|
||||
public ICommand DeleteViewCommand { get; }
|
||||
|
||||
@@ -324,13 +324,13 @@
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource Text.Header}" Text="{l:Loc Server.Sync.Column.Server}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="3" Style="{StaticResource Text.Header}" Text="{l:Loc Server.Sync.Column.State}" Margin="10,0,0,0" />
|
||||
</Grid>
|
||||
<!-- Matches: Sequence · This side · Other side · State. The sides ("1,204 photos · Main archive · 18.2 GB") take the
|
||||
room the narrower actions column leaves (at most three buttons). -->
|
||||
<!-- Matches: Sequence · This side · Other side · State. The sides ("1,204 photos · Main archive") take the room the
|
||||
title and the narrower actions column leave (at most three buttons); the rows use the same widths. -->
|
||||
<Grid Visibility="{Binding IsMatches, Converter={StaticResource BoolToVisibility}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.6*" MinWidth="140" />
|
||||
<ColumnDefinition Width="*" MinWidth="160" />
|
||||
<ColumnDefinition Width="*" MinWidth="160" />
|
||||
<ColumnDefinition Width="*" MinWidth="140" />
|
||||
<ColumnDefinition Width="1.4*" MinWidth="180" />
|
||||
<ColumnDefinition Width="1.4*" MinWidth="180" />
|
||||
<ColumnDefinition Width="160" />
|
||||
<ColumnDefinition Width="1.4*" MinWidth="280" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -408,15 +408,15 @@
|
||||
<Border x:Name="RowBorder" Background="Transparent" Padding="14,0">
|
||||
<Grid MinHeight="40">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.6*" MinWidth="140" />
|
||||
<ColumnDefinition Width="*" MinWidth="160" />
|
||||
<ColumnDefinition Width="*" MinWidth="160" />
|
||||
<ColumnDefinition Width="*" MinWidth="140" />
|
||||
<ColumnDefinition Width="1.4*" MinWidth="180" />
|
||||
<ColumnDefinition Width="1.4*" MinWidth="180" />
|
||||
<ColumnDefinition Width="160" />
|
||||
<ColumnDefinition Width="1.4*" MinWidth="280" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Title}" ToolTip="{Binding TitleToolTip}" />
|
||||
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding HereText}" ToolTip="{Binding HereText}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding ThereText}" ToolTip="{Binding ThereText}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding HereText}" ToolTip="{Binding HereToolTip}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding ThereText}" ToolTip="{Binding ThereToolTip}" Margin="10,0,0,0" />
|
||||
<ui:StatusGlyph Grid.Column="3" Kind="{Binding StateKind}" Text="{Binding StateText}" ToolTip="{Binding StateToolTip}"
|
||||
FontSize="13" VerticalAlignment="Center" Margin="10,0,0,0"
|
||||
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding StateAnnouncement}" />
|
||||
|
||||
Reference in new issue
Block a user