fix: keep supervisor controls usable and prevent overlapping reviews

Allow only one active review across manual starts, automatic runs and resume. Add cancellation that holds admission through runtime cleanup, preserves saved batches and prevents cancelled runs from resuming.

Keep review controls usable during execution, show a dismissible progress notice and remove redundant filter labels. Include focused regressions and lifecycle documentation.

Release note: Supervision reviews can now be cancelled from Activity records. Starting another review shows the active review instead of duplicating work, while scope, time and refresh controls remain available.
This commit is contained in:
mesalogo
2026-09-26 15:55:50 +08:00
parent 0759d5dcff
commit 5116613615
30 changed files with 653 additions and 92 deletions
+9
View File
@@ -7840,6 +7840,15 @@ export function registerIpcHandlers(
const { runId } = supervisionReviewIdSchema.parse(input)
supervisorService.pause(runId)
})
registerHandler(ipcChannels.supervisionExecution, (event) => {
assertTrustedSender(event, window)
return supervisorService.execution()
})
registerHandler(ipcChannels.supervisionCancel, async (event, input: unknown) => {
assertTrustedSender(event, window)
const { runId } = supervisionReviewIdSchema.parse(input)
await supervisorService.cancel(runId)
})
registerHandler(ipcChannels.supervisionResume, async (event, input: unknown) => {
assertTrustedSender(event, window)
const { runId } = supervisionReviewIdSchema.parse(input)