mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-20 12:23:29 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b5d4b6881 |
@@ -18,10 +18,12 @@ skillkit
|
|||||||
## Framework
|
## Framework
|
||||||
|
|
||||||
Built on modern technologies:
|
Built on modern technologies:
|
||||||
- **@opentui/react** - Terminal rendering
|
- **@opentui/solid** - Terminal rendering with Solid.js
|
||||||
- **React 19.0.0** - Component architecture
|
- **Solid.js 1.9.0** - Reactive component architecture
|
||||||
- **Bun 1.2.0+** - Runtime requirement
|
- **Bun 1.2.0+** - Runtime requirement
|
||||||
|
|
||||||
|
The TUI was migrated from React to Solid.js in v1.8.0 for improved performance and smaller bundle size.
|
||||||
|
|
||||||
## Screens
|
## Screens
|
||||||
|
|
||||||
| Screen | Key | Purpose |
|
| Screen | Key | Purpose |
|
||||||
@@ -159,8 +161,10 @@ loadSkills()
|
|||||||
|
|
||||||
### Performance Optimizations
|
### Performance Optimizations
|
||||||
|
|
||||||
- `useMemo` for filtered lists
|
- `createMemo` for filtered lists and computed values
|
||||||
- `useCallback` for event handlers
|
- `createSignal` for reactive state management
|
||||||
|
- `createEffect` for side effects and subscriptions
|
||||||
|
- Windowed list rendering for large datasets
|
||||||
- Pagination limits rendered items
|
- Pagination limits rendered items
|
||||||
- Progressive animation with phases
|
- Progressive animation with phases
|
||||||
|
|
||||||
@@ -174,18 +178,32 @@ loadSkills()
|
|||||||
|
|
||||||
## Integration
|
## Integration
|
||||||
|
|
||||||
The TUI integrates with @skillkit/core:
|
The TUI integrates with @skillkit/core using Solid.js reactive patterns:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
findAllSkills(searchDirs) // Returns skill metadata
|
import { createSignal, createMemo, createEffect } from 'solid-js';
|
||||||
evaluateSkillDirectory(path) // Quality metrics
|
|
||||||
getQualityGrade(score) // 0-100 to A-F
|
const [skills, setSkills] = createSignal([]);
|
||||||
|
|
||||||
|
createEffect(async () => {
|
||||||
|
const result = await findAllSkills(searchDirs);
|
||||||
|
setSkills(result);
|
||||||
|
});
|
||||||
|
|
||||||
|
const filteredSkills = createMemo(() =>
|
||||||
|
skills().filter(s => s.name.includes(searchTerm()))
|
||||||
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Core functions:
|
||||||
|
- `findAllSkills(searchDirs)` - Returns skill metadata
|
||||||
|
- `evaluateSkillDirectory(path)` - Quality metrics
|
||||||
|
- `getQualityGrade(score)` - 0-100 to A-F
|
||||||
|
|
||||||
## Graceful Exit
|
## Graceful Exit
|
||||||
|
|
||||||
The TUI handles shutdown gracefully:
|
The TUI handles shutdown gracefully:
|
||||||
1. Unmounts React components
|
1. Runs Solid.js cleanup functions (`onCleanup`)
|
||||||
2. Restores terminal state
|
2. Restores terminal state
|
||||||
3. Cleans up signal handlers
|
3. Cleans up signal handlers
|
||||||
4. Exits process cleanly
|
4. Exits process cleanly
|
||||||
|
|||||||
Reference in New Issue
Block a user