mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 10:23:07 +00:00
fix: Address review comments
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user