diff --git a/apps/desktop/src/lib/stack/header/HeaderMetaSection.svelte b/apps/desktop/src/lib/stack/header/HeaderMetaSection.svelte index 6712d5324..d347fdb81 100644 --- a/apps/desktop/src/lib/stack/header/HeaderMetaSection.svelte +++ b/apps/desktop/src/lib/stack/header/HeaderMetaSection.svelte @@ -6,7 +6,7 @@ import Button from '@gitbutler/ui/Button.svelte'; interface Props { - series: PatchSeries[]; + series: (PatchSeries | Error)[]; onCollapseButtonClick: () => void; } diff --git a/apps/desktop/src/lib/stack/header/SeriesLabels.svelte b/apps/desktop/src/lib/stack/header/SeriesLabels.svelte index 4b352dbaa..0593840da 100644 --- a/apps/desktop/src/lib/stack/header/SeriesLabels.svelte +++ b/apps/desktop/src/lib/stack/header/SeriesLabels.svelte @@ -1,11 +1,11 @@ @@ -174,6 +179,10 @@ &.integrated { background-color: var(--clr-commit-integrated); } + + &.error { + background-color: var(--clr-theme-err-element); + } } .selector-series-chain-icon { diff --git a/apps/desktop/src/lib/stack/header/StackHeader.svelte b/apps/desktop/src/lib/stack/header/StackHeader.svelte index 81058d557..c77e5d08a 100644 --- a/apps/desktop/src/lib/stack/header/StackHeader.svelte +++ b/apps/desktop/src/lib/stack/header/StackHeader.svelte @@ -4,6 +4,7 @@ import { BranchController } from '$lib/vbranches/branchController'; import { VirtualBranch } from '$lib/vbranches/types'; import { getContext } from '@gitbutler/shared/context'; + import { isError } from '@gitbutler/ui/utils/typeguards'; interface Props { branch: VirtualBranch; @@ -14,7 +15,12 @@ const { onCollapseButtonClick, branch }: Props = $props(); - const nonArchivedSeries = $derived(branch.validSeries.filter((s) => !s.archived)); + const nonArchivedSeries = $derived( + branch.series.filter((s) => { + if (isError(s)) return s; + return !s.archived; + }) + );