mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-19 02:13:58 +00:00
* feat(tui): migrate to OpenTUI with monochromatic design ## Summary - Migrate TUI from Ink to OpenTUI framework (requires Bun >=1.2.0) - Implement monochromatic B&W design with colored accents - Add Help screen accessible via `/` key - Fix terminal cleanup on exit (no more escape code garbage) - Clean up code: remove unnecessary comments, simplify components - Add 9 unit tests for TUI state, theme, and utilities ## Breaking Changes - TUI now requires Bun runtime (>=1.2.0) for OpenTUI - Help moved from `?` (requires Shift) to `/` key ## Changes - **index.tsx**: Clean exit handler with ANSI terminal restore - **App.tsx**: Simplified screen routing with switch statement - **Help.tsx**: New help screen with keyboard shortcuts reference - **Home.tsx**: Extract FEATURES constant, simplified agent width logic - **Sidebar.tsx**: Removed unused onNavigate prop usage - **state/types.ts**: Consolidated type definitions, added help screen - **README.md**: Updated with Bun requirement and new architecture ## Test Coverage - 757 tests passing (664 core + 80 agents + 9 tui + 1 cli + 3 app) ## Code Quality - Removed all JSDoc comments describing obvious code - Extracted reusable ShortcutSection component - Replaced nested ternaries with clearer if/else - Moved static data outside components to prevent recreation * fix: address CodeRabbit review issues - AgentGrid: prevent infinite loop when columns <= 0 - Splash: clamp progress width to prevent negative repeat - StatsCard: reset animation state when items change - Help: clamp contentWidth to minimum 1 - Browse: add useKeyboard handler for navigation and search - Installed: add useKeyboard handler for toggle functionality - Marketplace: add useKeyboard handler and clamp contentWidth - Recommend: fix spinner interval, add keyboard handler - Settings: add keyboard handler, fix SETTINGS -> settings state - Sync: add keyboard handler and sync flow implementation - Workflow: add keyboard handler and clamp contentWidth - skills.ts: add path validation to prevent directory traversal * fix: address additional CodeRabbit review issues Splash.tsx: - Change generateParticles from useMemo to useCallback for fresh random rows Browse.tsx: - Clamp maxLen to avoid negative slicing - Add Enter/Return handler to open selected repo Installed.tsx: - Wire up 'd' key to toggle handler - Update shortcuts label from "delete" to "disable" Marketplace.tsx: - Add handleInstall callback for Enter key - Add 'b' key handler to navigate to browse Recommend.tsx: - Add handleInstall callback for Enter key Settings.tsx: - Update shortcuts label from "enter edit" to "enter toggle" Sync.tsx: - Add useRef for timeout cleanup on unmount - Clamp selectedIndex when agents list shrinks Workflow.tsx: - Remove unimplemented shortcuts from display string * fix: address performance and stale closure issues Splash.tsx: - Cache getVersion() with useMemo to avoid repeated sync file I/O Installed.tsx: - Wrap keyboard handler in useCallback to prevent stale closures Settings.tsx: - Wrap keyboard handler in useCallback with proper dependencies Workflow.tsx: - Remove "Press 'n' to create one" text since 'n' key isn't implemented
42 lines
887 B
JSON
42 lines
887 B
JSON
{
|
|
"name": "@skillkit/tui",
|
|
"version": "2.0.0",
|
|
"description": "Unified Terminal UI for SkillKit - Built on OpenTUI",
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsup",
|
|
"dev": "tsup --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@skillkit/core": "workspace:*",
|
|
"@skillkit/agents": "workspace:*",
|
|
"@opentui/core": "^0.1.75",
|
|
"@opentui/react": "^0.1.75",
|
|
"react": "^19.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.10.5",
|
|
"@types/react": "^19.0.0",
|
|
"tsup": "^8.3.5",
|
|
"typescript": "^5.7.2",
|
|
"vitest": "^2.1.8"
|
|
},
|
|
"engines": {
|
|
"bun": ">=1.2.0"
|
|
},
|
|
"license": "Apache-2.0"
|
|
}
|