fix(app): added/deleted file status now correctly calculated

This commit is contained in:
Adam
2026-02-02 10:55:15 -06:00
parent 23631a9393
commit 3b93e8d95c
5 changed files with 115 additions and 4 deletions

View File

@@ -500,9 +500,7 @@ export default function Page() {
const out = new Map<string, "add" | "del" | "mix">()
for (const diff of diffs()) {
const file = normalize(diff.file)
const add = diff.additions > 0
const del = diff.deletions > 0
const kind = add && del ? "mix" : add ? "add" : del ? "del" : "mix"
const kind = diff.status === "added" ? "add" : diff.status === "deleted" ? "del" : "mix"
out.set(file, kind)