From 86d53f3cb4b8f4bb77cbd1f7045219564e53b4b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:27:36 +0000 Subject: [PATCH 1/3] Initial plan From d139d82d5bbe4df2e36fe1089d36f6881226ea67 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:38:01 +0000 Subject: [PATCH 2/3] feat: surface LLM partial failures as user-visible warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add `llm_warnings` to WorkflowState to accumulate failure messages - Update summary_generation_node, impact_analysis_node, and privacy_compliance_node to append a human-readable warning to `llm_warnings` whenever their LLM call fails - Include `partial_failures` list in scan result API response so consumers can display which sections are unavailable - Show a yellow warning banner in SummaryPanel when `partial_failures` is non-empty (e.g. "Summary unavailable — LLM service temporarily failed") - Add CSS for the warning banner (dark + light theme) - Add 9 unit tests covering warning accumulation across all three nodes" Agent-Logs-Url: https://github.com/Stanzin7/ExtensionShield/sessions/8a1fb240-97cb-498e-aced-9c548c22f375 Co-authored-by: Stanzin7 <109467334+Stanzin7@users.noreply.github.com> --- .../src/components/report/SummaryPanel.jsx | 34 +++ .../src/components/report/SummaryPanel.scss | 41 ++++ src/extension_shield/api/main.py | 2 + src/extension_shield/workflow/nodes.py | 16 +- src/extension_shield/workflow/state.py | 5 + tests/workflow/test_nodes_llm_warnings.py | 199 ++++++++++++++++++ 6 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 tests/workflow/test_nodes_llm_warnings.py diff --git a/frontend/src/components/report/SummaryPanel.jsx b/frontend/src/components/report/SummaryPanel.jsx index 3fda958b..5f2ba911 100644 --- a/frontend/src/components/report/SummaryPanel.jsx +++ b/frontend/src/components/report/SummaryPanel.jsx @@ -29,6 +29,11 @@ const SummaryPanel = ({ // Fallback: highlights (keyPoints) and SAST/engine keyFindings for concerns const { oneLiner, keyPoints } = normalizeHighlights(rawScanResult); + // Partial-failure warnings surfaced from backend LLM nodes + const partialFailures = Array.isArray(rawScanResult?.partial_failures) + ? rawScanResult.partial_failures + : []; + // SAST/engine keyFindings – use for Quick Summary concerns when they add value const engineConcerns = (keyFindings || []) .filter(f => f.severity === 'high' || f.severity === 'medium') @@ -59,6 +64,17 @@ const SummaryPanel = ({ ); }; + const partialFailureBanner = partialFailures.length > 0 ? ( +
Review this extension before installing.
@@ -94,6 +111,20 @@ const SummaryPanel = ({ } if (!hasAnySummary) { + if (partialFailures.length > 0) { + return ( +