fix: Show commit nav for single-commit phases, remove early-exit guard
This commit is contained in:
@@ -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) => (
|
||||
|
||||
Reference in New Issue
Block a user