feat(cli): merge @fusion/tui into fn dashboard with Ink TUI
Replace the legacy ANSI-based DashboardTUI with an Ink/React rewrite under packages/cli/src/commands/dashboard-tui/, delete the standalone @fusion/tui package, and make `fn` (no args) launch the dashboard. The new TUI keeps the existing 5-panel status mode (system, logs, utilities, stats, settings) but adds an interactive mode (b/a/g) with three views: a kanban board with project picker and per-task detail, an agents list+detail with state management, and a settings editor. Bordered focus-aware panels, solid-background help overlay, static all-blue FUSION splash that adapts to small terminals. DashboardTUI and DashboardLogSink public API are unchanged so dashboard.ts only needed import-path updates plus interactiveData/loadingStatus wiring. Also adds zod to @fusion/dashboard to satisfy a peer dep introduced by pi-coding-agent 0.70. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ At a high level, Fusion is split into:
|
||||
- **Dashboard API + SPA** (`@fusion/dashboard`)
|
||||
- **CLI + Pi extension** (`@runfusion/fusion`)
|
||||
- **Desktop shell** (`@fusion/desktop`)
|
||||
- **TUI** (`@fusion/tui`)
|
||||
- **Terminal dashboard** (part of `@runfusion/fusion` — see `packages/cli/src/commands/dashboard-tui/`)
|
||||
|
||||
### High-level runtime diagram
|
||||
|
||||
@@ -64,7 +64,6 @@ At a high level, Fusion is split into:
|
||||
| `@fusion/dashboard` | Private | Express API server + React app | `packages/dashboard/src/server.ts`, `routes.ts`, `sse.ts`, `websocket.ts`, `packages/dashboard/app/App.tsx` |
|
||||
| `@runfusion/fusion` | **Published** | CLI binary (`fn`) + Pi extension | `packages/cli/src/bin.ts`, `commands/*`, `project-resolver.ts`, `extension.ts` |
|
||||
| `@fusion/desktop` | Private | Electron shell around Fusion dashboard/client | `packages/desktop/src/main.ts`, `ipc.ts`, `preload.ts`, `scripts/build.ts` |
|
||||
| `@fusion/tui` | Private | Ink-based terminal package with ScreenRouter and tab navigation | `packages/tui/src/index.tsx`, `packages/tui/src/components/screen-router.tsx` |
|
||||
| `@fusion/mobile` | Private | Capacitor + PWA mobile packaging of dashboard assets | `packages/mobile/capacitor.config.ts`, `packages/mobile/src/*` |
|
||||
| `@fusion/plugin-sdk` | Private | Plugin SDK for building Fusion extensions | `packages/plugin-sdk/src/*` |
|
||||
|
||||
@@ -83,7 +82,6 @@ At a high level, Fusion is split into:
|
||||
@runfusion/fusion (CLI) ─────────▶ @fusion/core
|
||||
@runfusion/fusion (CLI) ─────────▶ @fusion/engine
|
||||
@runfusion/fusion (CLI) ─────────▶ @fusion/dashboard
|
||||
@fusion/tui ──────────────────▶ @fusion/core
|
||||
@fusion/plugin-sdk (peerDep) ─▶ @fusion/core
|
||||
|
||||
@fusion/desktop: no workspace package dependencies
|
||||
@@ -94,7 +92,6 @@ Concrete references:
|
||||
- `@fusion/engine` has a workspace dependency on `@fusion/core` (`packages/engine/package.json`)
|
||||
- `@fusion/dashboard` has workspace dependencies on `@fusion/core` and `@fusion/engine` (`packages/dashboard/package.json`)
|
||||
- `@runfusion/fusion` has workspace development dependencies on `@fusion/core`, `@fusion/engine`, and `@fusion/dashboard` for composition/build packaging (`packages/cli/package.json`)
|
||||
- `@fusion/tui` depends on `@fusion/core` (`packages/tui/package.json`)
|
||||
- `@fusion/plugin-sdk` declares a peer dependency on `@fusion/core` (`packages/plugin-sdk/package.json`)
|
||||
- `@fusion/desktop` embeds dashboard assets at build time via script (`packages/desktop/scripts/build.ts`) but does not declare workspace deps in `package.json`
|
||||
- `@fusion/mobile` triggers dashboard build/sync via scripts (`packages/mobile/package.json`) but does not declare workspace deps in `package.json`
|
||||
|
||||
@@ -32,7 +32,6 @@ pnpm build
|
||||
| `@fusion/core` | Shared domain types, stores, persistence, and core utilities |
|
||||
| `@fusion/dashboard` | Express API + React UI |
|
||||
| `@fusion/engine` | Scheduling, triage, execution, merge orchestration |
|
||||
| `@fusion/tui` | Ink-based terminal UI components |
|
||||
| `@fusion/desktop` | Electron shell around Fusion dashboard/client |
|
||||
| `@fusion/mobile` | Capacitor + PWA mobile packaging |
|
||||
| `@fusion/plugin-sdk` | Plugin SDK for building Fusion extensions |
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
# FN-1205 System Gap Analysis
|
||||
|
||||
Date: 2026-04-08
|
||||
Scope: `packages/core`, `packages/engine`, `packages/dashboard`, `packages/cli`, `packages/tui`, `packages/desktop`
|
||||
Scope: `packages/core`, `packages/engine`, `packages/dashboard`, `packages/cli`, `packages/desktop`
|
||||
|
||||
## 1) Incomplete & Stub Packages
|
||||
|
||||
### Finding 1.1 — `@fusion/tui` has basic screen navigation (**Medium**)
|
||||
- Evidence: `packages/tui/src/index.tsx` renders `DemoApp` with `FusionProvider` and `ScreenRouter`. The `ScreenRouter` component (`packages/tui/src/components/screen-router.tsx`) provides keyboard-navigable tab switching with support for five screens (board, detail, activity, agents, settings). Number keys 1-5 and Tab/Shift+Tab navigate between tabs. However, the actual screen content is still placeholder text.
|
||||
- Impact: The TUI package now has a foundation for real screen implementations, but full task views and integration points remain to be built.
|
||||
- Existing tracking: **FN-1055** and **FN-1470** track TUI development.
|
||||
### Finding 1.1 — Terminal dashboard is now part of `@runfusion/fusion` (**Resolved**)
|
||||
- The standalone `@fusion/tui` package has been removed. Terminal UI is implemented in `packages/cli/src/commands/dashboard-tui/` using Ink (React for terminals). The dashboard-tui module provides a fully working 5-panel TUI (system, logs, utilities, stats, settings) integrated into the `fn dashboard` command and launched by default when running `fn` with no arguments.
|
||||
|
||||
### Finding 1.2 — `packages/desktop` is implemented, not a placeholder (**Info / correction to preflight assumption**)
|
||||
- Evidence: `packages/desktop` contains `package.json`, `tsconfig.json`, `vitest.config.ts`, `README.md`, build scripts, and substantial source files (`src/main.ts`, `src/ipc.ts`, `src/menu.ts`, `src/tray.ts`, `src/preload.ts`, renderer components/hooks, etc.).
|
||||
@@ -228,7 +226,7 @@ Impact:
|
||||
|
||||
| Dimension | Gap count | Notes |
|
||||
|---|---:|---|
|
||||
| 1. Incomplete & Stub Packages | 1 | `@fusion/tui` remains stub (desktop/runtime/ipc are implemented) |
|
||||
| 1. Incomplete & Stub Packages | 0 | `@fusion/tui` merged into `@runfusion/fusion`; desktop/runtime/ipc are implemented |
|
||||
| 2. Missing Test Coverage | 16 (direct file-level gaps) | Concentrated in dashboard/cli utility layers |
|
||||
| 3. Naming & Branding | 4 | User-facing `kb` strings remain across CLI, extension, dashboard |
|
||||
| 4. Error Handling & Silent Failures | 4 | Includes two high-severity runtime reliability issues |
|
||||
|
||||
Reference in New Issue
Block a user