feat(FN-4023): preserve triage column when SSE updates contain only priorit
Fix FN-4023: preserve the triage column filter when SSE updates only carry priority changes, preventing unintended column resets during selective priority refreshes. Added regression tests across the task store, useTasks hook, and API routes to cover column-stability scenarios. Fusion-Task-Id: FN-4023
This commit is contained in:
@@ -36,6 +36,18 @@ describe("TaskStore", () => {
|
||||
expect(detail.priority).toBe("normal");
|
||||
});
|
||||
|
||||
it("keeps triage tasks in triage when only priority changes", async () => {
|
||||
const task = await harness.store().createTask({
|
||||
description: "Planning task with manual review",
|
||||
column: "triage",
|
||||
priority: "normal",
|
||||
});
|
||||
|
||||
const updated = await harness.store().updateTask(task.id, { priority: "urgent" });
|
||||
expect(updated.priority).toBe("urgent");
|
||||
expect(updated.column).toBe("triage");
|
||||
});
|
||||
|
||||
it("preserves explicit priority through archive and unarchive", async () => {
|
||||
const task = await harness.store().createTask({
|
||||
description: "Archive priority task",
|
||||
|
||||
@@ -169,6 +169,20 @@ describe("TaskStore", () => {
|
||||
});
|
||||
|
||||
|
||||
describe("updateTask — priority", () => {
|
||||
it("does not move triage tasks when only priority is updated", async () => {
|
||||
const task = await store.createTask({
|
||||
description: "Planning task",
|
||||
column: "triage",
|
||||
priority: "normal",
|
||||
});
|
||||
|
||||
const updated = await store.updateTask(task.id, { priority: "urgent" });
|
||||
expect(updated.column).toBe("triage");
|
||||
expect(updated.priority).toBe("urgent");
|
||||
});
|
||||
});
|
||||
|
||||
describe("updateTask — blockedBy", () => {
|
||||
it("sets blockedBy to a string value", async () => {
|
||||
const task = await store.createTask({ title: "Blocked task", description: "A task" });
|
||||
|
||||
Reference in New Issue
Block a user