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(chat): compact composer pills — no option hint on the trigger, folder name only on wide screens

rubenluetke10-beep8cae4bc7af82
diff --git a/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx b/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx
index 567aa52257..d41cd0bb47 100644
--- a/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentchat/AgentComposer.tsx
@@ -328,10 +328,10 @@ export function AgentComposer({ autoFocus = false }: { autoFocus?: boolean }) {
title={draft.cwd ? `${t("agent_chat.folder")}: ${draft.cwd}` : t("agent_chat.folder")}
aria-label={t("agent_chat.folder")}
data-testid="composer-folder"
- className="inline-flex h-7 max-w-[180px] items-center gap-1.5 rounded-lg px-2 text-xs text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground"
+ className="inline-flex h-7 max-w-[160px] items-center gap-1.5 rounded-lg px-2 text-xs text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground"
>
<FolderOpen className="h-3.5 w-3.5 shrink-0" aria-hidden />
- <span className="truncate font-mono text-[11px]">{folderLeaf(draft.cwd)}</span>
+ <span className="hidden truncate font-mono text-[11px] 2xl:inline">{folderLeaf(draft.cwd)}</span>
</button>
<span className="flex-1" />
<button
@@ -455,6 +455,7 @@ function Pick({
searchPlaceholder={searchPlaceholder}
disabled={disabled}
testId={testId}
+ triggerHint={false}
className={cn(
"h-7 w-auto max-w-[200px] gap-1.5 rounded-lg border-transparent bg-transparent py-0 pr-1.5 text-xs font-medium text-foreground shadow-none",
"hover:border-transparent hover:bg-secondary focus-visible:ring-1",
diff --git a/jarvis/ui/web/frontend/src/components/ui/combobox.tsx b/jarvis/ui/web/frontend/src/components/ui/combobox.tsx
index f4674cc942..ceef1494fa 100644
--- a/jarvis/ui/web/frontend/src/components/ui/combobox.tsx
+++ b/jarvis/ui/web/frontend/src/components/ui/combobox.tsx
@@ -74,6 +74,12 @@ export interface ComboboxProps {
ariaDescribedBy?: string;
/** Lands on the trigger button; the panel gets `${testId}-panel`. */
testId?: string;
+ /**
+ * Draw the selected option's `hint` on the trigger too (default). A compact
+ * pill that only has room for the label turns this off; the list still
+ * shows every hint.
+ */
+ triggerHint?: boolean;
}
/** Panel height cap — roughly nine rows, enough to show that more exist. */
@@ -135,6 +141,7 @@ export function Combobox({
id,
ariaDescribedBy,
testId,
+ triggerHint = true,
}: ComboboxProps) {
const [open, setOpen] = useState(false);
const [query, setQuery] = useState("");
@@ -390,7 +397,7 @@ export function Combobox({
>
{selected?.icon}
<span className="min-w-0 flex-1 truncate">{triggerLabel}</span>
- {selected?.hint && (
+ {triggerHint && selected?.hint && (
<span className="shrink-0 truncate text-xs text-muted-foreground">
{selected.hint}
</span>