diff --git a/frontend/src/lib/components/ForkWorkspaceBanner.svelte b/frontend/src/lib/components/ForkWorkspaceBanner.svelte
index f7c6b0b1c0..08ac12b1b7 100644
--- a/frontend/src/lib/components/ForkWorkspaceBanner.svelte
+++ b/frontend/src/lib/components/ForkWorkspaceBanner.svelte
@@ -148,8 +148,7 @@
}
}
- /** The compare page opened on one direction, for a badge that counts exactly that. The button
- * beside them still chooses on the reader's behalf; a badge means the one thing it names. */
+ /** The compare page opened on one direction, for a badge that counts exactly that. */
function compareDirHref(dir: 'deploy_to' | 'update'): string | undefined {
if (!parentWorkspaceId || !$workspaceStore) return undefined
return (
@@ -245,9 +244,13 @@
: total > 0
? 'drift'
: undefined}
-
+
+ {@const badged =
+ status === 'drafts' ||
+ (status === 'drift' &&
+ (changesAhead > 0 || changesBehind > 0 || conflicts > 0 || draftCount > 0))}
{#key status}
@@ -256,10 +259,6 @@
Checking for changes…
{:else if error}
Comparison failed
- {:else if showDraftsOnly}
-
- {draftCount} draft{draftCount !== 1 ? 's' : ''}
-
{:else if total > 0}
@@ -303,39 +302,29 @@
{conflicts}{compactCounts ? '' : ` conflict${conflicts !== 1 ? 's' : ''}`}
{/if}
-
- {#if draftCount > 0}
-
-
- {draftCount}{compactCounts ? '' : ` draft${draftCount !== 1 ? 's' : ''}`}
-
- {/if}
+ {/if}
+
+ {#if (status === 'drafts' || status === 'drift') && draftCount > 0}
+
+
+ {draftCount}{compactCounts ? '' : ` draft${draftCount !== 1 ? 's' : ''}`}
+
{/if}
{/key}
- {#if showDraftsOnly}
-
- {:else}
+ {#if !badged}