Skip to content

Fix: Surface processing failures to the user instead of spinning#17

Open
Nishit24113 wants to merge 2 commits into
mainfrom
fix/surface-failed-marker
Open

Fix: Surface processing failures to the user instead of spinning#17
Nishit24113 wants to merge 2 commits into
mainfrom
fix/surface-failed-marker

Conversation

@Nishit24113

Copy link
Copy Markdown
Collaborator

Summary

  • Previously, when a PDF failed processing, the UI polled for result/COMPLIANT_<name> until the 30-minute timeout — user saw a spinner with no feedback.
  • Now, on each poll cycle the UI checks for result/FAILED_<name>.json first. If found, it stops polling immediately and shows a failure card with:
    • Human-readable summary (e.g. "The Adobe PDF Services API failed")
    • Affected pages (e.g. "pages 1-200")
    • Reason code (e.g. "ADOBE_API", "BEDROCK_API", "COMPLEXITY")
    • "Try another document" button

Files changed

  • pdf_ui/src/components/ProcessingContainer.jsx — failure marker polling + failure UI rendering
  • pdf_ui/src/components/ProcessingContainer.css — failure card styling

Depends on

Test plan

  • Upload a PDF that fails processing — UI shows failure card with reason instead of spinning
  • Upload a PDF that succeeds — normal COMPLIANT flow unchanged
  • Reviewer to verify and merge when ready

The PDF pipeline now writes result/FAILED_<name>.json on any failure (with a
reason category and the affected page range). Previously the UI only polled for
result/COMPLIANT_<name> and ignored failures, so a failed job left the user
watching the spinner until the 30-minute polling timeout.

ProcessingContainer now, on each poll (PDF format), checks for the FAILED_
marker before the COMPLIANT check. If found it stops polling and shows a
failure card with the summary, affected pages, and reason code, plus a
"Try another document" action.
After 30 minutes (120 attempts) the UI now sets a failure state with a
clear message instead of clearing the interval with no user feedback.
@shaashvat01 shaashvat01 self-requested a review June 18, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant