mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-13 13:17:40 +02:00
[eric] workflows: manual runs surface as the real agent card, never the monitor pane, and the pill answer becomes a calm card (ENG-336)
This commit is contained in:
@@ -318,14 +318,18 @@ function AgentNarratorPill({ label, running, todos, liveSteps, artifact, askPair
|
||||
key={artifactKey}
|
||||
className="osw-artifact"
|
||||
sx={{
|
||||
// A width floor: without one a narrow card column squeezed the answer into a skinny
|
||||
// four-line tower (Eric's "incredibly ugly" pill, 2026-08-17); a calm card, not a blob.
|
||||
minWidth: 200,
|
||||
maxWidth: 320,
|
||||
px: 1.5,
|
||||
py: 0.875,
|
||||
borderRadius: '14px',
|
||||
py: 1,
|
||||
borderRadius: '12px',
|
||||
background: GLASS,
|
||||
border: '1px solid rgba(255,255,255,0.08)',
|
||||
backdropFilter: GLASS_BLUR,
|
||||
WebkitBackdropFilter: GLASS_BLUR,
|
||||
boxShadow: '0 6px 20px rgba(0,0,0,0.3)',
|
||||
boxShadow: '0 2px 10px rgba(0,0,0,0.18)',
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
} from '../state/agentsSlice';
|
||||
import { streamStart, streamDelta, streamEnd, clearStreamingForSession } from '../state/streamingSlice';
|
||||
import { BackgroundDeltaBuffer } from './BackgroundDeltaBuffer';
|
||||
import { addBrowserCardFromBackend, setBrowserDocked, markBrowserCardEnding, keepBrowserCardOpen, placeBesideCard, placeBelowCard, placeBrowserBesideChat, setBrowserCardPosition, setGlowingBrowserCards, fadeGlowingBrowserCards, clearGlowingBrowserCards, removeBrowserCard, GRID_GAP, WORKFLOW_CARD_GAP, openWorkflowsApp, openWorkflowMonitor } from '../state/dashboardLayoutSlice';
|
||||
import { addBrowserCardFromBackend, setBrowserDocked, markBrowserCardEnding, keepBrowserCardOpen, placeBesideCard, placeBelowCard, placeBrowserBesideChat, setBrowserCardPosition, setGlowingBrowserCards, fadeGlowingBrowserCards, clearGlowingBrowserCards, removeBrowserCard, GRID_GAP, WORKFLOW_CARD_GAP, openWorkflowsApp } from '../state/dashboardLayoutSlice';
|
||||
import { upsertOutput } from '../state/outputsSlice';
|
||||
import { setCardPosition } from '../state/dashboardLayoutSlice';
|
||||
import { fetchSettings } from '../state/settingsSlice';
|
||||
@@ -75,9 +75,6 @@ interface WSManagerOptions {
|
||||
const HEARTBEAT_INTERVAL_MS = 25_000;
|
||||
const HEARTBEAT_TIMEOUT_MS = 10_000;
|
||||
|
||||
// Manual runs whose monitor card we've already popped open, so the repeated "workflow:run" updates that stream during a run don't re-pin or re-stack the card.
|
||||
const autoOpenedRunIds = new Set<string>();
|
||||
|
||||
interface QueuedFrame {
|
||||
event: string;
|
||||
data: Record<string, any>;
|
||||
@@ -859,11 +856,10 @@ class WebSocketManager {
|
||||
if (data.run) {
|
||||
const run = data.run;
|
||||
store.dispatch(upsertRun(run));
|
||||
// A manual run (the Run button OR the edit agent's RunWorkflowNow) should surface its live card the moment it starts. Fire once per run so the run's later tool-call updates don't keep re-pinning the monitor; scheduled runs stay quiet so they never hijack the canvas.
|
||||
if (run.status === 'running' && run.triggered_by === 'manual' && run.id && !autoOpenedRunIds.has(run.id)) {
|
||||
autoOpenedRunIds.add(run.id);
|
||||
store.dispatch(openWorkflowMonitor({ workflowId: run.workflow_id, runId: run.id }));
|
||||
}
|
||||
// Manual runs surface as the run's REAL agent card (the session lands on the board via
|
||||
// the normal flow), never the special monitor pane; auto-opening the monitor here was the
|
||||
// "workflow runs aren't real agents" jank (Eric, 2026-08-17). The monitor stays reachable
|
||||
// from the hub's own Viewing controls for people who want the run timeline.
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user