feat(FN-2340): merge fusion/fn-2340

This commit is contained in:
gsxdsm
2026-04-23 22:57:21 -07:00
parent 10ea91a137
commit b7233e833d
13 changed files with 592 additions and 203 deletions

View File

@@ -273,6 +273,18 @@ describe("GlobalSettingsStore", () => {
expect(settings.ntfyDashboardHost).toBeUndefined();
});
it("persists custom ntfy event lists including planning-awaiting-input", async () => {
await store.init();
await store.updateSettings({ ntfyEvents: ["planning-awaiting-input", "failed"] });
const raw = JSON.parse(await readFile(join(dir, "settings.json"), "utf-8"));
expect(raw.ntfyEvents).toEqual(["planning-awaiting-input", "failed"]);
const settings = await store.getSettings();
expect(settings.ntfyEvents).toEqual(["planning-awaiting-input", "failed"]);
});
it("clearing ntfyEvents with null resets to default on read", async () => {
await store.init();
await store.updateSettings({ ntfyEvents: ["in-review", "failed"] });
@@ -287,7 +299,7 @@ describe("GlobalSettingsStore", () => {
// After clear, reading back gives the default value
// (either undefined on disk with default applied, or default written directly)
const settings = await store.getSettings();
expect(settings.ntfyEvents).toEqual(["in-review", "merged", "failed", "awaiting-approval", "awaiting-user-review"]);
expect(settings.ntfyEvents).toEqual(["in-review", "merged", "failed", "awaiting-approval", "awaiting-user-review", "planning-awaiting-input"]);
});
it("handles concurrent updates safely via locking", async () => {

View File

@@ -21,7 +21,7 @@ export const DEFAULT_GLOBAL_SETTINGS = {
defaultThinkingLevel: undefined,
ntfyEnabled: false,
ntfyTopic: undefined,
ntfyEvents: ["in-review", "merged", "failed", "awaiting-approval", "awaiting-user-review"],
ntfyEvents: ["in-review", "merged", "failed", "awaiting-approval", "awaiting-user-review", "planning-awaiting-input"],
ntfyDashboardHost: undefined,
defaultProjectId: undefined,
setupComplete: undefined,

View File

@@ -140,7 +140,7 @@ export interface WorkflowStep {
/** Input for creating a new workflow step. */
/** Event types that can trigger ntfy notifications */
export type NtfyNotificationEvent = "in-review" | "merged" | "failed" | "awaiting-approval" | "awaiting-user-review";
export type NtfyNotificationEvent = "in-review" | "merged" | "failed" | "awaiting-approval" | "awaiting-user-review" | "planning-awaiting-input";
export interface WorkflowStepInput {
/** Built-in template source ID when creating a concrete step from a template. */