feat(FN-3079): add plugin dashboard views and dependency graph plugin
- Add plugin dashboard view registration and hosting across core, dashboard routes, and plugin SDK exports - Integrate plugin-provided views into app navigation, mobile/header UI, and view state hooks with coverage - Add fusion-plugin-dependency-graph example plugin with persisted storage, dashboard view UI, and manifest wiring - Update plugin authoring and architecture docs for dashboard view extension points - Add a changeset for @runfusion/fusion covering plugin dashboard view support Fusion-Task-Id: FN-3079
This commit is contained in:
@@ -4,9 +4,11 @@ import type { ProjectInfo } from "../api";
|
||||
import { getScopedItem, setScopedItem } from "../utils/projectStorage";
|
||||
|
||||
export type ViewMode = "overview" | "project";
|
||||
export type TaskView = "board" | "list" | "agents" | "missions" | "chat" | "documents" | "research" | "roadmaps" | "skills" | "mailbox" | "insights" | "memory" | "devserver" | "dev-server" | "todos";
|
||||
export type BuiltInTaskView = "board" | "list" | "agents" | "missions" | "chat" | "documents" | "research" | "roadmaps" | "skills" | "mailbox" | "insights" | "memory" | "devserver" | "dev-server" | "todos";
|
||||
export type PluginTaskView = `plugin:${string}:${string}`;
|
||||
export type TaskView = BuiltInTaskView | PluginTaskView;
|
||||
|
||||
const TASK_VIEWS: readonly TaskView[] = [
|
||||
const BUILT_IN_TASK_VIEWS: readonly BuiltInTaskView[] = [
|
||||
"board",
|
||||
"list",
|
||||
"agents",
|
||||
@@ -24,8 +26,16 @@ const TASK_VIEWS: readonly TaskView[] = [
|
||||
"todos",
|
||||
];
|
||||
|
||||
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 value !== null && TASK_VIEWS.includes(value as TaskView);
|
||||
return isBuiltInTaskView(value) || isPluginTaskView(value);
|
||||
}
|
||||
|
||||
function normalizeTaskView(value: TaskView): TaskView {
|
||||
|
||||
Reference in New Issue
Block a user