- 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
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import { Settings, Pause, Play } from "lucide-react";
|
|
|
|
interface HeaderProps {
|
|
onOpenSettings?: () => void;
|
|
globalPaused?: boolean;
|
|
onToggleGlobalPause?: () => void;
|
|
}
|
|
|
|
export function Header({ onOpenSettings, globalPaused, onToggleGlobalPause }: HeaderProps) {
|
|
return (
|
|
<header className="header">
|
|
<div className="header-left">
|
|
<img src="/logo.svg" alt="kb logo" className="header-logo" width={24} height={24} />
|
|
<h1 className="logo">kb</h1>
|
|
<span className="logo-sub">board</span>
|
|
</div>
|
|
<div className="header-actions">
|
|
<button
|
|
className={`btn-icon${globalPaused ? " btn-icon--paused" : ""}`}
|
|
onClick={onToggleGlobalPause}
|
|
title={globalPaused ? "Resume AI engine" : "Pause AI engine"}
|
|
>
|
|
{globalPaused ? <Play size={16} /> : <Pause size={16} />}
|
|
</button>
|
|
<button className="btn-icon" onClick={onOpenSettings} title="Settings">
|
|
<Settings size={16} />
|
|
</button>
|
|
</div>
|
|
</header>
|
|
);
|
|
}
|