test(ui): clarify branch provenance and hierarchy
This commit is contained in:
@@ -46,7 +46,7 @@ function NewIndicator({ visible }) {
|
||||
|
||||
/* ── Single branch row ─────────────────────────────────── */
|
||||
|
||||
function BranchRow({ id, label, active, isNew, onClick }) {
|
||||
function BranchRow({ id, label, active, isNew, origin, onClick }) {
|
||||
const isActive = Boolean(active);
|
||||
|
||||
return (
|
||||
@@ -54,7 +54,7 @@ function BranchRow({ id, label, active, isNew, onClick }) {
|
||||
onClick={onClick}
|
||||
disabled={isActive}
|
||||
aria-current={isActive ? "page" : undefined}
|
||||
className={`w-full flex items-center gap-2 rounded-md px-3 py-2 text-left transition text-sm ${
|
||||
className={`w-full flex items-start gap-2 rounded-md px-3 py-2 text-left transition text-sm ${
|
||||
isActive
|
||||
? "bg-blue-50/80 border border-blue-200/60 text-blue-900 font-medium"
|
||||
: "text-gray-600 hover:bg-gray-100/70 hover:text-gray-800 border border-transparent"
|
||||
@@ -70,8 +70,15 @@ function BranchRow({ id, label, active, isNew, onClick }) {
|
||||
{isActive ? "●" : "○"}
|
||||
</span>
|
||||
|
||||
{/* Branch label */}
|
||||
<span className="flex-1 truncate">{label}</span>
|
||||
{/* Branch label + origin */}
|
||||
<span className="flex-1 min-w-0">
|
||||
<span className="truncate block">{label}</span>
|
||||
{origin && (
|
||||
<span className="block text-[11px] leading-tight text-gray-500/80 truncate" title={origin}>
|
||||
{origin}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
|
||||
{/* Passive new-result indicator (only for inactive branches) */}
|
||||
{!isActive && <NewIndicator visible={isNew} />}
|
||||
@@ -96,11 +103,11 @@ export default function ExperimentalBranchSwitcher({
|
||||
aria-label="Experimental branch switcher — RTO.25A"
|
||||
>
|
||||
{/* Label — clearly experimental */}
|
||||
<h2 className="mb-1 text-[10px] font-semibold tracking-widest uppercase text-gray-400">
|
||||
<h2 className="mb-1 text-[10px] font-semibold tracking-widest uppercase text-gray-600">
|
||||
Branches{" "}
|
||||
<span className="font-normal text-gray-300">(exp)</span>
|
||||
<span className="font-normal text-gray-500">(exp)</span>
|
||||
</h2>
|
||||
<p className="mb-3 text-[11px] text-gray-400/60">
|
||||
<p className="mb-3 text-[11px] font-medium leading-tight text-gray-500/80">
|
||||
Browse branches. Current focus is preserved.
|
||||
</p>
|
||||
|
||||
@@ -112,6 +119,7 @@ export default function ExperimentalBranchSwitcher({
|
||||
label={branch.label}
|
||||
active={activeBranchId === branch.id}
|
||||
isNew={Boolean(branchNewResults[branch.id])}
|
||||
origin={branch.origin}
|
||||
onClick={() => onBranchSelect?.(branch.id)}
|
||||
/>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user