Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(local-models): the context rail wraps its status lines instead of running past its own edge

rubenluetke10-beep749f2e685f7a
diff --git a/jarvis/ui/web/frontend/src/components/local-models/AssistantContext.tsx b/jarvis/ui/web/frontend/src/components/local-models/AssistantContext.tsx
index f8f9720a95..50b0c04eb4 100644
--- a/jarvis/ui/web/frontend/src/components/local-models/AssistantContext.tsx
+++ b/jarvis/ui/web/frontend/src/components/local-models/AssistantContext.tsx
@@ -20,7 +20,6 @@
import { useMemo } from "react";
import { ProviderLogo } from "@/components/providers/ProviderLogo";
-import { StatusDot } from "@/components/extensions/primitives";
import { useRoles, useServer } from "@/hooks/useLocalModels";
import { fill, useT } from "@/i18n";
import { cn } from "@/lib/utils";
@@ -186,21 +185,16 @@ export function AssistantContext({
<section data-testid="assistant-machine">
<RailTitle>{t("local_models.assistant.machine_title")}</RailTitle>
<div className="mt-2.5">
- <StatusDot
- tone={server.data?.running ? "ok" : "off"}
- label={
- <span className="text-[12.5px]">
- {fill(
- t(
- server.data?.running
- ? "local_models.assistant.machine_server_running"
- : "local_models.assistant.machine_server_stopped",
- ),
- { server: serverLabel },
- )}
- </span>
- }
- />
+ <RailStatus tone={server.data?.running ? "ok" : "off"}>
+ {fill(
+ t(
+ server.data?.running
+ ? "local_models.assistant.machine_server_running"
+ : "local_models.assistant.machine_server_stopped",
+ ),
+ { server: serverLabel },
+ )}
+ </RailStatus>
</div>
{rows.length > 0 ? (
@@ -245,19 +239,14 @@ export function AssistantContext({
{/* ── the monitor's verdict, parked instead of scrolling away ──── */}
{health && checkedAt && (
<section data-testid="assistant-health-rail">
- <StatusDot
- tone={healthTone(health)}
- label={
- <span className="text-[12px] leading-relaxed">
- {fill(t("local_models.assistant.last_check"), {
- when: checkedAt.toLocaleString(),
- what:
- health.reason ||
- t(`local_models.assistant.health_${health.status}`),
- })}
- </span>
- }
- />
+ <RailStatus tone={healthTone(health)}>
+ {fill(t("local_models.assistant.last_check"), {
+ when: checkedAt.toLocaleString(),
+ what:
+ health.reason ||
+ t(`local_models.assistant.health_${health.status}`),
+ })}
+ </RailStatus>
{needsFix && (
<button
type="button"
@@ -274,6 +263,40 @@ export function AssistantContext({
);
}
+/**
+ * A dot and a sentence that WRAPS.
+ *
+ * Not the shared `StatusDot`: that one is an `inline-flex` whose label is
+ * `truncate`, so a health sentence keeps its full single-line width, pushes
+ * the rail's scrollWidth past 600px in a 293px column and gets clipped. A
+ * column this narrow needs the text to break, not to be cut.
+ */
+function RailStatus({
+ tone,
+ children,
+}: {
+ tone: "ok" | "off" | "warn" | "error";
+ children: React.ReactNode;
+}) {
+ const color = {
+ ok: "bg-emerald-500",
+ off: "bg-muted-foreground/40",
+ warn: "bg-amber-500",
+ error: "bg-destructive",
+ }[tone];
+ return (
+ <span className="flex items-start gap-2">
+ <span
+ aria-hidden
+ className={cn("mt-[0.32rem] h-2 w-2 shrink-0 rounded-full", color)}
+ />
+ <span className="min-w-0 flex-1 text-[12px] leading-relaxed text-muted-foreground">
+ {children}
+ </span>
+ </span>
+ );
+}
+
function RailTitle({ children }: { children: React.ReactNode }) {
return (
<h4 className="text-[10.5px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/80">