|
| 1 | +# TODOS |
| 2 | + |
| 3 | +Generated: 2025-12-24 |
| 4 | + |
| 5 | +## Batch 1: Critical Security Fixes |
| 6 | + |
| 7 | +- [ ] Fix SQL injection in message search (`apps/server/src/domains/messages/service.ts` - escape `ilike` pattern) |
| 8 | +- [ ] Add file path sanitization (`apps/server/src/domains/files/service.ts` - prevent `../` traversal) |
| 9 | +- [ ] Add WebSocket auth re-validation on subscribe (`apps/server/src/ws/index.ts` - check permissions on subscribe) |
| 10 | +- [ ] Add rate limiting middleware (`apps/server/src/middleware/` - create rate-limit.ts) |
| 11 | + |
| 12 | +## Batch 2: High-Impact Performance Fixes |
| 13 | + |
| 14 | +- [ ] Fix N+1 query in message list (`apps/server/src/domains/messages/service.ts` - include reactions/attachments in query) |
| 15 | +- [ ] Remove duplicate useQuery per message (`apps/desktop/src/components/MessageItem.svelte` - pass reactions as props) |
| 16 | +- [ ] Deduplicate permission checks (`apps/server/src/domains/permissions/service.ts` - cache within request context) |
| 17 | +- [ ] Lazy load CodeMirror and emoji-picker (`apps/desktop/src/components/` - use dynamic imports) |
| 18 | + |
| 19 | +## Batch 3: Code Quality & Dead Code Removal |
| 20 | + |
| 21 | +- [ ] Delete unused example/ directory (`.storybook`, `apps/desktop/src/example/`) |
| 22 | +- [ ] Remove console.log/error statements (9 files - use proper logger or delete) |
| 23 | +- [ ] Split large components: `MessageItem.svelte` (143 lines → ~50 lines each) |
| 24 | +- [ ] Split large components: `ChannelList.svelte` (141 lines → ~50 lines each) |
| 25 | + |
| 26 | +## Batch 4: Accessibility Fixes |
| 27 | + |
| 28 | +- [ ] Add aria-labels to icon buttons (`apps/desktop/src/components/` - all IconButton components) |
| 29 | +- [ ] Replace alert() with toast notifications (`apps/desktop/src/` - create toast utility) |
| 30 | +- [ ] Add form labels for WCAG compliance (`apps/desktop/src/routes/` - all form inputs) |
| 31 | +- [ ] Standardize placeholder text language (`apps/desktop/src/` - choose Japanese or English consistently) |
| 32 | + |
| 33 | +## Deferred (Needs User Confirmation) |
| 34 | + |
| 35 | +- [ ] DISABLE_AUTH flag - clarify production usage policy (`apps/server/src/middleware/auth.ts`) |
| 36 | +- [ ] Add CSRF protection - confirm if needed for API-only backend (`apps/server/src/middleware/`) |
| 37 | +- [ ] Add security headers - confirm headers policy (`apps/server/src/index.ts`) |
| 38 | +- [ ] shadow-2xl usage - confirm if Clarity design principles apply (`apps/desktop/src/components/`) |
| 39 | +- [ ] Empty state CTAs - requires design decisions (multiple files) |
| 40 | + |
| 41 | +## Rejected (Low Value / Out of Scope) |
| 42 | + |
| 43 | +- Duplicate logic in unread.ts - minimal impact, refactor during feature work |
| 44 | +- Test coverage improvements - separate test-focused sprint needed |
| 45 | +- Flaky waitForTimeout(500) - address when writing new E2E tests |
| 46 | +- Page Object Model - requires significant test refactoring |
0 commit comments