fix: address the owner review 5 review
Setup: a kept 1.0 Uploader no longer fixes the scope and folder, the Remove tooltip promises kept files only with a hashed log, and a single-program setup preselects it. The Uploader always downloads the setup. Sync links move to the server id at every sign-in while folders wait for jobs and open editors; jobs of a pending homes sort still find their projects. A shared library exposes only the shared archive's client-visible jobs and events, render nodes take only client renders, and the share counts as its own while starting. Progress: a new step waits a quarter interval and a trailing timer publishes the last state; the job bar tooltip carries the whole line; Recent maintenance and the Server jobs list pick up jobs that start while they are shown. Refs #64 #65 #66 #67 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
817956e719
commit
f30eb2904a
51 files changed
+895
-122
No files matched your search
@@ -193,6 +193,24 @@ public sealed class SingleSetupTests(TestContext context)
|
||||
Assert.Null(LegacyProducts.FindUploader(Manifest("ChronosTest" + Guid.NewGuid().ToString("N")[..12])));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ALegacyUploaderLeftInPlaceFixesNeitherTheScopeNorTheFolder()
|
||||
{
|
||||
var manifest = Manifest();
|
||||
var root = context.CreateTempDirectory("legacy-kept");
|
||||
var legacy = Legacy(Path.Combine(root, "Chronos Uploader"), InstallScope.CurrentUser);
|
||||
var elsewhere = Path.Combine(root, "Apps", "Chronos");
|
||||
|
||||
// The Uploader is not installed, so nothing is merged: the switches decide where Chronos goes.
|
||||
var plan = InstallPlan.Resolve(manifest, new SetupArguments { AllUsers = true, Directory = elsewhere, Components = ["Desktop"] }, null, null, legacy);
|
||||
Assert.Equal(InstallScope.AllUsers, plan.Scope);
|
||||
Assert.Equal(elsewhere, plan.Directory);
|
||||
Assert.SequenceEqual(["Chronos"], plan.Components);
|
||||
Assert.True(plan.CanChangeLocation);
|
||||
Assert.Null(plan.LegacyToReplace(plan.Components, plan.Scope, plan.Directory));
|
||||
Assert.True(plan.LocksLocation(["Chronos", "Uploader"]), "ticking the Uploader would replace the legacy one");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[WindowsOnly]
|
||||
public void ReplacingTheLegacyUploaderMovesItsSignInEntryAndKeepsItTurnedOff()
|
||||
@@ -306,6 +324,31 @@ public sealed class SingleSetupTests(TestContext context)
|
||||
Assert.False(replace.CanChangeLocation);
|
||||
Assert.Equal("Replaces Chronos Uploader 1.0.0", replace.ChangesText);
|
||||
Assert.False(replace.IsUninstallAll);
|
||||
|
||||
// Unticked, the Uploader replaces nothing: the folder and the scope can change; ticked again, they are the legacy copy's.
|
||||
var uploader = Assert.Contains(replace.Components, c => c.Id == "Uploader");
|
||||
uploader.IsSelected = false;
|
||||
Assert.True(replace.CanChangeLocation);
|
||||
replace.IsAllUsers = true;
|
||||
replace.Directory = Path.Combine(root, "Apps", "Chronos");
|
||||
uploader.IsSelected = true;
|
||||
Assert.False(replace.CanChangeLocation);
|
||||
Assert.False(replace.IsAllUsers);
|
||||
Assert.Equal(SetupPaths.DefaultDirectory(InstallScope.CurrentUser, manifest.Product), replace.Directory);
|
||||
}
|
||||
|
||||
// Removing a program of a 1.0 installation (its log has no SHA-256) never promises to keep a changed file.
|
||||
var hashed = ServerLog(directory);
|
||||
hashed.FormatVersion = 2;
|
||||
hashed.Components = ["Chronos", "Uploader"];
|
||||
hashed.Hashes["Chronos.Uploader.exe"] = new string('2', 64);
|
||||
foreach (var (log, key) in new[] { (hashed, "Tooltips.Setup.Changes.Remove"), (ServerLog(directory), "Tooltips.Setup.Changes.RemoveUnchecked") })
|
||||
{
|
||||
log.Components = ["Chronos", "Uploader"];
|
||||
using var removal = SetupViewModel.ForInstall(new SetupArguments(), payload, InstallPlan.Resolve(manifest, new SetupArguments(), existing, log, null));
|
||||
Assert.Contains(removal.Components, c => c.Id == "Uploader").IsSelected = false;
|
||||
Assert.Count(1, removal.Changes);
|
||||
Assert.Equal(Loc.L(key), removal.Changes[0].ToolTip);
|
||||
}
|
||||
|
||||
// A new installation with nothing ticked cannot start, and is no uninstall.
|
||||
|
||||
Reference in new issue
Block a user