Files
fusion/plugins/fusion-plugin-roadmap
gsxdsm d940bf3d5c FN-8358: add roadmap-item structure previews
Enable native previews and hosted navigation for roadmap items.
- Extend native structure references and API resolution through the roadmap adapter.
- Register the bundled Roadmaps view across desktop and mobile navigation.
- Cover roadmap preview availability, navigation, and route behavior.

Files changed:
 ...n-8358-roadmap-item-native-structure-preview.md |  7 ++++
 docs/dashboard-guide.md                            |  6 ++--
 packages/core/src/types.ts                         | 24 ++++++++-----
 packages/dashboard/app/App.tsx                     | 24 ++++++++-----
 .../dashboard/app/components/LeftSidebarNav.tsx    | 12 +++----
 .../app/components/NativeStructurePreview.tsx      | 10 ++++--
 .../app/components/__tests__/App.test.tsx          | 13 ++++---
 .../app/components/__tests__/Header.test.tsx       |  5 ++-
 .../components/__tests__/LeftSidebarNav.test.tsx   |  5 ++-
 .../app/components/__tests__/MobileNavBar.test.tsx |  4 +--
 .../__tests__/NativeStructurePreview.test.tsx      | 40 ++++++++++++++++------
 .../__tests__/registerBundledPluginViews.test.tsx  | 24 ++++++++++---
 .../app/plugins/registerBundledPluginViews.ts      | 23 +++++++++++++
 packages/dashboard/src/native-structure-preview.ts | 25 +++++++++++++-
 .../native-structure-preview-routes.test.ts        | 31 +++++++++++++++--
 .../src/routes/register-task-workflow-routes.ts    |  4 +--
 packages/dashboard/vite.config.ts                  |  4 +++
 packages/dashboard/vitest.config.ts                |  4 +++
 plugins/fusion-plugin-roadmap/package.json         |  5 +++
 .../fusion-plugin-roadmap/src/dashboard-view.tsx   |  5 +++
 plugins/fusion-plugin-roadmap/src/index.ts         | 14 ++++++--
 21 files changed, 223 insertions(+), 66 deletions(-)

Fusion-Task-Id: FN-8358
Fusion-Task-Lineage: c369ce87-eef0-4d06-bf23-bced9c4363f9
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-19 15:45:45 -07:00
..
2026-07-18 00:52:59 -07:00

fusion-plugin-roadmap

@fusion-plugin-examples/roadmap is the workspace package for the bundled fusion-plugin-roadmap plugin.

Plugin identity

  • Manifest id: fusion-plugin-roadmap
  • Route namespace: /api/plugins/fusion-plugin-roadmap/*
  • Dashboard view: none; the former Roadmaps dashboard view was removed from the app surface.

Package layout

  • manifest.json — plugin metadata
  • src/index.ts — plugin definition (onSchemaInit, routes)
  • src/roadmap-schema.ts — canonical roadmap DDL used by hooks.onSchemaInit
  • src/server/index.ts — backend server exports
  • src/dashboard-view.tsx — legacy source file retained for compatibility while no package export or dashboard metadata points at it
  • src/dashboard/RoadmapsView.tsx — plugin-owned roadmap planner page
  • src/dashboard/useRoadmaps.ts — plugin-owned roadmap CRUD/reorder/suggestions/handoff hook
  • src/dashboard/RoadmapsView.css — plugin-owned roadmap styles
  • src/dashboard/api.ts — plugin-local client for /api/plugins/fusion-plugin-roadmap/*
  • src/roadmap-types.ts + src/store/* — roadmap domain types/store

Exported surfaces

  • Root export: plugin default + roadmap domain helpers/types
  • ./server: roadmap route + AI suggestion service exports

Regression test ownership

Roadmap behavior regression tests live in this plugin package and should stay here (not in @fusion/core or @fusion/dashboard):

  • src/store/__tests__/roadmap-store.test.ts
  • src/store/__tests__/roadmap-ordering.test.ts
  • src/store/__tests__/roadmap-handoff.test.ts
  • src/__tests__/index.test.ts (plugin contract: hooks.onSchemaInit, no dashboard view metadata registration)
  • src/__tests__/roadmap-routes.test.ts
  • src/__tests__/roadmap-suggestions.test.ts (AI suggestion flow uses injected PluginContext.createAiSession() and session lifecycle handling)
  • src/__tests__/api-client.test.ts
  • src/dashboard/__tests__/useRoadmaps.test.ts
  • src/dashboard/__tests__/RoadmapsView.test.tsx

Prefer canonical package exports in tests:

  • plugin/server surface: @fusion-plugin-examples/roadmap or @fusion-plugin-examples/roadmap/server

Use deep source imports only when no package export exists for the target module.

Host vs plugin capability boundaries

Plugin-owned responsibilities:

  • Define roadmap schema DDL in src/roadmap-schema.ts and register it via hooks.onSchemaInit in src/index.ts.
  • Implement roadmap AI suggestion behavior through the injected PluginContext.createAiSession() seam.

Host-owned responsibilities:

  • Execute plugin schema hooks during DB startup and expose resulting tables/indexes to plugin routes.
  • Inject createAiSession() into plugin runtime/route context.
  • Keep the roadmap dashboard view hidden if stale plugin dashboard-view metadata appears in persisted data.

Notes

Roadmap tables are plugin-owned and created via hooks.onSchemaInit in src/index.ts, which delegates to src/roadmap-schema.ts. Core database bootstrap no longer creates roadmap tables/indexes.

Roadmap AI suggestion generation is plugin-owned (src/roadmap-suggestions.ts / src/roadmap-routes.ts) and uses PluginContext.createAiSession() when available. The plugin must not import @fusion/engine directly for suggestion generation.