feat: wider rail and admin sidebar that collapse to icons

Owner review 1, phase 3a (docs/requests/2026-10-15-owner-review-1.md, R1).

The desktop rail is 200 px wide, so the section names fit in every
language, and collapses to 48 px of icons with its ≡ button or Ctrl+B.
Collapsed, each icon's tooltip names its section before saying what it is
for, while screen readers keep the name and the description. The choice is
written to the settings file the moment it changes (nothing else restarts)
and survives Settings › Reset all and Import; Ctrl+B waits behind the
first-run dialog like Ctrl+1…6, and a held key toggles once.

The admin panel's sidebar is 256 px and collapses to icons the same way,
with its own ≡ button or Ctrl+B (on the physical key where the layout's B
types no Latin letter, so Cyrillic, Greek, Hebrew and Arabic layouts work).
The choice is kept in the browser, for the page when the browser refuses
storage, and the tables fit their columns again after each toggle. At
900 px and below it stays the top bar and Ctrl+B stays the browser's.

The wider rail leaves 49-72 px less for every screen at the 1200 px
minimum. Six adversarial review rounds found what that cut, and in every
shipped language no action is cut off now: the Jobs columns share their
width (Target and Progress give way first, Kind/Where/State capped on wide
windows), the editor's preview tools take a second line, a server job's
Cancel has its own header column, the Archive tree keeps a year's label,
the Import rows and result, the certificates and cache rows and the frame
table fit. Headers, titles and cells that may be shortened end in an
ellipsis and show their text in their tooltip; state tooltips start with
the state, and their explanations were reworded not to repeat it (a queued
job "waits for its turn", jobs running one at a time). The crop-result
tool sits beside Crop mask, disabled with its reason while the mask is
off. Tests check these rows in all 38 languages at 1200 px; the App test
program now shuts WPF down in order, so its exit no longer crashes after
every test passed.

Phase 3 lands as two commits: R7 (the Edit section) edits the same shell
files and follows. Also updates BRIEF (12.1, 14.8, 24), DECISIONS,
CHANGELOG, STATUS, the request file, DESIGN and the mockups; every new or
reworded string is in all 38 languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-16 21:50:48 +02:00
1 parent 43b6871cdc
commit 4ea44bb917
131 files changed
+1458 -670

No files matched your search

@@ -310,6 +310,9 @@ public sealed class ArchiveLogicTests
Assert.Equal(StatusKind.Running, recent[0].StateKind);
Assert.Equal(JobState.Done, recent[1].State);
Assert.Equal(StatusKind.Done, recent[1].StateKind, "a finished run is a green dot, a failed one a red cross");
// The row shows a running job's percentage, so its tooltip names the state first; a finished one has no run time to explain.
Assert.Equal(string.Join(Loc.Separator, Loc.L("Jobs.State.Running"), Loc.L("Tooltips.Jobs.State.Running")), recent[0].StateToolTip);
Assert.Equal(Loc.L("Jobs.State.Done"), recent[1].StateToolTip);
}
[Test]
@@ -254,6 +254,83 @@ public sealed class ArchiveScreenSmokeTests
}
}
/// <summary>
/// Beside the 200 px rail at the 1200 px minimum (owner review 1, R1), in every shipped language: a year row shows its year
/// whole (its figures give way, and stay inside the row).
/// </summary>
[Test]
public Task YearRowsKeepTheirYearAtTheMinimumWidthInEveryLanguage() => ScreenHost.RunAsync(async () =>
{
await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
await app.Sample.FillAsync();
await ArchiveScenes.ShowAsync(app.Shell, "overview");
var window = app.Window;
window.Width = 1200;
window.Height = 788;
try
{
foreach (var language in Languages.Shipped)
{
UiLanguage.Apply(language);
window.UpdateLayout();
await window.Dispatcher.InvokeAsync(() => { }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
var years = TreeItems(app).Where(i => ((ArchiveTreeRowViewModel)i.DataContext).IsYear).ToList();
Assert.True(years.Count > 0, $"{language}: year rows show");
foreach (var item in years)
{
var row = (ArchiveTreeRowViewModel)item.DataContext;
var texts = Descendants<TextBlock>(item).Where(t => t.IsVisible).ToList();
var title = texts.Single(t => t.Text == row.Title);
// A copy with the same font, measured by the same layout engine, needs no more room than the year got (layout
// rounding aside: a cut year keeps barely half of it).
var probe = new TextBlock
{
Text = title.Text,
FontFamily = title.FontFamily,
FontSize = title.FontSize,
FontStyle = title.FontStyle,
FontWeight = title.FontWeight,
FontStretch = title.FontStretch,
FlowDirection = title.FlowDirection,
Language = title.Language,
};
TextOptions.SetTextFormattingMode(probe, TextOptions.GetTextFormattingMode(title));
probe.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
Assert.True(probe.DesiredSize.Width <= title.ActualWidth + 1, $"{language}: the year '{row.Title}' is cut ({title.ActualWidth:0} of {probe.DesiredSize.Width:0} px)");
var (left, right) = Span(item, window);
foreach (var text in texts)
{
var (start, end) = Span(text, window);
Assert.True(start >= left - 0.5 && end <= right + 0.5, $"{language}: '{text.Text}' spans {start:0}–{end:0} px, its row {left:0}–{right:0} px");
}
}
}
}
finally
{
UiLanguage.Apply("en");
}
});
/// <summary>The left and right edges of an element in window coordinates, whichever way the window reads.</summary>
private static (double Left, double Right) Span(FrameworkElement element, Window window)
{
var a = element.TranslatePoint(new Point(0, 0), window).X;
var b = element.TranslatePoint(new Point(element.ActualWidth, 0), window).X;
return (Math.Min(a, b), Math.Max(a, b));
}
private static IEnumerable<T> Descendants<T>(DependencyObject node)
where T : DependencyObject
{
for (var i = 0; i < VisualTreeHelper.GetChildrenCount(node); i++)
{
var child = VisualTreeHelper.GetChild(node, i);
if (child is T match) yield return match;
foreach (var nested in Descendants<T>(child)) yield return nested;
}
}
/// <summary>A dialog that has not failed shows no error line.</summary>
private static void AssertNoErrorShown(ScreenSmokeTests.SampleApp app) =>
Assert.False(app.FindAll<StatusGlyph>().Any(g => g.IsVisible && g.Kind == StatusKind.Error && IsInArchive(g)), "no error state before anything failed");