This document lists the intentional bugs introduced into the codebase that a full-stack developer should be able to identify and fix.
- Location:
backend/src/graphql/resolvers.ts - Issue: Comparing
requestLog.length(number) with string"1000" - Fix: Change
== "1000"to=== 1000 - Impact: Condition never evaluates to true, array grows indefinitely
- Location:
backend/src/graphql/resolvers.ts-searchTasksquery - Issue: Search uses
.includes()without case normalization - Fix: Convert both query and fields to lowercase:
t.title.toLowerCase().includes(query.toLowerCase()) - Impact: Users can't find tasks with different casing
- Location:
backend/src/graphql/resolvers.ts-createTaskmutation - Issue: Empty or whitespace-only titles are allowed
- Fix: Add validation:
if (!title?.trim()) throw new Error("Title is required") - Impact: Can create tasks with empty titles
- Location:
backend/src/graphql/resolvers.ts-updateTaskmutation - Issue: Returns
result[0]without checking if task exists - Fix: Add check:
if (!result[0]) throw new Error("Task not found") - Impact: Returns undefined instead of error, crashes client
- Location:
backend/src/graphql/resolvers.ts-moveTaskmutation - Issue: No locking mechanism for concurrent drag operations
- Fix: Implement optimistic locking or transaction with position recalculation
- Impact: Concurrent moves can corrupt task positions
- Location:
backend/src/db/index.ts - Issue: Fallback contains hardcoded password in code
- Fix: Fail loudly if DATABASE_URL not set or use safer default
- Impact: Security risk, credentials in version control
- Location:
backend/src/db/index.ts - Issue: App crashes immediately if database is unavailable
- Fix: Add try-catch with proper error message and retry logic
- Impact: Poor developer experience, unclear error messages
- Location:
backend/src/graphql/resolvers.ts- Board.stats resolver - Issue: Multiple queries inside loops instead of batch query
- Fix: Use JOIN or batch queries to fetch all data at once
- Impact: Severe performance degradation with many columns/tasks
- Location:
frontend/src/components/KanbanBoard.tsx - Issue:
setIntervalnever cleaned up - Fix: Return cleanup function:
return () => clearInterval(interval) - Impact: Memory leak, multiple intervals pile up
- Location:
frontend/src/components/KanbanBoard.tsx - Issue: Effect runs on every render instead of when data changes
- Fix: Add dependency array:
}, [data?.board?.title]); - Impact: Excessive re-renders, performance issues
- Location:
frontend/src/components/KanbanBoard.tsx - Issue: Using
indexas key for reorderable columns - Fix: Use stable identifier:
key={column.id} - Impact: React loses track of components, incorrect renders, lost state
- Location:
frontend/src/components/KanbanBoard.tsx-handleDragEnd - Issue: Mutation can fail silently
- Fix: Wrap in try-catch, show error toast, revert optimistic update
- Impact: Tasks appear moved but operation failed
- Location:
frontend/src/components/KanbanBoard.tsx-handleAddTask - Issue: No validation, relies on backend
- Fix: Add client-side validation before calling mutation
- Impact: Unnecessary network requests, poor UX
- Location:
frontend/src/components/KanbanBoard.tsx-handleDeleteColumn - Issue: Deletes columns (and all tasks) without confirmation
- Fix: Add confirmation dialog
- Impact: Accidental data loss
- Location:
frontend/src/components/KanbanBoard.tsx - Issue: Polling every 1 second is excessive
- Fix: Increase to 3-5 seconds or use WebSockets
- Impact: Excessive network traffic, server load
- Location:
frontend/src/main.tsx - Issue: GraphQL URI hardcoded, not using environment variables
- Fix: Use
import.meta.env.VITE_API_URLor similar - Impact: Can't configure different environments
- Location:
frontend/src/App.tsx-handleCreateBoard - Issue: Mutation can fail silently
- Fix: Add try-catch with error notification
- Impact: Silent failures, confusing UX
- Location:
frontend/src/graphql/queries.ts- GET_BOARD query - Issue: Fetching unnecessary nested data (column for each task, siblingTasks)
- Fix: Remove unused fields from query
- Impact: Unnecessary data transfer, slower queries
- Location:
frontend/src/components/KanbanColumn.tsx-handleAddTask - Issue: Description not trimmed, can save whitespace-only strings
- Fix: Trim description:
newTaskDescription.trim() || undefined - Impact: Ugly whitespace stored in database
- Location:
backend/tsconfig.json - Issue: References "bun-types" but package is "@types/bun"
- Fix: Remove types array or change to correct package name
- Impact: TypeScript errors
- Location:
backend/package.json - Issue: Using old
generate:pgandpush:pgsyntax - Fix: Update to
drizzle-kit generateanddrizzle-kit push - Impact: Commands may fail with newer drizzle-kit versions
Total Bugs: 21 issues across backend, frontend, and configuration
Categories:
- Security: 1 (hardcoded credentials)
- Performance: 3 (N+1 queries, aggressive polling, over-fetching)
- Memory/Resource Leaks: 2 (uncleaned interval, missing cleanup)
- Error Handling: 5 (no validation, missing null checks, silent failures)
- Data Integrity: 3 (race conditions, no confirmations, empty data)
- UX Issues: 4 (case-sensitive search, no validation feedback)
- React Anti-patterns: 2 (index as key, missing dependencies)
- Configuration: 2 (wrong types, deprecated commands)