auto-claude: subtask-1-1 - Add filter after map operation to remove empty str (#1466)

Fix incorrect uncommitted file count display after refreshing a task.
The issue was that empty strings from .substring(3).trim() operations on
short/malformed git status lines were not filtered out, inflating the count.

This adds a second filter after the map to remove empty strings:
.filter(file => file)
This commit is contained in:
Andy
2026-01-25 11:28:21 +01:00
committed by GitHub
parent 43a97e1b3b
commit 783f0fe0e4
@@ -2413,7 +2413,8 @@ export function registerWorktreeHandlers(
uncommittedFiles = gitStatus
.split('\n')
.filter(line => line.trim())
.map(line => line.substring(3).trim()); // Skip 2 status chars + 1 space, trim any trailing whitespace
.map(line => line.substring(3).trim()) // Skip 2 status chars + 1 space, trim any trailing whitespace
.filter(file => file); // Remove empty strings from short/malformed status lines
hasUncommittedChanges = uncommittedFiles.length > 0;
}