Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions apps/desktop/src/ui/ScopedHarnesses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,35 @@ export function ScopedHarnessList({ targets, writes }: { targets: ScopeMachine[]
setBusy(null);
};
return (
<div key={harness.id} className="flex min-h-12 items-center gap-3 px-4 py-2">
<div key={harness.id} className="flex min-h-14 items-center gap-3 px-4 py-3">
<span className="flex size-8 shrink-0 items-center justify-center rounded-lg bg-fill">
<HarnessIcon id={harness.id} name={harness.name} size={16} />
</span>
<div className="min-w-0 flex-1">
<div className="flex min-w-0 flex-1 flex-col gap-0.5">
<div className="flex items-center gap-2">
<span className="truncate font-medium text-body">{harness.name}</span>
<span className="truncate font-semibold text-body">{harness.name}</span>
{mixed && <MixedChip breakdown={breakdown(targets, byHost)} />}
</div>
<div className="truncate text-caption text-fg-muted">
{reading
? "Reading…"
: offline
? "An offline machine keeps its value"
: mixed
? "The connected machines disagree"
{/* Mixed says it in the chip, whose hover card lists each machine. */}
{!mixed && (
<div className="flex items-center gap-1.5 truncate text-caption text-fg-muted">
{!reading && !offline && (
<span
className={cx(
"inline-block size-[7px] shrink-0 rounded-full",
checked ? "bg-success" : "bg-fg-faint",
)}
/>
)}
{reading
? "Reading…"
: offline
? "An offline machine keeps its value"
: checked
? "On"
: "Off"}
</div>
</div>
)}
</div>
{busy === harness.id ? (
<Spinner size={12} />
Expand Down
33 changes: 16 additions & 17 deletions apps/desktop/src/ui/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ import { ChromeButton, cx, Kbd, noTextHelpers, Spinner, Switch } from "./primiti
import { RemoteAccessPage } from "./RemoteAccessPage";
import { SchemeWarning } from "./SchemeWarning";
import { ScopedHarnessList } from "./ScopedHarnesses";
import { ScopedValue, SettingsScopeBar, SourceChip } from "./SettingsScope";
import { MixedChip, ScopedValue, SettingsScopeBar, SourceChip } from "./SettingsScope";
import { ShortcutsPage } from "./ShortcutSettings";

const StatisticsPage = lazy(() => import("./StatisticsPage").then((m) => ({ default: m.StatisticsPage })));
Expand Down Expand Up @@ -683,26 +683,25 @@ function AgentsPage() {
<Group
title="New threads start on"
action={
saved ? (
<Chip tone="ok">
<Check size={12} /> Saved
</Chip>
// Where the value comes from sits in the title row, beside the title it qualifies,
// instead of crowding the top edge of the card.
saved || scoped.project || scoped.mixed ? (
<div className="flex items-center gap-2">
{scoped.project ? (
<SourceChip project={scoped.project} />
) : (
scoped.mixed && <MixedChip breakdown={scoped.breakdown} />
)}
{saved && (
<Chip tone="ok">
<Check size={12} /> Saved
</Chip>
)}
</div>
) : undefined
}
hint="A thread can still switch harness and model from the composer."
>
{scoped.project && (
<div className="px-4 pb-2">
<SourceChip project={scoped.project} />
</div>
)}
{!scoped.project && scoped.mixed && (
<div className="px-4 pb-2">
<ScopedValue mixed breakdown={scoped.breakdown}>
<span className="text-callout text-fg-muted">The connected machines disagree</span>
</ScopedValue>
</div>
)}
<DefaultsForm snapshot={snapshot} value={value} onChange={change} />
</Group>
)}
Expand Down
Loading