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

This commit is contained in:
Adam 2026-02-02 10:55:15 -06:00
commit 3b93e8d95c
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
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)