fix(ui): resume lost runs, activity feed fixes, and selector focus

Add resume button for process_lost runs on agent detail page. Fix
activity row text overflow with truncation. Pass entityTitleMap to
Dashboard activity feed. Fix InlineEntitySelector stealing focus on
close when advancing to next field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Forgotten
2026-02-26 10:32:51 -06:00
parent e4e5609132
commit 20176d9d60
4 changed files with 74 additions and 1 deletions

View File

@@ -108,7 +108,7 @@ export function ActivityRow({ event, agentMap, entityNameMap, entityTitleMap, cl
const inner = (
<div className="flex gap-3">
<p className="flex-1 min-w-0">
<p className="flex-1 min-w-0 truncate">
<Identity
name={actorName}
size="xs"

View File

@@ -44,6 +44,7 @@ export const InlineEntitySelector = forwardRef<HTMLButtonElement, InlineEntitySe
const [query, setQuery] = useState("");
const [highlightedIndex, setHighlightedIndex] = useState(0);
const inputRef = useRef<HTMLInputElement>(null);
const shouldPreventCloseAutoFocusRef = useRef(false);
const allOptions = useMemo<InlineEntityOption[]>(
() => [{ id: "", label: noneLabel, searchText: noneLabel }, ...options],
@@ -70,6 +71,7 @@ export const InlineEntitySelector = forwardRef<HTMLButtonElement, InlineEntitySe
const commitSelection = (index: number, moveNext: boolean) => {
const option = filteredOptions[index] ?? filteredOptions[0];
if (option) onChange(option.id);
shouldPreventCloseAutoFocusRef.current = moveNext;
setOpen(false);
setQuery("");
if (moveNext && onConfirm) {
@@ -109,6 +111,11 @@ export const InlineEntitySelector = forwardRef<HTMLButtonElement, InlineEntitySe
event.preventDefault();
inputRef.current?.focus();
}}
onCloseAutoFocus={(event) => {
if (!shouldPreventCloseAutoFocusRef.current) return;
event.preventDefault();
shouldPreventCloseAutoFocusRef.current = false;
}}
>
<input
ref={inputRef}