The change has been made. When a branch is merged (branchStatus.merged is true), the component will no longer display either "commits behind" or "commits ahead" status, showing only the "Up to date" message or null instead. (#59)

This commit is contained in:
Louis Knight-Webb
2025-07-03 16:40:17 +01:00
committed by GitHub
parent 2170f86c9c
commit e5b7dd8e7a

View File

@@ -601,19 +601,19 @@ export function TaskAttemptComparePage() {
<GitBranch className="h-4 w-4" />
{branchStatus.up_to_date ? (
<span className="text-green-600">Up to date</span>
) : branchStatus.is_behind === true ? (
) : branchStatus.is_behind === true && !branchStatus.merged ? (
<span className="text-orange-600">
{branchStatus.commits_behind} commit
{branchStatus.commits_behind !== 1 ? 's' : ''} behind{' '}
{branchStatus.base_branch_name}
</span>
) : (
) : !branchStatus.merged ? (
<span className="text-blue-600">
{branchStatus.commits_ahead} commit
{branchStatus.commits_ahead !== 1 ? 's' : ''} ahead of{' '}
{branchStatus.base_branch_name}
</span>
)}
) : null}
</div>
{branchStatus.has_uncommitted_changes && (
<div className="flex items-center gap-1 text-yellow-600">