Web prototype → Compose Multiplatform (Desktop + Web) — unified Blueprint Editor
✓ 1. Inventory — What Already Exists
Reaktor Modules (production-quality)
| Module | Status | Role in Blueprint Editor |
|---|---|---|
reaktor-graph-port |
Complete | Port, Edge, Visitor/Selector/Traverser foundation. Type-safe ConsumerPort<T> / ProviderPort<T> with events. |
reaktor-graph |
Complete | Graph runtime: 6 node types, lifecycle, autoWire, navigation, DI, service layer. The single source of truth for all editor data. |
reaktor-flow |
Complete | Compose graph canvas: ReaktorGraphEditor, blueprint layout, minimap, legend, toolbar, region overlays. Built on compose-flow. |
compose-flow |
Complete | Compose Multiplatform port of React Flow. Rendering, pan/zoom, handle connections, node dragging. |
reaktor-ui |
Complete | Compose UI primitives, ComposeNode, ComposeRenderer for live preview. |
reaktor-io |
Complete | Network + serialization. Will power Deploy screen CI API calls and telemetry fetches. |
reaktor-db |
Complete | SQLite runtime. Stores command history, workspace state, cached manifests. |
reaktor-auth |
Complete | Auth for cloud service connections (GitHub, Cloudflare, analytics providers). |
Engine Module (bestbuds/modules/engine)
| Component | Status | Description |
|---|---|---|
ReaktorWorkbench |
Done | Main shell: header, sidebar, resizable panels, Graph/App mode toggle. Foundation for the full shell. |
ReaktorWorkbenchGraphPane |
Done | Wraps ReaktorGraphEditor from reaktor-flow. Pan, zoom, node selection, edge rendering all working. |
ReaktorWorkbenchTreePanel |
Done | Recursive graph/node tree view with expand/collapse. Maps to the web prototype's LeftSidebar. |
ReaktorWorkbenchInspectorPanel |
Done | Node detail inspector: ID, type, ports as chips, route attachments, navigation targets. Partial coverage of the web's 13 type-aware inspectors. |
ReaktorWorkbenchPreviewPanel |
Done | Live Compose preview of selected node's Content(). Foundation for the Run screen. |
ReaktorComposeSemanticsInspector |
Done | 2300+ line Compose runtime semantics inspector. Reads CompositionData for click-to-inspect. This is UNIQUE — no equivalent in the web prototype. |
ReaktorGraphDocument |
Done | JSON export of graph for LLM consumption. Foundation for the agent/command pattern integration. |
What the web prototype has that the engine does NOT
| Web Feature | Engine Status | Gap |
|---|---|---|
| 5-mode toolbar (Graph, Run, DevTools, Deploy, Insights) | 2 modes (Graph, App) | Build 3 screens |
| Bottom drawer (Traces, Logs, Agent, Diagnostics, Commands, Queue, CodeDiff) | None | Build drawer system |
| Command palette (Cmd+K) | None | Build search/command UI |
| 13 type-aware inspectors with sparklines | 1 generic inspector | Extend inspector |
| Deploy topology (CloudFormation-style) | None | Build deploy screen |
| Insights dashboard (timelines, heatmaps) | None | Build insights screen |
| Drilldown causal trace (waterfall) | None | Build devtools screen |
| Status strip (bottom bar) | None | Build status bar |
| WYSIWYG device preview with frame | Live Compose preview (no frame) | Add device frame |
| Command queue + CodeDiff viewer | Graph document JSON export | Build command pattern |
| Edge type overlay filters | Legend with kind filter chips | Mostly done in reaktor-flow |
| Cross-mode navigation (entity → any screen) | Single-mode selection | Build navigation model |
◎ 2. Target Architecture
Module Dependency Chain
New Module: reaktor-workbench
A commonMain Compose Multiplatform module that contains all the shared Blueprint Editor UI. Both the Desktop target (reaktorDesktop) and the Web target (reaktorWeb-compose) depend on this single module. No screen logic lives in target-specific code.
Directory Structure
reaktor-workbench/ src/commonMain/kotlin/dev/shibasis/reaktor/workbench/ shell/ WorkbenchShell.kt // Main shell: top bar, mode toolbar, panels, drawer, status WorkbenchMode.kt // enum: Graph, Run, DevTools, Deploy, Insights WorkbenchState.kt // ViewModel: selected entity, mode, drawer state, panel sizes TopBar.kt // Project name, branch, env indicator, search trigger ModeToolbar.kt // 5-mode tab bar with keyboard shortcuts StatusStrip.kt // Bottom status bar: mode label, entity count, build status sidebar/ LeftSidebar.kt // Extend existing TreePanel: mode-aware content, search SidebarSearch.kt // Filter entities by name/type/module/tag inspector/ InspectorPanel.kt // Extend existing InspectorPanel with type dispatch InspectorState.kt // Scroll-linked section tabs, section visibility tracking bodies/ RouteInspector.kt // Route: status, screens, trace sparkline ScreenInspector.kt // Screen: render preview, crash rate, session count ContainerInspector.kt // Container: child graph list, nav targets UiInspector.kt // UI element: props, click chain, design overlay ActionInspector.kt // Action/Interactor: signature, downstream chain ServiceInspector.kt // Service: endpoints, p95, error rate EdgeInspector.kt // Edge: latency histogram, deploy target, cert status DbInspector.kt // DB: schema, row count, query performance ReleaseInspector.kt // Release: CI pipeline, artifacts, promote CTA drawer/ DrawerPanel.kt // Bottom drawer with resize handle and tab bar DrawerTab.kt // enum: Traces, Logs, Agent, Diagnostics, Commands, Queue, CodeDiff TraceViewer.kt // Recent traces with timing, status, provider LogViewer.kt // Filterable log stream AgentChat.kt // LLM agent chat interface (Claude Code model) DiagnosticsPanel.kt // Graph health, port wiring status CommandQueue.kt // Pending GraphCommand list with preview CodeDiffViewer.kt // Side-by-side diff preview for generated code screens/ graph/ GraphScreen.kt // Wraps ReaktorGraphEditor + edge filter controls GraphModeControls.kt // Overlay toggles, edge type filters run/ RunScreen.kt // WYSIWYG preview with device frame DeviceFrame.kt // Phone/tablet/desktop frame with notch, status bar ComponentTree.kt // Compose semantics tree (bidirectional selection) RunModeControls.kt // Device type, theme, network mode pills devtools/ DevToolsScreen.kt // Causal trace drilldown TraceRail.kt // Vertical waterfall with duration bars BlastRadiusPanel.kt // Computed blast radius from graph edges TestImpactPanel.kt // Test coverage for selected entity deploy/ DeployScreen.kt // Topology view + CI pipeline DeployTopology.kt // Visual partition map (edge, db, kv, queue, bucket) CIPipeline.kt // CI steps with status indicators DeployModeControls.kt // Local/Staging/Production env switcher insights/ InsightsScreen.kt // Analytics dashboard InsightsTimeline.kt // Time series chart with deploy markers InsightsHeatmap.kt // Route x Metric heatmap grid InsightsModeControls.kt // Time range (1h/24h/7d/30d), route filter search/ CommandPalette.kt // Cmd+K modal: entity search, command search SearchResult.kt // Result item: type badge, title, source, module commands/ GraphCommand.kt // Sealed hierarchy: AddNode, ConnectPorts, SetProperty, etc. CommandExecutor.kt // Apply command to graph, record in history CommandHistory.kt // Undo/redo stack, persistence to SQLite agent/ AgentInterface.kt // Agent chat protocol, tool invocations GraphTool.kt // Tools: read_graph, select_entity, navigate_to, etc. CodeGenBridge.kt // Bridge: command batch → LLM → CodeDiff theme/ WorkbenchTheme.kt // Dark/light theme tokens matching prototype palette WorkbenchTypography.kt // Font scales, mono font for code sections src/jvmMain/ PlatformBridge.kt // Desktop: file system, process launch (IntelliJ/VSCode) src/jsMain/ PlatformBridge.kt // Web: clipboard, URL routing, service worker
Data Flow
The existing reaktor-flow analysis identifies fixes needed. We assume these will be completed before Phase 1. Key items:
- compose-flow edge rendering — ensure bezier edges respect handle positions and edge types render with distinct colors/dash patterns
- Node drag position persistence —
mergeGraphNodes()already preserves drag positions across model rebuilds; verify this works reliably - Selection events —
onNodeClick/onEdgeClickcallbacks must propagate to the workbench shell for inspector wiring - Kind filter chips —
GraphKindLegendalready implements clickable filter chips; verify they filter nodes in the canvas - Zoom controls —
GraphViewportToolbarhas fit/100%/zoom buttons; verify they call the correct viewport APIs
Deliverable: All 10 GraphFlowIntegrationTest tests pass, and manual verification in the Desktop app shows interactive graph editing.
1.1 WorkbenchState ViewModel
Central state holder replacing the web prototype's ScenarioContext. Lives in commonMain, consumed by all screens.
class WorkbenchState {
val mode: MutableStateFlow<WorkbenchMode> // Graph, Run, DevTools, Deploy, Insights
val selectedEntityId: MutableStateFlow<String?> // Currently inspected entity
val drawerOpen: MutableStateFlow<Boolean>
val drawerTab: MutableStateFlow<DrawerTab>
val searchOpen: MutableStateFlow<Boolean>
val leftCollapsed: MutableStateFlow<Boolean>
val rightCollapsed: MutableStateFlow<Boolean>
val leftWidth: MutableStateFlow<Float> // dp
val rightWidth: MutableStateFlow<Float> // dp
val drawerHeight: MutableStateFlow<Float> // dp
val deployEnv: MutableStateFlow<DeployEnv> // Local, Staging, Production
val deviceMode: MutableStateFlow<DeviceMode> // Phone, Tablet, Desktop
val themeMode: MutableStateFlow<ThemeMode> // Light, Dark
val commandQueue: MutableStateFlow<List<GraphCommand>>
fun navigateTo(mode: WorkbenchMode, entityId: String?) // Cross-mode navigation
fun openDrawerTab(tab: DrawerTab) // Open drawer to specific tab
fun pushCommand(cmd: GraphCommand) // Enqueue a graph command
}
1.2 WorkbenchShell Composable
Port of AppShell from app.jsx. Uses Compose BoxWithConstraints for responsive layout.
- Top bar: Project name, branch indicator, env badge, Cmd+K trigger
- Mode toolbar: 5 icon+label tabs, Cmd+1–5 shortcuts
- Three-column layout: Left sidebar + center screen + right inspector, with draggable resize handles
- Bottom drawer: Collapsible panel with 7 tabs, draggable height
- Status strip: Mode label, entity count, build status, clock
- Responsive collapse: Auto-collapse panels when window is narrow (< 1200dp right, < 900dp both)
1.3 Cross-Mode Navigation
The web prototype's navigateTo(sc, mode, entityId) becomes WorkbenchState.navigateTo(). Every "Open in Graph" / "Follow action chain" / "View in Deploy" button calls this. The selected entity is preserved across mode switches.
1.4 Keyboard Shortcuts
| Shortcut | Action | Web equivalent |
|---|---|---|
Cmd+K | Toggle command palette | Same |
Cmd+1..5 | Switch mode | Same |
Escape | Close palette / deselect | Same |
\ | Toggle drawer | Same |
Arrow Up/Down | Walk active path | Same |
Cmd+Shift+O | Open in IDE | New |
1.5 Porting from Existing Engine Code
The current ReaktorWorkbench already has:
- Header with mode toggle (Graph/App) → extend to 5 modes
- Resizable panels with sidebar → reuse panel infrastructure
- App switcher → keep for multi-project support
Migration: refactor ReaktorWorkbench to accept a WorkbenchState and delegate screen rendering to the mode-specific composable.
Existing in reaktor-flow
- Done Canvas with pan/zoom —
ReaktorGraphEditorwraps compose-flow with keyboard zoom shortcuts - Done Blueprint layout —
BlueprintReaktorGraphLayoutStrategywith semantic lanes, multi-column, regions - Done Node cards —
ReaktorGraphNodeCardwith title bar, port columns, badge - Done Edge rendering — via compose-flow with kind-based color/width
- Done Minimap —
GraphMiniMapwith click-to-pan and viewport rect - Done Legend —
GraphKindLegendwith clickable filter chips - Done Zoom toolbar —
GraphViewportToolbarwith fit/100%/zoom controls - Done Region overlays —
GraphRegionsOverlaywith dashed borders and labels
To add
- New Overlay toggle dropdown — The prototype has an "Overlays" button that shows/hides edge types (route, parent, consumes, invokes, writes, emits, deploys). Wire this to the existing
GraphKindLegendfilter or add an explicit overlay popover. - New Node hover tooltip — On hover, show a floating card with type badge, title, source file, p95/error rate. Only show if not already selected (don't overlap with inspector).
- New Container node rendering — Container nodes should have dashed borders and transparent backgrounds. The
reaktorNodeKind()classifier already identifies containers; extendReaktorGraphNodeCardto render them distinctly. - New Port-anchored edge endpoints — Edges currently connect center-to-center. Route edges from
handleOffset()inReaktorFlowMeasurement. Connect same-row edges horizontally, parent edges right→left. - New Selection → WorkbenchState sync — When a node is clicked in the graph, set
workbenchState.selectedEntityId. The inspector panel reacts to this change.
Effort estimate
~20% new code on top of existing reaktor-flow. Most work is wiring, not building.
Existing in Engine
- Done Live Compose preview —
ScreenPreviewPanelrenders selected node'sContent()composable with parameterized route guard - Done Compose semantics inspector —
ReaktorComposeSemanticsInspectorreadsCompositionDatafor component tree, click-to-inspect (Desktop only)
To build
DeviceFrame composable
Wraps the live preview in a phone/tablet/desktop chrome frame. Purely visual — uses Compose Canvas for the notch, status bar, rounded corners. Dimensions from WorkbenchState.deviceMode:
- Phone: 312 x 624 dp, radius 36, notch
- Tablet: 500 x 700 dp, radius 24
- Desktop: 680 x 440 dp, radius 10
RunModeControls
Pill bar at top of center area: device type toggle, theme toggle (light/dark invert), network mode (online/slow/offline overlay badge).
Bidirectional Component Tree ↔ Entity Selection
When a composable is clicked in the preview, the semantics inspector identifies it → map to a graph entity via source location → update selectedEntityId. Conversely, selecting a UI entity in the graph highlights the corresponding composable in the preview.
Desktop: Full semantics inspector with CompositionData access.
Web: Compose/JS doesn't expose LocalInspectionTables. Use a Modifier.semantics-based approach: tag each composable with its graph entity ID, then use PointerInputScope hit testing.
Floating Graph Link Card
When a UI element is selected in the preview, show a floating card (like the prototype's FloatingGraphLink) with: type pill, entity name, source file, action chain strip, latest trace, and "Open in Graph" / "Follow action chain" / "Open in IDE" buttons.
Platform difference
| Feature | Desktop (JVM) | Web (JS) |
|---|---|---|
| Live preview | Full Compose rendering via Content() | Full Compose rendering via Compose/JS canvas |
| Click-to-inspect | CompositionData + LocalInspectionTables | Modifier.semantics tag-based hit test |
| Network simulation | Interceptor on reaktor-io OkHttp client | Interceptor on fetch/XHR |
Data source
Every port invocation emits a PortInvocationEvent (from reaktor-graph-port). The DevTools screen collects these into a trace timeline. For the MVP, use mock trace data (like the web prototype's DRILLDOWN_SPANS). The real integration will wire PortInvocationEvent listeners.
Components
TraceRail
Vertical waterfall with one card per span. Each card shows:
- Colored left border by entity type
- Type pill + entity name + source file
- Duration bar (proportional to total trace time)
- Timing text (offset from trace start)
- Click → select entity → update inspector
- Hover action buttons: "Open in Graph", "Open in IDE"
BlastRadiusPanel
Starting from selected entity, walk N hops through edges, count unique entities and modules. Show a summary card ("14 entities across 6 modules") with expandable list. Computed from the real graph via Traverser.
TestImpactPanel
Find all commands/entities that depend on the selected entity. Cross-reference with test fixtures. Show "12 tests (Maestro 4, Unit 8)" with clickable test names.
Connection to graph runtime
The Visitor pattern in reaktor-graph-port provides exactly the traversal needed. Use ConnectivitySelector with BreadthFirstTraverser to compute blast radius. The causal trace is a specialized visitor that collects PortInvocationEvents in order.
Components
DeployTopology
Visual partition map showing all deployment targets extracted from the graph. The prototype's DEPLOY_PARTITIONS (edge, db, kv, queue, bucket) are derived from node types and deploys edge relationships.
Data source: Walk graph edges with type deploys. Group by target platform (Cloudflare Workers, D1, R2, KV, Queue). Each partition shows resource name, status indicator, endpoint URL.
Click interaction: Clicking a partition item sets selectedEntityId to the corresponding edge/db entity → inspector shows deployment-specific details.
CIPipeline
CI step visualization with status indicators (passed/running/queued/failed). Steps derived from a BuildManifest or fetched from CI API (GitHub Actions, Cloudflare Pages).
Environment switching: Local (all green) / Staging (mixed) / Production (gated promote). WorkbenchState.deployEnv controls which pipeline view is shown.
DeployModeControls
Three pill buttons: Local, Staging, Production. Plus a "Deploy" primary action button that changes label per environment.
Real integration path
MVP: Static topology from GraphManifest. Phase 2: Wire reaktor-io to poll GitHub Actions API and Cloudflare API for live status. Phase 3: Trigger deploys from the workbench.
Components
InsightsTimeline
Time-series chart with deploy markers (vertical dashed lines). Shows request volume, error rate, or custom metric. Time range controlled by WorkbenchState.insightsRange (1h/24h/7d/30d). Rendered using Compose Canvas with polyline + filled area.
InsightsHeatmap
Route × Metric grid. Rows = routes from graph, columns = metrics (p50, p95, p99, error rate, volume). Cell color = green→yellow→red gradient. Click cell → select route entity + open inspector with performance section.
Data source: Routes from graph navigation edges. Metrics from telemetry API or mock data.
Metric Cards
Top-level summary cards: Active Users, Avg Response Time, Error Rate, Deployment Frequency. Each with sparkline and trend indicator.
Platform data sources
| Provider | Data | Integration |
|---|---|---|
| Cloudflare Analytics | Request volume, error rate, latency | reaktor-io REST API |
| Supabase | Database query metrics | reaktor-io REST API |
| Custom telemetry | App-specific events via PortInvocationEvent | Graph runtime events |
Type dispatch
The existing NodeDetailPanel in the engine module is a generic inspector. Replace it with a type-dispatching system:
@Composable
fun TypeAwareInspector(state: WorkbenchState, graph: Graph) {
val entityId = state.selectedEntityId.collectAsState().value ?: return
val entity = graph.findEntity(entityId) ?: return
when (entity) {
is RouteNode -> RouteInspector(entity, state)
is ComposeNode -> when {
entity.isScreen() -> ScreenInspector(entity, state)
entity.isUi() -> UiInspector(entity, state)
}
is ContainerNode -> ContainerInspector(entity, state)
is ControllerNode -> ActionInspector(entity, state) // actions + interactors
is ServiceNode -> ServiceInspector(entity, state)
is BasicNode -> BasicInspector(entity, state)
// Edge types dispatched separately
}
}
Inspector body structure (each type)
Every inspector follows the same pattern from the web prototype:
- Header: Type pill + entity name + source file link
- Section tabs: Scrollable tab bar that tracks which section is in view (IntersectionObserver equivalent via
LaunchedEffect+ scroll state) - Sections: Overview → Metrics (sparklines) → Connections (port list) → Source → Actions
- Footer actions: "Open in Graph" / "Open in IDE" / "Follow action chain" buttons
Mode-sensitive sections
The inspector adds extra sections based on the current mode:
- Insights mode: Performance section with flamegraph placeholder, correlation with deploy markers
- Deploy mode: Deployment target section with status, endpoint, cert info
- DevTools mode: Recent traces section with timing details
Sparkline composable
Reusable Sparkline composable using Compose Canvas. Replaces the web prototype's SVG sparklines. Auto-sizes to container width (no hardcoded pixel widths).
Command Palette (Cmd+K)
Modal overlay with:
- Text input with autofocus, fuzzy matching
- Entity search — filter by title, type, module, source, tag. Results grouped by type with color badges.
- Command search — search graph commands by operation/target
- Navigation — Arrow keys to move selection, Enter to navigate, Escape to close
- Action shortcuts — ">" prefix for commands ("> deploy staging", "> add node", "> run tests")
Data source: All entities from Graph, all commands from CommandHistory. Fuzzy match using Levenshtein or prefix matching.
Agent Chat Interface
The drawer's "Agent" tab hosts a Claude Code-style chat interface. The agent has access to the full graph via ReaktorGraphDocument and can:
- Read the graph:
read_graph()returns the JSON document of all entities, edges, ports - Select entities:
select_entity(id)navigates to an entity - Navigate modes:
navigate_to(mode, entityId)switches screen + selection - Create commands:
push_command(cmd)adds to the command queue - Generate code:
generate_code(commands[])sends batch to LLM for CodeDiff - Open in IDE:
open_in_ide(filePath, line)launches IntelliJ/VS Code - Query telemetry:
query_metrics(entityId, timeRange)fetches performance data
This mirrors the web prototype's "Ask Code Agent" button but with real tool invocations against the graph runtime.
GraphCommand Hierarchy
sealed interface GraphCommand {
val id: String
val timestamp: Instant
val description: String
data class AddNode(val type: NodeType, val name: String, val parent: String?) : GraphCommand
data class RemoveNode(val nodeId: String) : GraphCommand
data class ConnectPorts(val consumer: PortRef, val provider: PortRef) : GraphCommand
data class DisconnectPorts(val consumer: PortRef, val provider: PortRef) : GraphCommand
data class SetProperty(val entityId: String, val key: String, val value: JsonElement) : GraphCommand
data class CreateSubgraph(val name: String, val nodes: List<String>) : GraphCommand
data class MoveToContainer(val nodeId: String, val containerId: String) : GraphCommand
data class SetRoute(val routeId: String, val pattern: String) : GraphCommand
data class SetTransport(val edgeId: String, val transport: TransportMode) : GraphCommand
data class SetDeployTarget(val nodeId: String, val target: DeployTarget) : GraphCommand
}
Command Lifecycle
LLM Integration
Context Assembly
When the user triggers "Apply" on a command batch:
- Serialize the command batch as JSON
- Include
ReaktorGraphDocument(full graph context) - Include relevant source files (from entity
sourcemetadata) - Send to Claude API with system prompt describing Reaktor's conventions
- Receive
CodeDiff(unified diff format per file) - Show in CodeDiff viewer tab for user review
- On approval, write diffs to project via file system (Desktop) or send to IDE plugin (Web)
IDE Bridge
Desktop: Use ProcessBuilder to invoke idea / code CLI for "Open in IDE". Write files directly to project directory.
Web: Communicate with IDE via:
- VS Code:
vscode://URI scheme for file open - IntelliJ:
jetbrains://URI scheme for file open - Plugin: HTTP localhost server in IDE plugin for bidirectional communication
Persistence
Commands are persisted to reaktor-db SQLite. Table: graph_commands(id, type, payload_json, timestamp, applied, batch_id). Enables undo/redo and command history across sessions.
Strategy
Compose Multiplatform supports Kotlin/JS with canvas rendering. The reaktor-workbench module is commonMain, so it compiles to both JVM and JS without changes. The web target adds:
reaktorWeb-compose target
- Entry point:
fun main() = CanvasBasedWindow { WorkbenchShell(state) } - Hosting: Cloudflare Workers (same as current prototype) or CDN static
- Service Worker: Offline support, caching of graph manifest and static assets
- URL routing:
window.location.hashmaps toWorkbenchMode+ selected entity - IDE bridge:
vscode://andjetbrains://URI schemes for "Open in IDE"
Platform-specific code (jsMain)
| Feature | Desktop (jvmMain) | Web (jsMain) |
|---|---|---|
| File system | java.io.File | Not available (IDE plugin bridge) |
| Process launch | ProcessBuilder("idea", ...) | window.open("jetbrains://...") |
| Clipboard | Toolkit.getDefaultToolkit().systemClipboard | navigator.clipboard |
| Compose inspection | CompositionData + LocalInspectionTables | Modifier.semantics tag approach |
| Network interception | OkHttp interceptor | Fetch wrapper |
| SQLite | Native SQLite via reaktor-db | IndexedDB or sql.js WASM |
| LLM API | Direct HTTPS to Claude API | Proxy via Cloudflare Worker (CORS) |
Transition from current web prototype
The current React/Vite prototype at reaktor.build will be replaced by the Compose/JS build once it reaches feature parity. During transition, both can coexist at different subdomains (e.g., reaktor.build = Compose, legacy.reaktor.build = React).
⇄ 14. Feature Mapping — Prototype → Compose
Every file in the web prototype maps to a specific composable in reaktor-workbench:
| Web Prototype File | Lines | Compose Target | Status |
|---|---|---|---|
scenario.jsx | ~300 | WorkbenchState.kt | New |
lib.jsx | ~200 | WorkbenchTheme.kt + WorkbenchTypography.kt | New |
app.jsx | ~135 | WorkbenchShell.kt | Extend ReaktorWorkbench |
shell.jsx | ~600 | TopBar.kt + ModeToolbar.kt + LeftSidebar.kt + mode controls | Extend TreePanel |
screen-graph.jsx | ~350 | GraphScreen.kt wrapping ReaktorGraphEditor | 80% done |
screen-run.jsx | ~245 | RunScreen.kt + DeviceFrame.kt | Extend PreviewPanel |
screen-drilldown.jsx | ~300 | DevToolsScreen.kt + TraceRail.kt | New |
screen-deploy.jsx | ~250 | DeployScreen.kt + DeployTopology.kt + CIPipeline.kt | New |
screen-insights.jsx | ~280 | InsightsScreen.kt + InsightsTimeline.kt + InsightsHeatmap.kt | New |
inspector-common.jsx | ~200 | InspectorPanel.kt + InspectorState.kt | Extend NodeDetailPanel |
inspector-bodies.jsx | ~900 | bodies/*.kt (9 files) | New |
bottom.jsx | ~350 | drawer/*.kt (7 files) | New |
data.jsx | ~500 | Not needed — real graph runtime provides all data | N/A |
styles.css | ~1400 | WorkbenchTheme.kt (Compose theme tokens) | New |
⏱ 15. Implementation Schedule
Dependency Graph
P0 (reaktor-flow fixes) ↓ P1 (Shell + Navigation) ──────────────────────┐ ↓ ↓ P2 (Graph Screen) ── P3 (Run Screen) P7 (Inspector System) ↓ ↓ ↓ P4 (DevTools) P8 (Cmd Palette) P9 (Command Pattern + LLM) ↓ ↓ P5 (Deploy) P6 (Insights) ↓ P10 (Web Target)
Estimated Effort
| Phase | Description | New Code | Reuse | Effort | Priority |
|---|---|---|---|---|---|
| P0 | reaktor-flow stabilization | ~200 lines | High | 3 days | Blocker |
| P1 | Shell + Navigation | ~800 lines | High (ReaktorWorkbench) | 5 days | Critical |
| P2 | Graph Screen | ~300 lines | Very High (reaktor-flow) | 3 days | Critical |
| P7 | Inspector System | ~1200 lines | Medium (NodeDetailPanel) | 5 days | Critical |
| P3 | Run Screen | ~600 lines | High (PreviewPanel + SemanticsInspector) | 4 days | High |
| P8 | Command Palette | ~400 lines | Low | 3 days | High |
| P4 | DevTools Screen | ~500 lines | Medium (Visitor/Traverser) | 4 days | Medium |
| P5 | Deploy Screen | ~500 lines | Low | 4 days | Medium |
| P6 | Insights Screen | ~500 lines | Low | 4 days | Medium |
| P9 | Command Pattern + LLM | ~800 lines | Medium (GraphDocument) | 6 days | High |
| P10 | Web Target | ~300 lines (platform) | Very High (all commonMain) | 5 days | Medium |
Timeline
Key Risk: Compose/JS Maturity
Risk: Compose Multiplatform for Web (Kotlin/JS + canvas) is less mature than Desktop. Some composables may need platform-specific adjustments.
Mitigation: Build everything in commonMain. Keep expect/actual declarations minimal (file I/O, process launch, clipboard). Test on Web early in P1 to surface issues before heavy development.
Fallback: If Compose/JS canvas performance is insufficient for the full workbench, the current React prototype can serve as the web target while the Desktop app uses Compose. The agent/command/graph model remains shared via reaktor-graph → JSON → web frontend.
Key Advantage: Real Data
The biggest upgrade from the web prototype is that every data point is live. The prototype uses 38 hardcoded entities and 39 hardcoded edges. The Compose workbench reads the real Graph runtime:
- Entities & edges from live
Graphinstance (not mock data) - Port invocation events from running app (not hardcoded traces)
- Lifecycle state from real node lifecycle (not fake status badges)
- Navigation from actual backstack (not display-only arrows)
- autoWire results from real DI resolution (not hardcoded connections)
The web prototype was a specification. The Compose workbench is the real thing.