diff --git a/ui/src/styles/components.css b/ui/src/styles/components.css index 4413ba2e2a2..cece0441430 100644 --- a/ui/src/styles/components.css +++ b/ui/src/styles/components.css @@ -2005,8 +2005,8 @@ .agents-overview-grid { display: grid; - gap: 14px; - grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 10px; + grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } .agent-kv { @@ -2658,6 +2658,67 @@ text-decoration: underline; } +/* =========================================== + Debug Event Log + =========================================== */ + +.debug-event-log-scroll { + margin-top: 12px; + max-height: 480px; + overflow-y: auto; +} + +.debug-event-entry { + border-bottom: 1px solid var(--border); +} + +.debug-event-entry:last-child { + border-bottom: none; +} + +.debug-event-summary { + display: flex; + align-items: center; + gap: 10px; + padding: 8px 0; + cursor: pointer; + font-family: var(--mono); + font-size: 13px; + list-style: none; +} + +.debug-event-summary::-webkit-details-marker { + display: none; +} + +.debug-event-summary::before { + content: "▸"; + flex-shrink: 0; + width: 12px; + color: var(--muted); + transition: transform 0.15s ease; +} + +.debug-event-entry[open] > .debug-event-summary::before { + transform: rotate(90deg); +} + +.debug-event-name { + font-weight: 600; +} + +.debug-event-ts { + margin-left: auto; + flex-shrink: 0; + font-size: 12px; +} + +.debug-event-payload { + margin: 0 0 8px 22px; + max-height: 300px; + overflow-y: auto; +} + /* =========================================== Overview Event Log =========================================== */ @@ -2838,8 +2899,10 @@ .ov-bottom-grid { display: grid; - grid-template-columns: 1fr 1fr; + grid-template-columns: 1fr; gap: 14px; + max-height: 420px; + overflow-y: auto; } @media (max-width: 768px) { diff --git a/ui/src/styles/config.css b/ui/src/styles/config.css index e5ef45bc56b..c68908a422a 100644 --- a/ui/src/styles/config.css +++ b/ui/src/styles/config.css @@ -8,7 +8,7 @@ grid-template-columns: 260px minmax(0, 1fr); gap: 0; height: calc(100vh - 160px); - margin: -16px; + margin: 0 -16px -16px; border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--panel); diff --git a/ui/src/ui/views/agents-panels-overview.ts b/ui/src/ui/views/agents-panels-overview.ts index a19234550b5..47811b789a1 100644 --- a/ui/src/ui/views/agents-panels-overview.ts +++ b/ui/src/ui/views/agents-panels-overview.ts @@ -1,14 +1,10 @@ import { html, nothing } from "lit"; -import type { AgentIdentityResult, AgentsFilesListResult, AgentsListResult } from "../types.ts"; +import type { AgentsFilesListResult, AgentsListResult } from "../types.ts"; import { - agentAvatarHue, - agentBadgeText, buildModelOptions, - normalizeAgentLabel, normalizeModelValue, parseFallbackList, resolveAgentConfig, - resolveAgentEmoji, resolveModelFallbacks, resolveModelLabel, resolveModelPrimary, @@ -20,9 +16,6 @@ export function renderAgentOverview(params: { defaultId: string | null; configForm: Record | null; agentFilesList: AgentsFilesListResult | null; - agentIdentity: AgentIdentityResult | null; - agentIdentityLoading: boolean; - agentIdentityError: string | null; configLoading: boolean; configSaving: boolean; configDirty: boolean; @@ -36,9 +29,6 @@ export function renderAgentOverview(params: { agent, configForm, agentFilesList, - agentIdentity, - agentIdentityLoading, - agentIdentityError, configLoading, configSaving, configDirty, @@ -65,26 +55,9 @@ export function renderAgentOverview(params: { const effectivePrimary = modelPrimary ?? defaultPrimary ?? null; const modelFallbacks = resolveModelFallbacks(config.entry?.model); const fallbackChips = modelFallbacks ?? []; - const identityName = - agentIdentity?.name?.trim() || - agent.identity?.name?.trim() || - agent.name?.trim() || - config.entry?.name || - "-"; - const resolvedEmoji = resolveAgentEmoji(agent, agentIdentity); - const identityEmoji = resolvedEmoji || "-"; const skillFilter = Array.isArray(config.entry?.skills) ? config.entry?.skills : null; const skillCount = skillFilter?.length ?? null; - const identityStatus = agentIdentityLoading - ? "Loading…" - : agentIdentityError - ? "Unavailable" - : ""; const isDefault = Boolean(params.defaultId && agent.id === params.defaultId); - const badge = agentBadgeText(agent.id, params.defaultId); - const hue = agentAvatarHue(agent.id); - const displayName = normalizeAgentLabel(agent); - const subtitle = agent.identity?.theme?.trim() || ""; const disabled = !configForm || configLoading || configSaving; const removeChip = (index: number) => { @@ -104,27 +77,11 @@ export function renderAgentOverview(params: { } }; + const fallbackSummary = fallbackChips.length > 0 ? `${fallbackChips.length} configured` : "none"; + return html`
-
Overview
-
Workspace paths and identity metadata.
- -
-
- ${resolvedEmoji || displayName.slice(0, 1)} -
-
-
${identityName}
-
- ${identityEmoji !== "-" ? html`${identityEmoji}` : nothing} - ${subtitle ? html`${subtitle}` : nothing} - ${badge ? html`${badge}` : nothing} - ${identityStatus ? html`${identityStatus}` : nothing} -
-
-
- -
+
Workspace
@@ -144,23 +101,25 @@ export function renderAgentOverview(params: {
Skills Filter
${skillFilter ? `${skillCount} selected` : "all skills"}
+
+
Fallbacks
+
${fallbackSummary}
+
${ configDirty ? html` -
You have unsaved config changes.
+
You have unsaved config changes.
` : nothing } -
-
Model Selection
-
-
diff --git a/ui/src/ui/views/agents-utils.ts b/ui/src/ui/views/agents-utils.ts index 4ea1053d511..29dbf90505c 100644 --- a/ui/src/ui/views/agents-utils.ts +++ b/ui/src/ui/views/agents-utils.ts @@ -387,7 +387,10 @@ export function buildModelOptions( `; } - return options.map((option) => html``); + return options.map( + (option) => + html``, + ); } type CompiledPattern = diff --git a/ui/src/ui/views/debug.ts b/ui/src/ui/views/debug.ts index 6a03073726f..f5acb089a1b 100644 --- a/ui/src/ui/views/debug.ts +++ b/ui/src/ui/views/debug.ts @@ -120,26 +120,49 @@ export function renderDebug(props: DebugProps) {
-
Event Log
-
Latest gateway events.
+
+
+
Event Log
+
Latest gateway events.
+
+ ${ + props.eventLog.length > 0 + ? html`` + : nothing + } +
${ props.eventLog.length === 0 ? html`
No events yet.
` : html` -
+
${props.eventLog.map( (evt) => html` -
-
-
${evt.event}
-
${new Date(evt.ts).toLocaleTimeString()}
-
-
-
${formatEventPayload(evt.payload)}
-
-
+
+ + ${evt.event} + ${new Date(evt.ts).toLocaleTimeString()} + + ${ + evt.payload + ? html`
${formatEventPayload(evt.payload)}
` + : html` +
No payload.
+ ` + } +
`, )}