ScoriaWeb.ReviewerSurface (scoria v0.1.3)

Copy Markdown View Source

Tenant-scoped read model for reviewer dashboard pages.

Use this module when a Scoria dashboard page needs reviewer-ready maps for live runs, approvals, review candidates, connectors, incidents, and trace evidence. The caller supplies the tenant scope that ScoriaWeb.DashboardScope already resolved from the host-authenticated dashboard boundary.

Route params and query values may select runs, traces, incidents, review candidates, and connectors after mount, but they never establish tenant authority. Functions are pure reads: they take a tenant, trace, or run scope and return plain maps ready for rendering.

Read guides/reviewer-verification.md for dashboard proof workflows and guides/ownership-boundary.md for the host-owned authentication and tenant membership boundary.

Summary

Functions

Compact badge assigns merged onto a trace row when evidence is loaded.

Tenant-scoped incident lookup for routed incident detail pages.

Tenant-scoped review candidate projection for workflow detail deep links.

Tenant-scoped workflow detail lookup for routed workflow pages.

Newest tenant incident linked to a workflow run, used for legacy ?from=run links.

All incidents for a tenant, newest first — the /incidents triage list.

Recent workflow runs for a tenant, newest first — the /workflows list.

Runtime posture rows for a tenant, annotated with live presence status.

Functions

breaker_detail(breaker)

breaker_signal(arg1)

budget_actuals(budget)

budget_signal(budget)

budget_status(budget)

budget_status_label(budget)

build_audit_rows(audit_rows)

build_delivery_rows(deliveries)

build_incident_rows(incidents, alert_events, incident_events)

compact_trace_badges(trace_id, run_id)

Compact badge assigns merged onto a trace row when evidence is loaded.

connector_drawer(tenant_id, connector_id)

connector_fleet(tenant_id)

decimal_to_string(value)

delivery_outcome(delivery)

empty_incident_projection(trace_id, run_id)

empty_status_home_summary()

fetch_tenant_incident(tenant_id, incident_id)

Tenant-scoped incident lookup for routed incident detail pages.

fetch_tenant_review_candidate(tenant_id, arg2, candidate_id)

Tenant-scoped review candidate projection for workflow detail deep links.

fetch_tenant_run_detail(tenant_id, run_id)

Tenant-scoped workflow detail lookup for routed workflow pages.

find_tenant_incident_for_run(tenant_id, run_id)

Newest tenant incident linked to a workflow run, used for legacy ?from=run links.

first_present(values)

fleet_summary(tenant_id)

incidents_summary(tenant_id)

latest_breaker(trace_id, run_id)

latest_budget(trace_id, run_id)

list_alert_events(incidents)

list_audit_rows(trace_id, run_id)

list_deliveries(trace_id, run_id)

list_incident_events(incidents)

list_incidents(trace_id, run_id)

list_tenant_incidents(tenant_id)

All incidents for a tenant, newest first — the /incidents triage list.

list_tenant_runs(tenant_id)

Recent workflow runs for a tenant, newest first — the /workflows list.

load_budget_projection(trace_id, run_id)

load_incident_projection(trace_id, run_id)

load_runtimes(tenant_id)

Runtime posture rows for a tenant, annotated with live presence status.

pending_approval_count(tenant_id)

relay_detail(audit_rows, deliveries)

relay_signal(audit_rows, deliveries)

routing_label(arg1)

runtime_drawer_semantic(run_id)

severity_label(arg1)

status_home_summary(tenant_id)