feat(FN-3157): add plugin dashboard view registry with nav integration

Merged FN-3157 to add a plugin dashboard views system, including a plugin view registry with lazy loading, navigation integration for Header and MobileNavBar, a usePluginDashboardViews hook with cache and refetch support, and tests covering the no-loader path. Also added documentation in `docs/PLUGI

Fusion-Task-Id: FN-3157
This commit is contained in:
Fusion
2026-05-05 12:08:44 -07:00
committed by gsxdsm
parent 24a91131db
commit 03c0348b9e
14 changed files with 253 additions and 75 deletions

View File

@@ -2,6 +2,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
import type { ThemeMode } from "@fusion/core";
import type { ProjectInfo } from "../api";
import { getScopedItem, setScopedItem } from "../utils/projectStorage";
import { isPluginViewId } from "../plugins/pluginViewRegistry";
export type ViewMode = "overview" | "project";
export type BuiltInTaskView = "board" | "list" | "agents" | "missions" | "chat" | "documents" | "research" | "roadmaps" | "skills" | "mailbox" | "insights" | "memory" | "devserver" | "dev-server";
@@ -29,12 +30,8 @@ function isBuiltInTaskView(value: string | null): value is BuiltInTaskView {
return value !== null && BUILT_IN_TASK_VIEWS.includes(value as BuiltInTaskView);
}
function isPluginTaskView(value: string | null): value is PluginTaskView {
return value !== null && /^plugin:[^:]+:.+$/u.test(value);
}
function isTaskView(value: string | null): value is TaskView {
return isBuiltInTaskView(value) || isPluginTaskView(value);
return value !== null && (isBuiltInTaskView(value) || isPluginViewId(value));
}
function normalizeTaskView(value: TaskView): TaskView {