integratedhub/TODO.md
2026-01-20 09:19:45 -06:00

67 lines
2.9 KiB
Markdown

# TODO - Issues Found from Code Quality and E2E Tests
## Code Formatting Issues (deno task check)
### Critical Issues
- **5 files not formatted properly** - Need to run `deno fmt` to fix formatting
- Files affected:
- `routes/tenant/messages/index.tsx` - Import order and formatting issues
- `routes/tenant/settings/index.tsx` - Function definition formatting and indentation
- `services/messageService.ts` - Import order issues
- Additional files with formatting problems (truncated output)
### Specific Formatting Problems
1. **Import Statement Order** - Multiple files have incorrect import ordering
2. **Function Definition Formatting** - Functions not properly formatted according to Deno standards
3. **Indentation Issues** - Inconsistent indentation in JSX components
4. **Line Break Issues** - Missing or extra line breaks in various files
## E2E Test Failures (deno task e2e)
### Failed Tests
1. **reminders.spec.ts:4** - "landlord can send reminder and tenant receives it"
- **Error**: Element with role "heading" and name matching /messages/i not found
- **Expected**: Messages heading should be visible
- **Status**: Timeout after 5000ms
2. **tenant-dashboard.spec.ts:50** - "tenant messages list shows landlord communication"
- **Error**: Element with role "heading" and name matching /messages/i not found
- **Expected**: Messages heading should be visible
- **Status**: Timeout after 5000ms
### Test Infrastructure Issues
- **Static File Serving Error**: Server crashes when trying to serve static files
- Error: "Failed to read directory: No such file or directory (os error 2)"
- Path: `/Users/nanderson/nathanAndrinoid/cyberhybridhub.com/static`
- Impact: Tests failing due to missing static assets
### Root Cause Analysis
- Both failed tests are looking for a "Messages" heading that doesn't exist
- This suggests either:
- The messages page/component is not rendering properly
- The heading text or role attributes are incorrect
- The navigation to messages page is failing
## Priority Actions
### High Priority
1. **Fix static file serving** - Create missing `/static` directory or fix configuration
2. **Investigate messages page** - Check why messages heading is not rendering
3. **Run code formatting** - Execute `deno fmt` to fix all formatting issues
### Medium Priority
1. **Review test expectations** - Verify if test assertions match actual UI
2. **Check navigation flow** - Ensure users can properly navigate to messages
3. **Fix import statements** - Correct import order in affected files
### Low Priority
1. **Code style consistency** - Ensure all files follow consistent formatting
2. **Add error handling** - Improve error handling for missing static files
## Next Steps
1. Create `/static` directory if missing
2. Run `deno fmt` to fix formatting
3. Debug messages page rendering issue
4. Re-run tests to verify fixes
5. Address any remaining test failures