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:
@@ -1382,6 +1382,8 @@ const desktopApi: DesktopApi = {
|
||||
supervision: {
|
||||
activity: (input) => ipcRenderer.invoke(ipcChannels.supervisionActivity, input),
|
||||
pause: (input) => ipcRenderer.invoke(ipcChannels.supervisionPause, input),
|
||||
cancel: (input) => ipcRenderer.invoke(ipcChannels.supervisionCancel, input),
|
||||
execution: () => ipcRenderer.invoke(ipcChannels.supervisionExecution),
|
||||
resume: (input) => ipcRenderer.invoke(ipcChannels.supervisionResume, input),
|
||||
batches: (input) => ipcRenderer.invoke(ipcChannels.supervisionBatches, input),
|
||||
overview: (input) => ipcRenderer.invoke(ipcChannels.supervisionOverview, input),
|
||||
|
||||
@@ -21,6 +21,10 @@ it('reads activity and exact review results through the explicit bridge', async
|
||||
expect(electron.ipcRenderer.invoke).toHaveBeenLastCalledWith(ipcChannels.supervisionOverview, { resultId: 'old-result' })
|
||||
await api.supervision.pause({ runId: 'run' })
|
||||
expect(electron.ipcRenderer.invoke).toHaveBeenLastCalledWith(ipcChannels.supervisionPause, { runId: 'run' })
|
||||
await api.supervision.cancel({ runId: 'run' })
|
||||
expect(electron.ipcRenderer.invoke).toHaveBeenLastCalledWith(ipcChannels.supervisionCancel, { runId: 'run' })
|
||||
await api.supervision.execution()
|
||||
expect(electron.ipcRenderer.invoke).toHaveBeenLastCalledWith(ipcChannels.supervisionExecution)
|
||||
await api.supervision.resume({ runId: 'run' })
|
||||
expect(electron.ipcRenderer.invoke).toHaveBeenLastCalledWith(ipcChannels.supervisionResume, { runId: 'run' })
|
||||
await api.supervision.batches({ runId: 'run', offset: 10, limit: 10 })
|
||||
|
||||
Reference in New Issue
Block a user