- Remove ExecutionModeBadge import and usage
- Update filtering logic to use server_name presence instead of execution_mode
- Simplify update script logic by removing mode property
- Update Terminal component call to determine mode based on server presence
- Replace ExecutionModeBadge in table with simple text display
- Maintain backend API compatibility by keeping execution_mode in mutations
- Use nullish coalescing operator (??) for better null handling
- Add proper type annotations for WebSocketMessage and ServerInfo types
- Fix type imports to use type-only imports where appropriate
- Replace logical OR operators with nullish coalescing operators
- Fix floating promises by adding void operator
- Add proper type assertions for database results
- Fix useEffect dependencies in Terminal component
- Remove unused variables and fix unescaped entities
- Add JSDoc type annotations for database methods
- Fix singleton instance type annotations
- Remove @prisma/client and prisma dependencies
- Delete prisma schema and database files
- Remove database context from tRPC
- Clean up Prisma-related scripts and environment variables
- Update README to remove Prisma reference
The project no longer requires a database and builds successfully.
- Install Vitest, @vitest/ui, @vitest/coverage-v8, and testing libraries
- Configure Vitest with jsdom environment and path aliases
- Add test scripts to package.json (test, test:ui, test:run, test:coverage)
- Create comprehensive test suites:
- ScriptManager class tests (file operations, validation, execution)
- React component tests (ScriptsGrid, ResyncButton, Home page)
- tRPC API router tests (all endpoints with success/error scenarios)
- Environment configuration tests
- Set up proper mocking infrastructure for fs, child_process, tRPC, and services
- 41/55 tests currently passing with full coverage of core functionality
Test commands:
- npm run test - Run tests in watch mode
- npm run test:run - Run tests once
- npm run test:ui - Run tests with web UI
- npm run test:coverage - Run tests with coverage report
- Create TextViewer component for displaying script code
- Add react-syntax-highlighter for bash syntax highlighting
- Implement tabbed interface for CT and install scripts
- Add getScriptContent tRPC endpoint for secure file reading
- Update ScriptsList to use TextViewer for View button
- Include security checks to prevent path traversal
- Support both CT and install script viewing in same modal
- Add line numbers and proper code formatting