fix(phase4): close the owner review 1 phase 4 findings

Routing sizes render jobs from the resolved preset, and the node wait
applies the same routing as the claim, so a re-routed job neither keeps a
stale size nor waits for a node that will never take it. Settings an older
server cannot read stay on this side for the remote editor, archive sync
and workspace push, and the reason is shown where it applies. A turn on
one side and a framing on the other merge as one conflict.

Orientation and framing fixes: an out-of-range crop turns with the content
it shows, the aspect text transposes exactly, the Rotation row counts
turns as shown on screen, and Reset framing undoes the orientation press
by press, so keyframes and aspect stay on their content. The advisor
places the horizon in the view as shown. A look at zero strength is
cleared and no longer reaches the motion vectors.

Preview changes: the middle button pans, a press inside a box with no
slack pans while zoomed, the selected box shows a ring, and screen readers
hear when the crop value changes. Tooltips in en and it updated; stale
translations of changed tooltips removed so they fall back to English.

Test changes: the pinned hash is OS-independent, and the tautological
encoder and warning assertions became real checks. Added a non-screen
test of the Straighten slider binding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-04 21:40:07 +01:00
1 parent 4e21aaa548
commit eeaddc2d14
83 files changed
+823 -270

No files matched your search

@@ -57,6 +57,73 @@ public sealed class OrientationEditTests
Assert.Equal(text, Framed.ToJson());
}
/// <summary>
/// Values off the 12-decimal grid (a crop or keyframe centre an older Chronos, a hand or another program wrote) cannot
/// come back bit for bit, as 1 − v drops bits of a v below ½: they land on the grid at the first press, no visible change,
/// and from then on every net-zero sequence of presses gives back the same text.
/// </summary>
[Test]
public void ValuesOffTheGridLandOnItOnceAndThenStay()
{
var legacy = new ProjectSettings
{
Camera = new CameraSettings { Crop = [1 / 3.0, 0.2, 0.25, 0.3], Keyframes = [new CameraKey(0, 0.47368421052631576, 1 / 7.0, 1.5, 0)] },
};
var once = legacy;
for (var k = 0; k < 4; k++) once = OrientationEdit.Apply(once, OrientationOp.RotateRight);
Assert.Approximately(1 / 3.0, once.Camera.Crop![0], 1e-12);
Assert.Approximately(0.47368421052631576, once.Camera.Keyframes[0].CenterX, 1e-12);
Assert.Approximately(1 / 7.0, once.Camera.Keyframes[0].CenterY, 1e-12);
var text = once.ToJson();
var turned = once;
for (var k = 0; k < 4; k++) turned = OrientationEdit.Apply(turned, OrientationOp.RotateRight);
Assert.Equal(text, turned.ToJson(), "four turns of gridded values");
var mirrored = OrientationEdit.Apply(OrientationEdit.Apply(once, OrientationOp.Mirror), OrientationOp.Mirror);
Assert.Equal(text, mirrored.ToJson(), "two mirrors of gridded values");
foreach (var op in Ops)
{
var opposite = op switch
{
OrientationOp.RotateLeft => OrientationOp.RotateRight,
OrientationOp.RotateRight => OrientationOp.RotateLeft,
_ => op,
};
Assert.Equal(text, OrientationEdit.Apply(OrientationEdit.Apply(once, op), opposite).ToJson(), $"{op} undone");
}
// What the editor writes itself is on the grid already.
Assert.Equal(0.473684210526, CropFrame.Grid(0.47368421052631576));
}
/// <summary>A crop out of range turns with the content it shows (as it renders, clamped), not with its stored numbers.</summary>
[Test]
public void AnOutOfRangeCropTurnsWithTheContentItShows()
{
var camera = new CameraSettings { Crop = [0.5, 0, 0.7, 1] };
Assert.Equal(new RectD(0.5, 0, 0.5, 1), CropFrame.Of(camera.Crop));
var mirrored = OrientationEdit.Apply(camera, OrientationOp.Mirror);
Assert.Equal(new RectD(0, 0, 0.5, 1), CropFrame.Of(mirrored.Crop), "the left half: the right half mirrored");
var turned = OrientationEdit.Apply(camera, OrientationOp.RotateRight);
Assert.Equal(new RectD(0, 0.5, 1, 0.5), CropFrame.Of(turned.Crop), "the right half turned clockwise is the bottom half");
// A crop in range stays as stored.
Assert.SequenceEqual([0.6, 0.2, 0.3, 0.4], OrientationEdit.Apply(new CameraSettings { Crop = [0.1, 0.2, 0.3, 0.4] }, OrientationOp.Mirror).Crop!);
}
/// <summary>A turn transposes the aspect text as written, never reduced: turning back gives the stored text (21:9, not 7:3).</summary>
[Test]
public void TurningBackGivesTheStoredAspectText()
{
foreach (var aspect in new[] { "21:9", "1920:1080", "16:9", "4/5" })
{
var project = new ProjectSettings { Camera = new CameraSettings { Aspect = new Auto<string>().WithManual(aspect) } };
var right = OrientationEdit.Apply(project, OrientationOp.RotateRight);
Assert.True(AspectRatio.TryParse(right.Camera.Aspect.Manual, out var transposed));
Assert.True(AspectRatio.TryParse(aspect, out var stored));
Assert.Equal((stored.Height, stored.Width), (transposed.Width, transposed.Height));
Assert.Equal(project.ToJson(), OrientationEdit.Apply(right, OrientationOp.RotateLeft).ToJson(), aspect);
}
Assert.Equal("9:21", OrientationEdit.Transposed(new Auto<string>().WithManual("21:9")).Manual);
}
[Test]
public void MirrorMovesTheCropAndNegatesTheAngles()
{