feat(awooop): show callback trace recovery
All checks were successful
CD Pipeline / tests (push) Successful in 1m26s
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / build-and-deploy (push) Successful in 3m41s
CD Pipeline / post-deploy-checks (push) Successful in 1m41s

This commit is contained in:
Your Name
2026-05-25 21:47:40 +08:00
parent 6a379862e7
commit b2fc03d09f
7 changed files with 213 additions and 0 deletions

View File

@@ -162,6 +162,10 @@ interface CallbackReplyAuditSummary {
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_trace_ref_after_gap_total?: number;
outbound_reply_markup_trace_ref_after_gap_first_sent_at?: string | null;
outbound_reply_markup_trace_ref_after_gap_latest_sent_at?: string | null;
outbound_reply_markup_trace_ref_gap_recovery_status?: string | null;
outbound_reply_markup_missing_incident_ref_top_prefixes?: Array<{
prefix?: string | null;
total?: number | null;
@@ -2545,6 +2549,19 @@ function CallbackReplyAuditSummaryPanel({
traceGapNextActionRaw === "watch_24h_decay" ||
traceGapNextActionRaw === "backfill_or_archive_legacy_callbacks"
) ? traceGapNextActionRaw : "observed";
const traceGapRecoveryStatusRaw =
summary.outbound_reply_markup_trace_ref_gap_recovery_status ?? "observed";
const traceGapRecoveryStatusKey = (
traceGapRecoveryStatusRaw === "not_needed" ||
traceGapRecoveryStatusRaw === "recovered_after_gap" ||
traceGapRecoveryStatusRaw === "no_recovery_signal"
) ? traceGapRecoveryStatusRaw : "observed";
const traceRefAfterGapFirst = formatShortDateTime(
summary.outbound_reply_markup_trace_ref_after_gap_first_sent_at
);
const traceRefAfterGapLatest = formatShortDateTime(
summary.outbound_reply_markup_trace_ref_after_gap_latest_sent_at
);
const snapshotClass = {
captured: "border-[#9bc7a4] bg-[#f0faf2] text-[#17602a]",
partial: "border-[#d9b36f] bg-[#fff7e8] text-[#8a5a08]",
@@ -2597,6 +2614,16 @@ function CallbackReplyAuditSummaryPanel({
action: t(`traceGapNextActions.${traceGapNextActionKey}` as never),
})}
</p>
<p className="mt-1 text-xs font-semibold leading-5 text-[#17602a]">
{t("outboundReplyMarkupTraceRecovery", {
status: t(
`traceGapRecoveryStatuses.${traceGapRecoveryStatusKey}` as never
),
count: summary.outbound_reply_markup_trace_ref_after_gap_total ?? 0,
first: traceRefAfterGapFirst,
latest: traceRefAfterGapLatest,
})}
</p>
<p className="mt-1 text-xs leading-5 text-[#5f5b52]">
{t("outboundReplyMarkupIncidentFreshness", {
recent1h: