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