fix(workspace-cleanup): warn before deleting a workspace's ignored local files like .env (#41446)

* fix(workspace-cleanup): warn before deleting a workspace's ignored local files

git worktree remove deletes ignored files such as .env and local config,
and git status never reports them, so cleanup showed "Clean git" and the
delete dialog said nothing. Read them with a bounded ls-files listing,
skip regenerable output, symlinks and byte-identical copies of the main
checkout, and surface the rest as an approval-only cleanup blocker and a
warning in the delete confirmation.

* fix(workspace-cleanup): show an unchecked warning when the ignored-files check fails

* style(workspace-cleanup): format merged fact status list
This commit is contained in:
Kelvin Amoaba
2026-11-12 09:23:46 +00:00
committed by GitHub
parent 318bf64769
commit 0b516b8a9d
31 changed files with 838 additions and 47 deletions
@@ -8,6 +8,7 @@ type RuntimeGitCommandName =
| 'getRuntimeGitHistory'
| 'getRuntimeGitConflictOperation'
| 'getRuntimeGitMutationInFlight'
| 'readRuntimeWorktreeAtRiskLocalFiles'
| 'abortRuntimeGitMerge'
| 'abortRuntimeGitRebase'
| 'switchRuntimeGitBranch'
@@ -61,6 +62,8 @@ export function installRuntimeGitCommandSurface(
getRuntimeGitHistory: commands.getRuntimeGitHistory.bind(commands),
getRuntimeGitConflictOperation: commands.getRuntimeGitConflictOperation.bind(commands),
getRuntimeGitMutationInFlight: commands.getRuntimeGitMutationInFlight.bind(commands),
readRuntimeWorktreeAtRiskLocalFiles:
commands.readRuntimeWorktreeAtRiskLocalFiles.bind(commands),
abortRuntimeGitMerge: commands.abortRuntimeGitMerge.bind(commands),
abortRuntimeGitRebase: commands.abortRuntimeGitRebase.bind(commands),
switchRuntimeGitBranch: commands.switchRuntimeGitBranch.bind(commands),