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 d9a806f61a
commit ca6fefd6ca
7 changed files with 115 additions and 23 deletions

View File

@@ -3,6 +3,7 @@ import type { ProjectInfo } from "../api";
import {
fetchProjectsAcrossNodes,
registerProject,
reportDashboardPerf,
unregisterProject,
updateProject,
type ProjectCreateInput,
@@ -59,13 +60,22 @@ export function useProjects(): UseProjectsResult {
async function load() {
setLoading(true);
const t0 = performance.now();
try {
const data = await fetchProjectsAcrossNodes();
const elapsed = Math.round(performance.now() - t0);
const msg = `initial fetchProjectsAcrossNodes took ${elapsed}ms (${data.length} projects)`;
console.log(`[useProjects] ${msg}`);
reportDashboardPerf("[useProjects]", msg);
if (!cancelled) {
setProjects(data);
setError(null);
}
} catch (err) {
const elapsed = Math.round(performance.now() - t0);
const msg = `initial fetch failed after ${elapsed}ms: ${err instanceof Error ? err.message : String(err)}`;
console.warn(`[useProjects] ${msg}`);
reportDashboardPerf("[useProjects]", msg);
if (!cancelled) {
setError(err instanceof Error ? err.message : "Failed to fetch projects");
}