1.3 KiB
1.3 KiB
Task Browser Duplicate Selection Bug Fix
Problem
When checking a checkbox in the task browser, it would select the intended row PLUS an additional row 97 positions higher:
- Checking row 0 → selected rows 0 and 97
- Checking row 1 → selected rows 1 and 98
- Checking row 2 → selected rows 2 and 99
Root Cause
There were two watchers on filteredTasks in TaskBrowser.vue:
- One added at line ~306 (the correct one)
- One added at line ~423 (duplicate)
Both watchers were trying to clean up invalid selections, but they were interfering with each other and causing race conditions that resulted in incorrect row selections.
Solution
Removed the duplicate watcher at line ~423, keeping only the first watcher that properly cleans up stale selections when filtered tasks change.
Also cleaned up excessive debug logging that was added during troubleshooting.
Files Changed
frontend/src/components/task/TaskBrowser.vue- Removed duplicate
watch(filteredTasks)watcher - Removed debug console.log statements
- Removed duplicate
Testing
After the fix:
- Reload the page
- Check any checkbox - only that row should be selected
- Check multiple checkboxes - only those rows should be selected
- Right-click to open context menu - selection should be preserved correctly
- Apply filters - stale selections should be cleaned up automatically