From 1a82f7c8579342f3177fc3b1151fa36685476ebd Mon Sep 17 00:00:00 2001 From: Nathan Anderson Date: Tue, 20 Jan 2026 09:19:45 -0600 Subject: [PATCH] datona friendly --- AGENTS.md | 1 - TODO.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ deno.json | 7 +++--- 3 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 TODO.md diff --git a/AGENTS.md b/AGENTS.md index 07ba6d9..80c1be6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,7 +55,6 @@ LOCAL_DEV_MODE="true" - `deno task build` - Build for production - `deno task start` - Start production server - `deno task check` - Format, lint, and type check -- `deno task test` - Run unit tests - `deno task e2e` - Run Playwright end-to-end tests **Development Workflow**: diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..29f3c48 --- /dev/null +++ b/TODO.md @@ -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 diff --git a/deno.json b/deno.json index 1ce7809..05e8c35 100755 --- a/deno.json +++ b/deno.json @@ -6,10 +6,9 @@ "build": "vite build", "start": "deno serve -A --port 8080 _fresh/server.js", "update": "deno run -A -r jsr:@fresh/update .", - "test": "deno test -A tests/", - "e2e": "npx playwright test", - "e2e:ui": "npx playwright test --ui", - "e2e:report": "npx playwright show-report", + "e2e": "deno run -A npm:playwright test", + "e2e:ui": "deno run -A npm:playwright test --ui", + "e2e:report": "deno run -A npm:playwright show-report", "db:generate": "deno run -A npm:drizzle-kit generate", "db:migrate": "deno run -A npm:drizzle-kit migrate", "db:push": "deno run -A npm:drizzle-kit push",