feat(FN-4095): restore green verification gates and add QuickChatFAB regres

Restores green verification gates for executor review verdicts (FN-4095) with a targeted core store change, and adds a regression test ensuring the QuickChatFAB scrolls to the bottom when opened.

Fusion-Task-Id: FN-4095
This commit is contained in:
Fusion
2026-05-12 06:03:41 -07:00
committed by gsxdsm
parent fc863f6e96
commit 2be89d15fd
3 changed files with 28 additions and 1 deletions

View File

@@ -3277,6 +3277,8 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
task.status = undefined;
task.error = undefined;
task.blockedBy = undefined;
task.paused = undefined;
task.pausedByAgentId = undefined;
const hasNonPendingStepProgress = task.steps.some((step) => step.status !== "pending");
const preserveStepProgress =

View File

@@ -811,4 +811,29 @@ describe("QuickChatFAB session-first UX", () => {
expect(scrollTopValue).toBe(scrollHeightValue);
});
});
it("FN-4095: snaps to bottom on uncontrolled initial open (FAB click) with preloaded messages", async () => {
mockFetchChatMessages.mockResolvedValueOnce({
messages: [{ id: "msg-open", sessionId: "session-model", role: "assistant", content: "Loaded", createdAt: new Date().toISOString() }],
});
render(<QuickChatFAB addToast={vi.fn()} projectId="proj-1" />);
fireEvent.click(screen.getByTestId("quick-chat-fab"));
const messages = await screen.findByTestId("quick-chat-messages");
let scrollTopValue = 0;
const scrollHeightValue = 1400;
Object.defineProperty(messages, "scrollHeight", { configurable: true, get: () => scrollHeightValue });
Object.defineProperty(messages, "scrollTop", {
configurable: true,
get: () => scrollTopValue,
set: (value: number) => {
scrollTopValue = value;
},
});
await waitFor(() => {
expect(scrollTopValue).toBe(scrollHeightValue);
});
});
});

View File

@@ -133,7 +133,7 @@ describe("TaskExecutor enginePaused soft pause (no agent termination)", () => {
"Task marked complete with summary. All steps done. Moving to in-review.",
);
expect(watchdogSpy).toHaveBeenCalledWith("FN-001", "fn_task_done");
expect(store.updateTask).toHaveBeenCalledWith("FN-001", { status: null });
expect(store.updateTask).toHaveBeenCalledWith("FN-001", expect.objectContaining({ status: null }));
expect(store.moveTask).toHaveBeenCalledWith("FN-001", "in-review");
});