fix(jobs): leave a followed render's toast to the editor and bound Open on large jobs
The Jobs screen's flush could take a render's end before the editor that followed it had seen it, and announce it without the output file. It now yields while the open editor follows that render (FollowsRender); an editor closed in between still says it once, without the output. Open on a job over more sequences than a Library page (a maintenance run over a whole archive) now opens the Library as it is instead of looking every target up and paging through the list to select them all. Selecting many cards (Open's selection, Clear selection) counts the selection once instead of once per card over every card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
5 files changed
+164
-22
No files matched your search
@@ -930,7 +930,13 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
if (!_jobs.Concerns(job)) return;
|
||||
_dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
if (_disposed) return;
|
||||
if (_disposed)
|
||||
{
|
||||
// Closed after the Jobs screen left this render's end to it (FollowsRender): said without a read.
|
||||
if (job is { Kind: JobKind.Render, State: JobState.Done } && _jobs.IsActive(job.Id) && Shell.Jobs.ClaimRenderToast(job.Id))
|
||||
AnnounceRender(job, read: false);
|
||||
return;
|
||||
}
|
||||
var wasActive = _jobs.IsActive(job.Id);
|
||||
// Progress alone (several times a second on a server) only moves the server job's text and bar.
|
||||
if (_jobs.Track(job)) OnBusyChanged();
|
||||
@@ -1037,6 +1043,12 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This editor follows the render (UI thread): it saw it wait or run and has not seen it end yet, so it will take its
|
||||
/// toast (<see cref="Sections.JobsViewModel.ClaimRenderToast"/>) when it does.
|
||||
/// </summary>
|
||||
internal bool FollowsRender(Guid jobId) => !_disposed && _jobs.IsActive(jobId);
|
||||
|
||||
/// <summary>"Render finished" with the output file and Show in folder; <paramref name="read"/>: the sequence was read again after the render.</summary>
|
||||
private void AnnounceRender(Job render, bool read)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user