From f96258d4818baca1cec62e9fa75b9fcbfec91a26 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 18 Sep 2026 04:23:13 -0700 Subject: [PATCH] fix(web): gateway strip's new labels are optional locale keys with an en fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `tsc -b` in the Docker image build failed on every non-en locale (TS2739: gatewayStrip missing degraded, heartbeatStale) because the new keys were declared required on Translations. The web locales are full objects, not partial overrides, so a new key must be optional and read through the `en` fallback — the pattern the existing 102 optional keys (loadFailed, gateway, gatewayHint, ...) already use. Before: web `tsc -b` -> 16 x TS2739. After: 0 locale errors. --- web/src/components/SidebarStatusStrip.tsx | 5 +++-- web/src/i18n/types.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/components/SidebarStatusStrip.tsx b/web/src/components/SidebarStatusStrip.tsx index 1390d1e526..86b95b908c 100644 --- a/web/src/components/SidebarStatusStrip.tsx +++ b/web/src/components/SidebarStatusStrip.tsx @@ -2,6 +2,7 @@ import { Link } from "react-router"; import type { StatusResponse } from "@/lib/api"; import { cn } from "@/lib/utils"; import { useI18n } from "@/i18n"; +import { en } from "@/i18n/en"; /** Gateway + session summary for the System sidebar block (no separate strip chrome). */ export function SidebarStatusStrip({ status }: SidebarStatusStripProps) { @@ -60,7 +61,7 @@ export function gatewayLine( // Live: some channels offline. Retained on a dead PID: a watchdog hard-exited a wedged // process (gateway_exit_reason names it) — same verdict `hermes gateway status` prints. degraded: { - label: g.degraded, + label: g.degraded ?? en.app.gatewayStrip.degraded!, tone: status.gateway_running ? "text-warning" : "text-destructive", }, stopped: { label: g.stopped, tone: "text-muted-foreground" }, @@ -68,7 +69,7 @@ export function gatewayLine( // Alive but housekeeping stopped stamping the heartbeat: 'Running' would be the lie the // reporter saw (loop/housekeeping wedged while gateway_state.json still said running). if (status.gateway_heartbeat_stale_s != null) { - return { label: g.heartbeatStale, tone: "text-destructive" }; + return { label: g.heartbeatStale ?? en.app.gatewayStrip.heartbeatStale!, tone: "text-destructive" }; } if (status.gateway_state && byState[status.gateway_state]) { return byState[status.gateway_state]; diff --git a/web/src/i18n/types.ts b/web/src/i18n/types.ts index 517c8a0c2d..0346d7a885 100644 --- a/web/src/i18n/types.ts +++ b/web/src/i18n/types.ts @@ -84,9 +84,9 @@ export interface Translations { activeSessionsLabel: string; gatewayStatusLabel: string; gatewayStrip: { - degraded: string; + degraded?: string; failed: string; - heartbeatStale: string; + heartbeatStale?: string; off: string; running: string; starting: string;