feat(FN-4153): complete Step 6 — add general ephemeral agents toggle
Fusion-Task-Id: FN-4153 Fusion-Task-Lineage: 6ec09467-c7a0-4a9d-9a09-16d5ef6f7a86
This commit is contained in:
@@ -1975,6 +1975,22 @@ export function SettingsModal({
|
||||
</label>
|
||||
<small>When enabled, AI-generated task specifications require manual approval before moving to Todo</small>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label htmlFor="ephemeralAgentsEnabled" className="checkbox-label">
|
||||
<input
|
||||
id="ephemeralAgentsEnabled"
|
||||
type="checkbox"
|
||||
checked={form.ephemeralAgentsEnabled !== false}
|
||||
onChange={(e) =>
|
||||
setForm((f) => ({ ...f, ephemeralAgentsEnabled: e.target.checked }))
|
||||
}
|
||||
/>
|
||||
Use ephemeral task-worker agents
|
||||
</label>
|
||||
<small>
|
||||
When enabled (default), Fusion spawns short-lived <code>executor-FN-XXXX</code> agents to run each task. When disabled, only permanent agents execute tasks and the scheduler auto-assigns work using the agent reporting chain. Tasks with no eligible permanent agent stay queued.
|
||||
</small>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label htmlFor="completionDocumentationMode">Completion Documentation Automation</label>
|
||||
<select
|
||||
|
||||
@@ -184,6 +184,7 @@ const defaultSettings = {
|
||||
verificationFixRetries: 2,
|
||||
workflowRevisionForkOnScopeMismatch: true,
|
||||
recycleWorktrees: false,
|
||||
ephemeralAgentsEnabled: true,
|
||||
executorAllowSiblingBranchRename: false,
|
||||
worktreeNaming: "random",
|
||||
includeTaskIdInCommit: true,
|
||||
@@ -717,6 +718,24 @@ describe("SettingsModal", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("saves ephemeral agent toggle in project settings payload", async () => {
|
||||
renderModal({ initialSection: "general" });
|
||||
await waitForSettingsModalReady();
|
||||
|
||||
const ephemeralToggle = screen.getByLabelText("Use ephemeral task-worker agents") as HTMLInputElement;
|
||||
expect(ephemeralToggle.checked).toBe(true);
|
||||
|
||||
await userEvent.click(ephemeralToggle);
|
||||
await userEvent.click(screen.getByRole("button", { name: "Save" }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(mockUpdateSettings).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
const payload = mockUpdateSettings.mock.calls[0][0] as Record<string, unknown>;
|
||||
expect(payload.ephemeralAgentsEnabled).toBe(false);
|
||||
});
|
||||
|
||||
it("renders and saves GitHub tracking controls in the General section", async () => {
|
||||
renderModal({ initialSection: "general" });
|
||||
await waitForSettingsModalReady();
|
||||
|
||||
Reference in New Issue
Block a user