{t("tray.portForwarding")}
{portForwardingRules.map((rule) => {
const isUnknown = rule.status === "unknown";
const isConnecting = rule.status === "connecting";
const isActive = rule.status === "active";
// unknown/stale: neither Start nor Stop until authority recovers,
// unless this window already holds a live runtime tunnel.
const isStoppable = !isUnknown && (
isConnecting || isActive || hasRuntimeTunnel(rule.id)
);
const isActionDisabled = isConnecting || (isUnknown && !hasRuntimeTunnel(rule.id));
const label = rule.label || (rule.type === "dynamic"
? `SOCKS:${rule.localPort}`
: `${rule.localPort} → ${rule.remoteHost}:${rule.remotePort}`);
return (
{label}
);
})}
)}
{/* Empty state - show when nothing is active */}
{jumpableSessions.length === 0 && portForwardingRules.length === 0 && (