Skip to content

Auto-refresh document detail page while processing#61

Merged
Empreiteiro merged 1 commit intomainfrom
fix/document-auto-refresh-on-processing
Mar 27, 2026
Merged

Auto-refresh document detail page while processing#61
Empreiteiro merged 1 commit intomainfrom
fix/document-auto-refresh-on-processing

Conversation

@Empreiteiro
Copy link
Copy Markdown
Owner

Summary

  • Add conditional polling (every 2s) to useDocument() hook while document is in a processing state
  • Polling stops automatically once status changes to completed, failed, or review
  • Fixes the issue where preview and extracted fields only appeared after navigating away and back

Test plan

  • Upload a document and stay on the detail page — status updates automatically as it processes
  • Once processing completes, extracted fields and preview appear without manual refresh
  • After completion, polling stops (no unnecessary network requests)

🤖 Generated with Claude Code

Poll every 2 seconds when the document status is one of the
processing states (uploaded, ocr_processing, classifying, extracting).
Polling stops automatically once processing completes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Empreiteiro Empreiteiro merged commit 01c2296 into main Mar 27, 2026
@Empreiteiro Empreiteiro deleted the fix/document-auto-refresh-on-processing branch March 27, 2026 13:51
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