How megahoma/mf-dashboard works
MF Dashboard is a VS Code sidebar extension for discovering workspace Module Federation apps, probing app and remote status, and managing federated type packages. The main workflow runs from extension activation through dashboard refresh and rendering; row actions can start apps, fetch types, or rebuild producer types and refresh consumers. The README documents the status rules, tree/flat layouts, Problems integration, and first-open settings behavior. Several feature modules are indexed but not excerpted, so uncertain internal call paths are omitted or shown as unverified.
Main entry points: provider.ts Dashboard provider · session.ts Dashboard session · workflow.ts Rebuild workflow · extension.ts Extension activation
Components 23
Extension and view
- Extension activation
src/app/extension.ts - Dashboard provider
src/widgets/mf-dashboard-tree/provider.ts - Dashboard session
src/widgets/mf-dashboard-tree/session.ts - Initial settings
src/features/init-settings/defaults.ts
Federation discovery
- App discovery
src/entities/microfrontend/discover.ts - Config parsing
src/entities/microfrontend/syntax.ts - Manifest and port probes
src/entities/microfrontend/probe.ts - Manifest modules
src/entities/microfrontend/manifest-modules.ts
Status and display
- Status classification
src/entities/status/classify.ts - Problems diagnostics
src/entities/status/problems.ts - Tree presentation
src/widgets/mf-dashboard-tree/presentation.ts
Federated types
- Producer evidence
src/features/rebuild-types/evidence.ts - Rebuild planning
src/features/rebuild-types/plan.ts - Rebuild workflow
src/features/rebuild-types/workflow.ts - Type generation
src/features/rebuild-types/generate.ts - Types observation
src/entities/federated-types/observe.ts - Archive installation
src/entities/federated-types/install.ts - Source freshness
src/entities/federated-types/sources.ts
User actions
- Row action resolution
src/widgets/mf-dashboard-tree/targets.ts - Start app
src/features/start-app/start.ts - Fetch types
src/features/refetch-types/refetch.ts
Other components
- Workspace
- VS Code
Connections 23
- Workspace → Extension activation: opens workspace
- Extension activation → Dashboard provider: registers view
src/app/extension.ts - Dashboard provider → Dashboard session: creates session
src/widgets/mf-dashboard-tree/provider.ts - Dashboard session → App discovery: loads apps
src/widgets/mf-dashboard-tree/session.ts - Dashboard session → Manifest and port probes: runs probes
src/widgets/mf-dashboard-tree/session.ts - App discovery → Config parsing: parses configs
src/entities/microfrontend/discover.ts - Manifest and port probes → Manifest modules: reads modules
src/entities/microfrontend/probe.ts - Dashboard provider → Status classification: classifies rows
- Dashboard provider → Problems diagnostics: reports failures
- Dashboard session → Tree presentation: builds nodes
src/widgets/mf-dashboard-tree/session.ts - Extension activation → Initial settings: initializes settings
src/app/extension.ts - Dashboard provider → Rebuild workflow: starts rebuild
src/widgets/mf-dashboard-tree/provider.ts - Rebuild workflow → Producer evidence: collects evidence
src/features/rebuild-types/workflow.ts - Rebuild workflow → Rebuild planning: plans work
src/features/rebuild-types/workflow.ts - Rebuild workflow → Type generation: generates types
src/features/rebuild-types/workflow.ts - Dashboard provider → Types observation: observes installed types
- Types observation → Source freshness: checks freshness
- Dashboard provider → Archive installation: installs refreshed types
- Dashboard provider → Row action resolution: resolves row actions
- Dashboard provider → Start app: starts app
src/widgets/mf-dashboard-tree/provider.ts - Dashboard provider → Fetch types: fetches types
src/widgets/mf-dashboard-tree/provider.ts - Fetch types → Archive installation: installs archive
src/features/refetch-types/refetch.ts - VS Code → Dashboard provider: hosts sidebar