kredd25 commited on
Commit
da8d7b2
·
1 Parent(s): d9648a4

frontend: render queued agents distinctly (was collapsed into idle)

Browse files

The orchestrator emits status=queued for risk + advisor while the
5 data agents are still running. Previously the frontend mapped
queued → idle, so users saw 'IDLE' next to risk/advisor and
assumed they wouldn't run, even though they did and produced
output. Now queued is its own visible state — amber dot, amber
text, an explanatory line ('queued — waiting for upstream agents').

Also added explicit error styling (coral dot + text) which was
missing.

Files changed (1) hide show
  1. static/index.html +12 -5
static/index.html CHANGED
@@ -195,12 +195,16 @@
195
  .agent-item:last-child { border-bottom: 0; }
196
  .agent-head { display: flex; align-items: center; gap: 10px; }
197
  .agent-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex-shrink: 0; }
 
198
  .agent-dot.working { background: var(--accent); animation: pulseSoft 1.1s infinite; box-shadow: 0 0 0 4px var(--accent-soft); }
199
  .agent-dot.done { background: var(--teal); }
 
200
  .agent-name { font-size: 13.5px; font-weight: 500; flex: 1; }
201
  .agent-status { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.06em; }
 
202
  .agent-status.working { color: var(--accent); }
203
  .agent-status.done { color: var(--teal); }
 
204
  .agent-finding { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; padding-left: 18px; }
205
  .agent-finding .mono { color: var(--ink-3); font-size: 11.5px; }
206
 
@@ -838,10 +842,11 @@ const AgentsScreen = ({ address, onComplete, dark }) => {
838
  <div className="agent-list">
839
  {AGENTS.map((a, i) => {
840
  const live = agentState[a.id];
841
- // Map backend statuses (working/done/error/queued) to the UI's
842
- // visual states. Anything unreported is "idle".
843
- const raw = live?.status || "idle";
844
- const status = raw === "queued" ? "idle" : raw;
 
845
  const summary = live?.summary;
846
  return (
847
  <div key={a.id} className="agent-item">
@@ -850,10 +855,12 @@ const AgentsScreen = ({ address, onComplete, dark }) => {
850
  <span className="agent-name">{a.name}</span>
851
  <span className={`agent-status ${status}`}>{status}</span>
852
  </div>
853
- {(status === "done" || status === "working" || status === "error") && (
854
  <div className="agent-finding">
855
  {status === "working"
856
  ? <span style={{color:"var(--ink-3)"}}>{summary || cute[i % cute.length]}</span>
 
 
857
  : (summary || a.finding)}
858
  </div>
859
  )}
 
195
  .agent-item:last-child { border-bottom: 0; }
196
  .agent-head { display: flex; align-items: center; gap: 10px; }
197
  .agent-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex-shrink: 0; }
198
+ .agent-dot.queued { background: var(--amber); opacity: 0.55; }
199
  .agent-dot.working { background: var(--accent); animation: pulseSoft 1.1s infinite; box-shadow: 0 0 0 4px var(--accent-soft); }
200
  .agent-dot.done { background: var(--teal); }
201
+ .agent-dot.error { background: var(--coral); }
202
  .agent-name { font-size: 13.5px; font-weight: 500; flex: 1; }
203
  .agent-status { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.06em; }
204
+ .agent-status.queued { color: var(--amber); }
205
  .agent-status.working { color: var(--accent); }
206
  .agent-status.done { color: var(--teal); }
207
+ .agent-status.error { color: var(--coral); }
208
  .agent-finding { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; padding-left: 18px; }
209
  .agent-finding .mono { color: var(--ink-3); font-size: 11.5px; }
210
 
 
842
  <div className="agent-list">
843
  {AGENTS.map((a, i) => {
844
  const live = agentState[a.id];
845
+ // Backend statuses: queued, working, done, error.
846
+ // Unreported = idle (the agent hasn't been registered yet,
847
+ // which happens briefly before the orchestrator's initial
848
+ // round of agent_update events arrives).
849
+ const status = live?.status || "idle";
850
  const summary = live?.summary;
851
  return (
852
  <div key={a.id} className="agent-item">
 
855
  <span className="agent-name">{a.name}</span>
856
  <span className={`agent-status ${status}`}>{status}</span>
857
  </div>
858
+ {(status === "done" || status === "working" || status === "error" || status === "queued") && (
859
  <div className="agent-finding">
860
  {status === "working"
861
  ? <span style={{color:"var(--ink-3)"}}>{summary || cute[i % cute.length]}</span>
862
+ : status === "queued"
863
+ ? <span style={{color:"var(--ink-3)"}}>{summary || "queued — waiting for upstream agents"}</span>
864
  : (summary || a.finding)}
865
  </div>
866
  )}