Commit 12ed10d
authored
refactor(tui): migrate to OpenTUI/Solid.js framework (#32)
* refactor(tui): migrate to OpenTUI/Solid.js framework
Complete TUI rewrite from Ink/React to OpenTUI/Solid.js:
- Replace React with Solid.js for reactive state management
- Migrate all 20 screens to OpenTUI component primitives
- Add monochromatic design with 14 color themes
- Implement cinematic splash screen with ASCII animation
- Add vi-key navigation (j/k/h/l) throughout
- Create 32 reusable components with consistent styling
- Add service layer for @skillkit/core API integration
- Remove deprecated react-opentui.d.ts type definitions
- Update build config for Solid.js JSX transform
Features covered:
- Browse, Marketplace, Recommend (discovery)
- Installed, Sync, Translate (management)
- Workflow, Execute, Plan, History (execution)
- Team, Context, Memory, Mesh, Message (collaboration)
- Plugins, Methodology, Settings (configuration)
- Help screen with 25+ keyboard shortcuts
* fix(tui): address CodeRabbit review feedback
Critical fixes:
- Remove non-existent module exports from index.tsx (context, themes, ui, hooks, services)
- Simplify App.tsx to remove missing context provider imports
Major fixes:
- ProgressBar: Add defensive guards for width/progress (NaN, Infinity, negative)
- Browse: Fix filtered index loading wrong repository
- Context: Add section navigation (h/l keys) and async error handling
- Methodology: Add error handling with try/catch/finally for all async ops
- Plan: Fix division by zero when plan has no tasks, add error handling
- Team: Add error handling for loadTeamConfig and handleInitialize
- Translate: Guard against missing skill.path before read operations
* fix(tui): address remaining CodeRabbit feedback
- Memory: Add error handling for loadData, handleDelete, handleClearAll, handleInitialize
- Team: Fix key conflict by blocking global keys when detail pane is open
- animations: Fix springCurve to return 0 at progress=0 and 1 at progress=1
* fix(tui): add Solid.js OpenTUI type definitions
Required for TypeScript to recognize OpenTUI JSX elements (box, text, span)
with their custom props (fg, bg, flexDirection, etc.)
* fix(tui): add stub services and fix type errors for CI
- Add minimal stub service implementations for all TUI screens:
- context.service.ts - project context loading
- executor.service.ts - skill execution
- memory.service.ts - memory management
- methodology.service.ts - methodology packs
- plan.service.ts - plan management
- plugin.service.ts - plugin management
- recommend.service.ts - skill recommendations
- team.service.ts - team collaboration
- translator.service.ts - skill translation
- workflow.service.ts - workflow orchestration
- Fix type errors in screens:
- Plan.tsx: Add non-null assertions for optional issues array
- Plugins.tsx: Cast getPluginInfo result to Plugin type
These stubs provide the expected interfaces for screens while
the full integration with @skillkit/core is completed later.
* fix(tui): add missing component files for CI
Add the component files that screens depend on:
- StatusIndicator - loading/success/error status display
- DetailPane - side panel for detailed view
- EmptyState/ErrorState - empty and error state components
- SelectList - selection list component
- SplitPane - split view layout
- AnimatedText - text animations
- Breadcrumb - navigation breadcrumb
- Button/Clickable - interactive elements
- CodeBlock - code display
- FormField - form input wrapper
- HoverHighlight - hover effect wrapper
- RightSidebar/BottomStatusBar - layout components
- TabBar - tab navigation
- ErrorBoundary - error handling wrapper
These components are required by the screen files and were
missing from the previous commit.
* fix(tui): resolve context import and duplicate export issues
- RightSidebar: inline sidebar state instead of importing from context
- services/index.ts: fix duplicate AgentType export by using explicit
exports for executor and translator services
* fix(tui): use export type for type-only re-exports
* refactor(tui): simplify components and remove redundant exports
* refactor(tui): remove unused imports and variables
Code simplification pass:
- Remove unused onCleanup import from Workflow, Recommend, Sync screens
- Remove unused contentWidth from Browse, Recommend, Marketplace, Sync
- Remove unused cols from Browse, Recommend
- Remove unused JSX import from EmptyState component
- Remove unused translate import from Sync screen
- Remove unused SelectList import and listItems function from Memory screen
* fix(tui): wire up interactive handlers and fix type definitions
- AnimatedText: fix reactive dependency tracking in createEffect
- BottomStatusBar: remove unused width prop
- Breadcrumb: wire onNavigate handlers, fix off-by-one in getPathAtIndex
- Button: wire onClick with disabled check, apply paddingX, fix ButtonGroup spacing
- Clickable: wire click/double-click/right-click handlers, fix InteractiveArea
- DetailPane: make close button interactive
- ErrorBoundary: use terminal keyboard handler, prevent duplicate onError calls
- FormField: fix placeholder show condition for empty string
- SelectList: add onSelect/onHover interactive behavior
- SplitPane: preserve string sizes like "50%" in width/height helpers
- TabBar: wire onSelect callbacks for both horizontal and vertical variants
- solid-opentui.d.ts: add missing event handler types to BoxProps/TextProps
* fix(tui): address Devin review issues
- App: restore process.exit(0) fallback when onExit is undefined
- Execute: pass skill path instead of content to executeSkillWithAgent
- Memory: add useKeyboard handler for j/k/Enter/d/c/i/Esc shortcuts
* fix(tui): address Devin and CodeRabbit review issues
Security & Robustness:
- App: use execFile instead of exec to prevent command injection in openUrl
- App: clamp cols/rows to minimum 1 to prevent negative dimensions
- index: await render() and handle failures with exitTUI(1)
Execute screen:
- Add error state for load failures
- Prevent re-entrant execution with executing() guard
- Use try/finally to always clear executing state
Memory screen:
- Add missing 'r' shortcut for retry/refresh
Workflow screen:
- Use try/finally to always clear executing state even on rejection
Sync screen:
- Capture selectedIndex and agent values before await to prevent drift
* fix(tui): implement list windowing to keep selection visible
Execute, Marketplace, Recommend screens now use windowed list rendering
that follows the selection, preventing the selected item from being
off-screen when navigating through long lists.
- Add createMemo for computing visible window based on selectedIndex
- Show ▲/▼ indicators when items are above/below the visible window
- Navigate through full list instead of clamping to visible window size
* fix(tui): add error handling and index clamping
Marketplace.tsx:
- Set error signal when all repos fail or no skills loaded
- Add reactive effect to clamp selectedIndex when filteredSkills changes
Recommend.tsx:
- Wrap loadData in try/catch to surface errors in UI
- Clamp selectedIndex after recommendations update
* fix(tui): add error handling to Plugins and Workflow screens
Plugins.tsx:
- Wrap loadData in try/catch to prevent stuck loading state
- Wrap handleToggle in try/catch/finally to always reset toggling flag
- Wrap handleShowDetail in try/catch to surface errors gracefully
Workflow.tsx:
- Wrap loadData in try/catch to prevent stuck loading state
- Add catch block to handleExecute to show execution errors in UI1 parent eebaa71 commit 12ed10d
File tree
71 files changed
+8915
-1922
lines changed- packages/tui
- src
- components
- screens
- services
- state
- theme
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
71 files changed
+8915
-1922
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | 24 | | |
27 | | - | |
28 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | | - | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | | - | |
41 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | | - | |
44 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
45 | 61 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
49 | 65 | | |
50 | | - | |
| 66 | + | |
51 | 67 | | |
52 | | - | |
| 68 | + | |
53 | 69 | | |
54 | | - | |
55 | | - | |
| 70 | + | |
| 71 | + | |
56 | 72 | | |
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
60 | 76 | | |
61 | | - | |
| 77 | + | |
62 | 78 | | |
63 | 79 | | |
64 | 80 | | |
| |||
67 | 83 | | |
68 | 84 | | |
69 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
70 | 91 | | |
71 | 92 | | |
72 | | - | |
| 93 | + | |
73 | 94 | | |
74 | 95 | | |
75 | | - | |
76 | | - | |
| 96 | + | |
| 97 | + | |
77 | 98 | | |
78 | 99 | | |
79 | 100 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 101 | + | |
85 | 102 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
115 | 106 | | |
116 | 107 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
121 | 145 | | |
122 | | - | |
| 146 | + | |
123 | 147 | | |
124 | 148 | | |
125 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
8 | 5 | | |
9 | | - | |
10 | 6 | | |
11 | | - | |
12 | 7 | | |
13 | | - | |
14 | 8 | | |
15 | | - | |
16 | 9 | | |
17 | 10 | | |
18 | 11 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
26 | 18 | | |
27 | | - | |
28 | | - | |
| 19 | + | |
| 20 | + | |
29 | 21 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | 33 | | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
47 | 45 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
0 commit comments