feat(FN-3737): add even realities integration research report

Adds a new Even Realities integration research report to the documentation.

Fusion-Task-Id: FN-3737
This commit is contained in:
Fusion
2026-05-08 10:41:44 -07:00
committed by gsxdsm
parent 7b4cd5ed25
commit d90d66538a
18 changed files with 308 additions and 70 deletions

View File

@@ -47,7 +47,7 @@ function makeManifest(overrides?: Partial<{ id: string; version: string; name: s
{
viewId: "graph",
label: "Graph",
componentPath: "./src/DependencyGraphView.tsx",
componentPath: "./dashboard-view",
icon: "Network",
placement: "more",
order: 40,

View File

@@ -255,11 +255,18 @@ export function useTasks(options?: UseTasksOptions) {
}
const { task, to }: { task: Task; from: Column; to: Column } = JSON.parse(e.data);
const normalizedTask = normalizeTask(task);
setTasks((prev) =>
prev.map((t) =>
t.id === normalizedTask.id ? { ...normalizedTask, column: normalizeColumn(to, normalizedTask.column) } : t
)
);
const movedTask = { ...normalizedTask, column: normalizeColumn(to, normalizedTask.column) };
setTasks((prev) => {
const existingIndex = prev.findIndex((t) => t.id === movedTask.id);
if (existingIndex === -1) {
// SSE created event was missed (e.g., reconnect gap); upsert so the
// task becomes visible instead of being silently dropped.
return [...prev, movedTask];
}
const next = [...prev];
next[existingIndex] = movedTask;
return next;
});
lastFetchTimeMs.current = Date.now();
};
@@ -270,12 +277,18 @@ export function useTasks(options?: UseTasksOptions) {
return;
}
const incoming = normalizeTask(JSON.parse(e.data) as Task);
setTasks((prev) =>
prev.map((t) => {
if (t.id !== incoming.id) return t;
return mergeIncomingTask(t, incoming);
})
);
setTasks((prev) => {
const existingIndex = prev.findIndex((t) => t.id === incoming.id);
if (existingIndex === -1) {
return [...prev, incoming];
}
const current = prev[existingIndex]!;
const merged = mergeIncomingTask(current, incoming);
if (merged === current) return prev;
const next = [...prev];
next[existingIndex] = merged;
return next;
});
lastFetchTimeMs.current = Date.now();
};
@@ -297,11 +310,16 @@ export function useTasks(options?: UseTasksOptions) {
}
const { task }: { task: Task } = JSON.parse(e.data);
const normalizedTask = normalizeTask(task);
setTasks((prev) =>
prev.map((t) =>
t.id === normalizedTask.id ? { ...normalizedTask, column: "done" as Column } : t
)
);
const mergedTask = { ...normalizedTask, column: "done" as Column };
setTasks((prev) => {
const existingIndex = prev.findIndex((t) => t.id === mergedTask.id);
if (existingIndex === -1) {
return [...prev, mergedTask];
}
const next = [...prev];
next[existingIndex] = mergedTask;
return next;
});
};
const unsubscribe = subscribeSse(`/api/events${query}`, {

View File

@@ -9,7 +9,7 @@ import type { Roadmap, RoadmapMilestone, RoadmapFeature, RoadmapStore } from "@f
// vi.mock is hoisted
vi.mock("../../../plugins/fusion-plugin-roadmap/src/routes/roadmap-suggestions.js", () => {
vi.mock("@fusion-plugin-examples/roadmap/roadmap-suggestions", () => {
// Define error classes inside the factory - these will be used by the mocked module
class MockValidationError extends Error { name = "ValidationError"; constructor(m: string) { super(m); } }
class MockParseError extends Error { name = "ParseError"; constructor(m: string) { super(m); } }