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 5d03d355cd
commit e0fcc7e2fa
3 changed files with 28 additions and 1 deletions

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);
});
});
});