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) {
|
}: 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 */}
|
||||||
|
{commits.length > 1 && (
|
||||||
|
<>
|
||||||
<CommitPill
|
<CommitPill
|
||||||
label="All changes"
|
label="All changes"
|
||||||
sublabel={`${commits.length} commits`}
|
sublabel={`${commits.length} commits`}
|
||||||
isActive={selectedCommit === null}
|
isActive={selectedCommit === null}
|
||||||
onClick={() => onSelectCommit(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) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user