Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(settings): use GatewaySummary type for gateway list state\n\nThe GatewaySection component now uses the GatewaySummary type instead of the full Gateway type for its gateways state array and the statusLine helper function. This change also reads the gateway kind directly from the summary object rather than calling the gatewayKind helper, aligning the component with the updated data model that provides a lighter summary type for list displays.\n\nAuto-committed-on: dragonfly\n

Steven Enamakel3c36531f7a5d
diff --git a/app/src/components/settings/panels/core/GatewaySection.tsx b/app/src/components/settings/panels/core/GatewaySection.tsx
index fef386216b..29cb75ac07 100644
--- a/app/src/components/settings/panels/core/GatewaySection.tsx
+++ b/app/src/components/settings/panels/core/GatewaySection.tsx
@@ -32,7 +32,7 @@ import {
deleteGateway,
DESKTOP_GATEWAY_ID,
type Gateway,
- gatewayKind,
+ type GatewaySummary,
gatewayStatus,
type GatewayStatus,
listGateways,
@@ -125,7 +125,7 @@ const GatewaySection = ({ available }: Props) => {
const { t } = useT();
const dispatch = useAppDispatch();
- const [gateways, setGateways] = useState<Gateway[]>([]);
+ const [gateways, setGateways] = useState<GatewaySummary[]>([]);
const [activeId, setActiveId] = useState<string>(DESKTOP_GATEWAY_ID);
const [status, setStatus] = useState<GatewayStatus>({ state: 'inactive' });
const [draft, setDraft] = useState<DraftGateway | null>(null);
@@ -228,7 +228,7 @@ const GatewaySection = ({ available }: Props) => {
}
};
- const statusLine = (gateway: Gateway): string | undefined => {
+ const statusLine = (gateway: GatewaySummary): string | undefined => {
if (gateway.id !== activeId) return undefined;
switch (status.state) {
case 'activating':
@@ -257,7 +257,7 @@ const GatewaySection = ({ available }: Props) => {
key={gateway.id}
label={gateway.label}
description={
- statusLine(gateway) ?? t(`settings.gateway.kind.${gatewayKind(gateway.spec)}`)
+ statusLine(gateway) ?? t(`settings.gateway.kind.${gateway.kind}`)
}
control={
<div className="flex items-center gap-2">