feat(awooop): classify callback trace gaps
This commit is contained in:
@@ -160,6 +160,8 @@ interface CallbackReplyAuditSummary {
|
||||
outbound_reply_markup_missing_trace_ref_recent_1h_total?: number;
|
||||
outbound_reply_markup_missing_trace_ref_recent_24h_total?: number;
|
||||
outbound_reply_markup_missing_trace_ref_latest_sent_at?: string | null;
|
||||
outbound_reply_markup_trace_ref_gap_status?: string | null;
|
||||
outbound_reply_markup_trace_ref_gap_next_action?: string | null;
|
||||
outbound_reply_markup_missing_incident_ref_top_prefixes?: Array<{
|
||||
prefix?: string | null;
|
||||
total?: number | null;
|
||||
@@ -2527,6 +2529,22 @@ function CallbackReplyAuditSummaryPanel({
|
||||
const latestMissingIncidentRef = formatShortDateTime(
|
||||
summary.outbound_reply_markup_missing_incident_ref_latest_sent_at
|
||||
);
|
||||
const traceGapStatusRaw =
|
||||
summary.outbound_reply_markup_trace_ref_gap_status ?? "observed";
|
||||
const traceGapStatusKey = (
|
||||
traceGapStatusRaw === "clean" ||
|
||||
traceGapStatusRaw === "active_gap" ||
|
||||
traceGapStatusRaw === "recent_backlog" ||
|
||||
traceGapStatusRaw === "legacy_backlog"
|
||||
) ? traceGapStatusRaw : "observed";
|
||||
const traceGapNextActionRaw =
|
||||
summary.outbound_reply_markup_trace_ref_gap_next_action ?? "observed";
|
||||
const traceGapNextActionKey = (
|
||||
traceGapNextActionRaw === "none" ||
|
||||
traceGapNextActionRaw === "inspect_recent_outbound_source_refs" ||
|
||||
traceGapNextActionRaw === "watch_24h_decay" ||
|
||||
traceGapNextActionRaw === "backfill_or_archive_legacy_callbacks"
|
||||
) ? traceGapNextActionRaw : "observed";
|
||||
const snapshotClass = {
|
||||
captured: "border-[#9bc7a4] bg-[#f0faf2] text-[#17602a]",
|
||||
partial: "border-[#d9b36f] bg-[#fff7e8] text-[#8a5a08]",
|
||||
@@ -2573,6 +2591,12 @@ function CallbackReplyAuditSummaryPanel({
|
||||
latest: latestMissingTraceRef,
|
||||
})}
|
||||
</p>
|
||||
<p className="mt-1 text-xs font-semibold leading-5 text-[#141413]">
|
||||
{t("outboundReplyMarkupTraceDecision", {
|
||||
status: t(`traceGapStatuses.${traceGapStatusKey}` as never),
|
||||
action: t(`traceGapNextActions.${traceGapNextActionKey}` as never),
|
||||
})}
|
||||
</p>
|
||||
<p className="mt-1 text-xs leading-5 text-[#5f5b52]">
|
||||
{t("outboundReplyMarkupIncidentFreshness", {
|
||||
recent1h:
|
||||
|
||||
Reference in New Issue
Block a user