refactor(folder): remove workspace debug logging from aux panels

This commit is contained in:
xintaofei
2026-04-14 22:39:57 +08:00
parent b5e8fd8acb
commit 0557eab154
3 changed files with 5 additions and 240 deletions

View File

@@ -115,19 +115,6 @@ interface MutableChangeTreeDirNode {
const TRACKED_ROOT_PATH = "__working_tree_tracked_root__"
const UNTRACKED_ROOT_PATH = "__working_tree_untracked_root__"
const UNTRACKED_STATUS = "??"
const GIT_CHANGES_DEBUG_LOG = process.env.NODE_ENV === "development"
function logGitChangesDebug(
message: string,
payload?: Record<string, unknown>
) {
if (!GIT_CHANGES_DEBUG_LOG) return
if (payload) {
console.info(`[GitChangesTab/workspace] ${message}`, payload)
return
}
console.info(`[GitChangesTab/workspace] ${message}`)
}
type GitFileState =
| "untracked"
@@ -545,24 +532,6 @@ export function GitChangesTab() {
[expandedUntrackedPaths.size, untrackedTreeNodes.length]
)
useEffect(() => {
logGitChangesDebug("workspace state consumed", {
rootPath: folder?.path ?? "",
seq: workspaceState.seq,
health: workspaceState.health,
gitEntries: workspaceState.git.length,
trackedChanges: trackedChanges.length,
untrackedChanges: untrackedChanges.length,
})
}, [
folder?.path,
trackedChanges.length,
untrackedChanges.length,
workspaceState.git.length,
workspaceState.health,
workspaceState.seq,
])
const toggleTrackedExpanded = useCallback(() => {
if (trackedCanExpand) {
setExpandedTrackedPaths(new Set(allTrackedDirectoryPaths))