fix: preserve debug info across snapshot re-fetch + widen refresh filter
- refreshDebug state lives in parent (InstrumentDashboard) so it survives fetchSnapshotSilent re-render (ExplanationScore no longer loses debugInfo when onRefreshDone triggers setLoading → unmount) - fetchSnapshotSilent: re-fetches snapshot without setLoading(true) so ExplanationScore stays mounted with its state - Refresh filter now catches rows where prediction_json is empty even if actual_json is populated, and handles '[]' / null variants Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1462,7 +1462,10 @@ def refresh_auto_analyses():
|
||||
"pred_keys": list(json.loads(pred).keys()) if pred not in (None, "", "{}", "null") else [],
|
||||
})
|
||||
|
||||
rows = [r for r in all_rows if (r["actual_json"] or "") in (None, "", "{}", "null")]
|
||||
_empty = (None, "", "{}", "null", "[]")
|
||||
rows = [r for r in all_rows if
|
||||
(r["actual_json"] or "") in _empty or
|
||||
(r["prediction_json"] or "") in _empty]
|
||||
print(f"[refresh] {len(rows)} analyses with empty actual_json out of {len(all_rows)} total", flush=True)
|
||||
conn.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user