fix: Show commit nav for single-commit phases, remove early-exit guard

This commit is contained in:
Lukas May
2026-03-05 11:03:15 +01:00
parent c58e0ea77e
commit cbb8e66943

View File

@@ -16,21 +16,21 @@ export function CommitNav({
}: CommitNavProps) {
if (isLoading || commits.length === 0) return null;
// Don't show navigator for single-commit phases
if (commits.length === 1) return null;
return (
<div className="border-b border-border/50 bg-muted/20">
<div className="flex items-center gap-0 px-4 overflow-x-auto">
{/* "All changes" pill */}
<CommitPill
label="All changes"
sublabel={`${commits.length} commits`}
isActive={selectedCommit === null}
onClick={() => onSelectCommit(null)}
/>
<div className="w-px h-5 bg-border mx-1 shrink-0" />
{/* "All changes" pill — only when multiple commits */}
{commits.length > 1 && (
<>
<CommitPill
label="All changes"
sublabel={`${commits.length} commits`}
isActive={selectedCommit === null}
onClick={() => onSelectCommit(null)}
/>
<div className="w-px h-5 bg-border mx-1 shrink-0" />
</>
)}
{/* Individual commit pills - most recent first */}
{commits.map((commit) => (