-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
RefactorNeed to optimize the codebaseNeed to optimize the codebasehelp wantedExtra attention is neededExtra attention is needed
Description
Description
Current State
There are three files handling task operations with overlapping functionality:
lib/task-service.ts- Original implementationlib/task-service-db.ts- Database-focused versionlib/supabase-task-service.ts- Supabase-specific version
This happened during iterative development where different approaches were tried. It's unclear which is authoritative, and bugs may exist where one is updated but not the others.
Why this exists
AI-assisted development sometimes creates new implementations rather than modifying existing ones when hitting issues. This is a known pattern in AI-augmented codebases.
Desired Outcome
- Audit all three files to identify unique functionality
- Create a single
lib/services/task-service.tsfollowing the pattern inlib/services/time-entry-service.ts - Update all imports to use the consolidated service
- Delete the deprecated files
How to get started
- Read all three files to understand their APIs
- Use
grep -rn "task-service" app/ components/to find all usages - Create consolidated implementation with all needed functions
- Update imports one by one, testing after each change
Related files to consolidate
lib/organization-service.tslib/organization-service-mock.tslib/organization-service-simple.ts
Acceptance Criteria
- Single
lib/services/task-service.tswith all task operations - All imports updated to use new service
- Old service files deleted
- All existing functionality preserved
Metadata
Metadata
Assignees
Labels
RefactorNeed to optimize the codebaseNeed to optimize the codebasehelp wantedExtra attention is neededExtra attention is needed