fix: Address review comments

This commit is contained in:
gsxdsm
2026-02-18 19:52:25 -08:00
parent 4ba0026aa1
commit 4ee160fae4
16 changed files with 184 additions and 35 deletions

View File

@@ -226,6 +226,13 @@ export function CommitWorktreeDialog({
setSelectedFiles(new Set(fileList.map((f) => f.path)));
}
}
} else {
const errorMsg = result.error ?? 'Failed to load diffs';
console.warn('Failed to load diffs for commit dialog:', errorMsg);
if (!cancelled) {
setError(errorMsg);
toast.error(errorMsg);
}
}
}
} catch (err) {
@@ -480,7 +487,7 @@ export function CommitWorktreeDialog({
>
{getStatusLabel(file.status)}
</span>
{isStaged && !isUntracked && (
{isStaged && !isUnstaged && !isUntracked && (
<span className="text-[10px] px-1 py-0.5 rounded border font-medium flex-shrink-0 bg-green-500/15 text-green-400 border-green-500/30">
Staged
</span>

View File

@@ -214,6 +214,8 @@ export function DiscardWorktreeChangesDialog({
} else {
if (!cancelled) setError(result.error || 'Failed to fetch diffs');
}
} else {
if (!cancelled) setError('Diff API unavailable');
}
} catch (err) {
if (cancelled) return;