awesome-python/agrifine-extension/webpack
Claude cac81d3a86
Fix document parsing and add AG-Refine sister-app sync
Document parsing fixes:
- Copy pdf.worker.min.mjs to dist/pdf.worker.js via webpack CopyPlugin
  (was missing, causing all PDF parsing to silently fail)
- Set webpack output.publicPath '/' so dynamic import chunks resolve
  correctly from Chrome extension chrome-extension:// URLs
- pdfjs: pass Uint8Array and set useWorkerFetch/isEvalSupported for
  extension CSP compatibility
- Add Python doc server (tools/doc_server.py) using flask + pandas +
  PyPDF2 at localhost:7432; extension tries it first then falls back
  to browser-side parsing for more robust CSV/Excel/PDF extraction

AG-Refine sister-app integration:
- New utils/agrefine-bridge.js: detects open AG-Refine tab by URL
  pattern, executes script to dump its localStorage, maps field/load
  data to Agrifine field profile schema, merges without overwriting
  user edits, logs sync history
- Background handler AGREFINE_SYNC calls syncFromAgRefine()
- Field Profiles module: "AG-Refine" sync button, status feedback,
  synced-field badge, "Open in AG-Refine ↗" link in expanded detail
- Settings panel: AG-Refine URL field so sync pins to a specific origin
- sidebar/index.js: loads and saves AG-Refine URL on settings open/save

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBD2dN2KEjzz3UQFa9hEpu
2026-06-27 06:54:41 +00:00
..
webpack.config.js