fix(FN-2098): align no-task heartbeat guidance and stabilize flaky tests

- Update HEARTBEAT_NO_TASK_SYSTEM_PROMPT copy to emphasize inbox, memory, delegation, and heartbeat_done usage
- Expand heartbeat monitor tests to assert no-task prompt/tool alignment and preserve task-scoped prompt behavior
- Harden first-run and App view tests by using a safe cwd fallback and more robust async UI waits
- Add best-effort dashboard performance reporting hooks in App and useProjects via a new reportDashboardPerf API helper
This commit is contained in:
Fusion
2026-04-19 01:30:33 -07:00
committed by gsxdsm
parent c920ecb6e5
commit 58bb0d41b7
7 changed files with 115 additions and 23 deletions

View File

@@ -1205,18 +1205,15 @@ describe("App view switching", () => {
it("renders AgentsView when agents view is selected", async () => {
render(<App />);
// Wait for the header to render
await waitFor(() => {
expect(screen.getByTitle("Agents view")).toBeTruthy();
});
const agentsViewButton = await screen.findByTitle("Agents view", {}, { timeout: 5000 });
// Click to switch to agents view
fireEvent.click(screen.getByTitle("Agents view"));
fireEvent.click(agentsViewButton);
// Agents view should be rendered (it has a agents-view container)
await waitFor(() => {
expect(document.querySelector(".agents-view")).toBeTruthy();
});
}, { timeout: 5000 });
// Should NOT show board or list view
expect(document.querySelector(".board")).toBeNull();
@@ -1228,15 +1225,13 @@ describe("App view switching", () => {
render(<App />);
await waitFor(() => {
expect(screen.getByTitle("Agents view")).toBeTruthy();
});
const agentsViewButton = await screen.findByTitle("Agents view", {}, { timeout: 5000 });
fireEvent.click(screen.getByTitle("Agents view"));
fireEvent.click(agentsViewButton);
await waitFor(() => {
expect(localStorage.getItem(taskViewStorageKey())).toBe("agents");
});
}, { timeout: 5000 });
});
it("initializes agents view from localStorage if saved", async () => {