fix(tags): Resolve critical tag deletion and migration notice bugs
Major Issues Fixed: 1. Tag Deletion Bug: Fixed critical issue where creating subtasks would delete other tags - Root cause: writeJSON function wasn't accepting projectRoot/tag parameters - Fixed writeJSON signature and logic to handle tagged data structure - Added proper merging of resolved tag data back into full tagged structure 2. Persistent Migration Notice: Fixed FYI notice showing after every command - Root cause: markMigrationForNotice was resetting migrationNoticeShown to false - Fixed migration logic to only trigger on actual legacy->tagged migrations - Added proper _rawTaggedData checks to prevent false migration detection 3. Data Corruption Prevention: Enhanced data integrity safeguards - Fixed writeJSON to filter out internal properties - Added automatic cleanup of rogue properties - Improved hasTaggedStructure detection logic Commands Fixed: add-subtask, remove-subtask, and all commands now preserve tags correctly
This commit is contained in:
@@ -250,6 +250,48 @@ Same pattern as `list` and `move` commands:
|
||||
**REMAINING WORK:**
|
||||
Next commands to fix: `set-status` and `next` commands following the same pattern.
|
||||
</info added on 2025-06-12T22:49:16.724Z>
|
||||
<info added on 2025-06-13T02:48:17.985Z>
|
||||
**FINAL PROGRESS UPDATE - Tag Management Issues Resolved**
|
||||
|
||||
✅ **COMPLETED: All Tag Management Issues Fixed**
|
||||
|
||||
**Major Issues Resolved:**
|
||||
1. **Rogue `"created"` property cleanup** - Fixed root-level `"created"` property in master tag that was outside metadata
|
||||
2. **Tags command error fixed** - Resolved undefined `taskCount` error by making calculation dynamic
|
||||
3. **Data corruption prevention** - Enhanced `writeJSON` to automatically filter rogue properties during write operations
|
||||
|
||||
**Technical Fixes Applied:**
|
||||
- **Enhanced `writeJSON` function** to automatically clean up rogue `created` and `description` properties from tag objects
|
||||
- **Fixed `taskCount` calculation** to be dynamic (`tasks.length`) instead of hardcoded field
|
||||
- **Cleaned up existing corruption** in master tag through forced write operation
|
||||
- **All `created` properties** now properly located in `metadata` objects only
|
||||
|
||||
**Commands Status Update:**
|
||||
✅ **COMPLETED HIGH-PRIORITY COMMANDS:**
|
||||
1. ✅ `show` - Added --tag flag + fixed projectRoot passing
|
||||
2. ✅ `add-task` - Already had proper tag support
|
||||
3. ✅ `list` - Already had proper tag support
|
||||
4. ✅ `move` - Already had proper tag support
|
||||
5. ✅ `tags` - Fixed errors and working perfectly
|
||||
|
||||
**REMAINING COMMANDS TO FIX:**
|
||||
❌ `set-status` - Update task status (needs tag context)
|
||||
❌ `next` - Find next task (needs tag context)
|
||||
❌ `update-task` - Update specific task (needs tag context)
|
||||
❌ `update-subtask` - Update subtask (needs tag context)
|
||||
❌ `add-subtask` - Add subtasks (needs tag context)
|
||||
❌ `remove-task` - Remove tasks (needs tag context)
|
||||
❌ `remove-subtask` - Remove subtasks (needs tag context)
|
||||
|
||||
**Data Integrity Status:**
|
||||
- ✅ Migration logic working correctly
|
||||
- ✅ Tag creation/deletion working with proper metadata
|
||||
- ✅ File corruption prevention active
|
||||
- ✅ Automatic cleanup during write operations
|
||||
- ✅ Tagged task lists system fully functional
|
||||
|
||||
**Next Steps:** Continue with remaining commands (set-status, next, etc.) to complete task 103.5
|
||||
</info added on 2025-06-13T02:48:17.985Z>
|
||||
|
||||
## 6. Integrate Automatic Tag Creation from Git Branches [pending]
|
||||
### Dependencies: 103.4
|
||||
@@ -338,3 +380,15 @@ All documentation now properly reflects Part 1 implementation and prepares for P
|
||||
### Details:
|
||||
Key implementation steps: 1. Develop a file watcher or a manual import command to detect and process new .json files in the tasks directory. 2. Implement logic to read an external json file, identify the tag key, and extract the array of tasks. 3. Handle potential conflicts: if an imported tag already exists in the main tasks.json, the existing tasks should be preserved and new ones appended, or the import should be skipped based on a defined precedence rule. 4. Ignore any 'master' key in template files to protect the integrity of the main task list. 5. Update task ID sequencing to ensure imported tasks are assigned unique IDs that don't conflict with existing tasks.
|
||||
|
||||
## 18. be able to move a task from one tag to another [pending]
|
||||
### Dependencies: None
|
||||
### Description:
|
||||
### Details:
|
||||
|
||||
|
||||
## 19. complexity report support for tags [pending]
|
||||
### Dependencies: None
|
||||
### Description: save separate report when using a tag or add to the existing report but section into tags
|
||||
### Details:
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user