feat(KB-145): add global pause button to halt all AI engine activity

- Add globalPause setting to core Settings type with default false
- Guard scheduler, triage, and auto-merge queue to skip work when globalPause is active
- Add pause/play toggle button in dashboard Header with optimistic UI and rollback on failure
- Add tests for scheduler, triage, Header, and App global pause behavior
- Include minor changeset for the new feature
This commit is contained in:
Dustin Byrne
2026-03-28 01:01:05 -04:00
parent e0f33fb32c
commit 50821fc820
11 changed files with 399 additions and 8 deletions

View File

@@ -95,6 +95,10 @@ export interface TaskCreateInput {
}
export interface Settings {
/** When true, all automated agent activity is halted — triage specification,
* task scheduling, execution, and auto-merge. Acts as a global emergency stop
* for the entire AI engine. Individual per-task pause flags are unaffected. */
globalPause?: boolean;
/** Maximum number of concurrent AI agents across all activity types
* (triage specification, task execution, and merge operations). */
maxConcurrent: number;
@@ -137,6 +141,7 @@ export interface Settings {
}
export const DEFAULT_SETTINGS: Settings = {
globalPause: false,
maxConcurrent: 2,
maxWorktrees: 4,
pollIntervalMs: 15000,