test(ui): explore provisional branch pause and reopen

This commit is contained in:
2026-08-20 09:00:01 +01:00
parent df0e3b5a9b
commit 86bb3426ef
3 changed files with 122 additions and 21 deletions
+15 -3
View File
@@ -46,7 +46,7 @@ function NewIndicator({ visible }) {
/* ── Single branch row ─────────────────────────────────── */
function BranchRow({ id, label, active, isNew, origin, onClick }) {
function BranchRow({ id, label, active, isNew, isPaused, origin, onClick }) {
const isActive = Boolean(active);
return (
@@ -80,8 +80,18 @@ function BranchRow({ id, label, active, isNew, origin, onClick }) {
)}
</span>
{/* Passive new-result indicator (only for inactive branches) */}
{!isActive && <NewIndicator visible={isNew} />}
{/* Passive indicators: pause + new */}
<span className="flex items-center gap-1.5 flex-none">
{!isActive && isPaused && (
<span
className="text-[10px] text-gray-400"
title="Done for now"
>
Paused
</span>
)}
{!isActive && <NewIndicator visible={isNew} />}
</span>
</button>
);
}
@@ -92,6 +102,7 @@ export default function ExperimentalBranchSwitcher({
branches = [],
activeBranchId,
branchNewResults = {},
branchPauseState = [],
onBranchSelect,
}) {
if (!branches.length) return null;
@@ -119,6 +130,7 @@ export default function ExperimentalBranchSwitcher({
label={branch.label}
active={activeBranchId === branch.id}
isNew={Boolean(branchNewResults[branch.id])}
isPaused={branchPauseState.includes(branch.id)}
origin={branch.origin}
onClick={() => onBranchSelect?.(branch.id)}
/>