Allow cancelling "Export Report" from JSON Tool Service API - #4546
Draft
nickshulman wants to merge 13 commits into
Draft
Allow cancelling "Export Report" from JSON Tool Service API#4546nickshulman wants to merge 13 commits into
nickshulman wants to merge 13 commits into
Conversation
* Added GetRunningJobs and CancelJob, backed by a new JobProgressStatus * Served each request on its own thread so a disconnect abandons only the wait * Ran the report verbs as jobs, cancellable by id and shown in the status bar * Rebuilt SkylineAiConnector.zip for the two new MCP tools See ai/todos/active/TODO-20260806_api_cancel_jobs.md Co-Authored-By: Claude <noreply@anthropic.com>
* Moved the job registry out of JsonToolServer into RunningJobs, so the UI can start and end a job the same way the tool service does * Added a LongWaitDlg button, offered only when the caller names the job, that hands the running work to a job and returns PerformWork to its caller * Made the report export self-contained so it can outlive the export dialog See ai/todos/active/TODO-20260806_api_cancel_jobs.md Co-Authored-By: Claude <noreply@anthropic.com>
* Added LongWaitDlg.StartJob, which offers the Run in Background button and reports whether the work completed, was canceled, or is still running * Added Tools > Running Jobs, also reached by double-clicking the status bar, listing what is running and canceling the selected job * Renamed RunningJobs to BackgroundJobs and RunningJob to BackgroundJob * Re-recorded KeyboardShortcuts.html for the new menu item See ai/todos/active/TODO-20260806_api_cancel_jobs.md Co-Authored-By: Claude <noreply@anthropic.com>
* Added a three-button prompt on close: View Jobs, Terminate Jobs, Cancel * Added BackgroundJobs.CancelAll for the Terminate Jobs button * Renamed the Running Jobs dialog button to Terminate Job, so one word means stopping a job and Cancel always means cancelling the dialog See ai/todos/active/TODO-20260806_api_cancel_jobs.md Co-Authored-By: Claude <noreply@anthropic.com>
* Asked whether to stop the running jobs, naming the one or counting the many, then waited for them to end with a wait the user can give up on * Skipped the question when everything running has already been asked to stop * Dropped the View Jobs option, and used "stop" for the action everywhere See ai/todos/active/TODO-20260806_api_cancel_jobs.md Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…yline/work/20260806_api_cancel_jobs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added "GetRunningJobs" and "CancelJob" to IJsonToolService (requested by Mike)
When exporting a report using IJsonToolServer.Export report, the client can disconnect the pipe, and then connect again and call "GetRunningJobs" which returns a list of what is running, and can then call "CancelJob" passing in one of the GUIDs of a running job.
If the user wants to cancel a job that is running in the background, they can bring up the Running Jobs window with "Tools > Running Jobs"

Another feature that has been added is when you are exporting a report from "File > Export > Report", there is a "Run in background" button which you can push so you can continue using Skyline while the report is still being written.

If you try to exit Skyline while jobs are still running you see a message box like this;
