datona friendly

This commit is contained in:
Nathan Anderson 2026-01-20 09:19:45 -06:00
parent 3593fee561
commit 1a82f7c857
3 changed files with 69 additions and 5 deletions

View File

@ -55,7 +55,6 @@ LOCAL_DEV_MODE="true"
- `deno task build` - Build for production - `deno task build` - Build for production
- `deno task start` - Start production server - `deno task start` - Start production server
- `deno task check` - Format, lint, and type check - `deno task check` - Format, lint, and type check
- `deno task test` - Run unit tests
- `deno task e2e` - Run Playwright end-to-end tests - `deno task e2e` - Run Playwright end-to-end tests
**Development Workflow**: **Development Workflow**:

66
TODO.md Normal file
View File

@ -0,0 +1,66 @@
# 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

View File

@ -6,10 +6,9 @@
"build": "vite build", "build": "vite build",
"start": "deno serve -A --port 8080 _fresh/server.js", "start": "deno serve -A --port 8080 _fresh/server.js",
"update": "deno run -A -r jsr:@fresh/update .", "update": "deno run -A -r jsr:@fresh/update .",
"test": "deno test -A tests/", "e2e": "deno run -A npm:playwright test",
"e2e": "npx playwright test", "e2e:ui": "deno run -A npm:playwright test --ui",
"e2e:ui": "npx playwright test --ui", "e2e:report": "deno run -A npm:playwright show-report",
"e2e:report": "npx playwright show-report",
"db:generate": "deno run -A npm:drizzle-kit generate", "db:generate": "deno run -A npm:drizzle-kit generate",
"db:migrate": "deno run -A npm:drizzle-kit migrate", "db:migrate": "deno run -A npm:drizzle-kit migrate",
"db:push": "deno run -A npm:drizzle-kit push", "db:push": "deno run -A npm:drizzle-kit push",