MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / AttemptRow

Function AttemptRow

frontend/dashboard/src/components/Explainer.tsx:319–367  ·  view source on GitHub ↗
({ attempt }: { attempt: TraceAttempt })

Source from the content-addressed store, hash-verified

317}
318
319function AttemptRow({ attempt }: { attempt: TraceAttempt }) {
320 return (
321 <div className="rounded-compact border border-n-border px-4 py-4">
322 <div className="flex items-start justify-between gap-3">
323 <div>
324 <div className="flex items-center gap-2">
325 <span className={`h-1.5 w-1.5 rounded-full ${attempt.success ? "bg-n-success" : attempt.blocked ? "bg-n-warning" : "bg-n-accent"}`} />
326 <span className="font-mono text-[12px] uppercase tracking-[0.08em] text-n-secondary">
327 Attempt {attempt.attempt_index}
328 </span>
329 </div>
330 <div className="mt-2 font-mono text-[15px] text-n-display">
331 {shortModel(attempt.selected_model)}
332 </div>
333 <div className="mt-1 font-mono text-[11px] text-n-secondary">
334 {prettyTransport(attempt.requested_transport || attempt.transport)} → {prettyTransport(attempt.transport)}
335 </div>
336 </div>
337
338 <div className="text-right">
339 <div className="font-mono text-[12px] text-n-secondary">
340 {attempt.provider_name || "gateway"}
341 </div>
342 <div className={`mt-1 font-mono text-[11px] ${attempt.success ? "text-n-success" : "text-n-accent"}`}>
343 {attempt.blocked ? "BLOCKED" : attempt.success ? "SUCCESS" : `HTTP ${attempt.status_code || "—"}`}
344 </div>
345 </div>
346 </div>
347
348 {attempt.transport_reason ? (
349 <div className="mt-3 text-[13px] text-n-primary">
350 {attempt.transport_reason}
351 </div>
352 ) : null}
353
354 <div className="mt-3 flex items-center justify-between gap-3 font-mono text-[11px] text-n-secondary">
355 <span className="truncate">{attempt.target_url || "no target url recorded"}</span>
356 <span>{attempt.transport_preference_source ? prettifySource(attempt.transport_preference_source) : ""}</span>
357 </div>
358
359 {(attempt.error_code || attempt.error_message) ? (
360 <div className="mt-3 font-mono text-[11px] text-n-accent">
361 {attempt.error_code || "upstream_error"}
362 {attempt.error_message ? ` · ${attempt.error_message}` : ""}
363 </div>
364 ) : null}
365 </div>
366 );
367}
368
369function TagGroup({ title, items }: { title: string; items: string[] }) {
370 if (!items || items.length === 0) return null;

Callers

nothing calls this directly

Calls 3

shortModelFunction · 0.70
prettyTransportFunction · 0.70
prettifySourceFunction · 0.70

Tested by

no test coverage detected