Commit Graph

19 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 45a2dd8be2 fix: IPv4 preference + DNS cache fallback for stable POP3/IMAP connections
- Add DNS_CACHE_FALLBACK_ENABLED setting (default: true)
- Add in-process DNS cache (_dns_cache, _dns_cache_lock, _get/_set_cached_ipv4)
- Add _resolve_ipv4 (async) and _resolve_ipv4_sync: AF_INET lookup, cache on
  success, return cached IP on EAI_AGAIN when fallback enabled
- Add _IMAP4SSLwithSNI: connects to pre-resolved IPv4 but uses original
  hostname for TLS SNI/cert verification
- Add _POP3SSLWithIPv4Pref / _POP3WithIPv4Pref: override _create_socket to
  use pre-resolved IPv4 while keeping original host for POP3_SSL SNI
- Add _make_pop3_conn factory and _make_imap_client async factory
- Wire IPv4/cache helpers into all 6 connection call-sites (IMAP x3, POP3 x3)
- Distinguish transient DNS (EAI_AGAIN) from permanent in _format_connection_error
- Replace asyncio.get_event_loop() with get_running_loop() in 4 async sites
- All 75 existing unit tests pass unchanged

Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/be0a3bbd-1af1-408e-b918-84753723154b

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-05-03 20:49:51 +00:00
copilot-swe-agent[bot] eeb3fa5c66 refactor: use __len__ for MailDebugRecorder, str() size estimate, clearer tests, fix unused import
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/5d2918de-630e-4a66-8355-1b036c620b1c

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-05-03 18:59:41 +00:00
copilot-swe-agent[bot] db893d05e9 feat: add friendly error messages, MailDebugRecorder, clear-error endpoint, debug_logging column
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/5d2918de-630e-4a66-8355-1b036c620b1c

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-05-03 18:43:06 +00:00
copilot-swe-agent[bot] 3dd71cd61d fix: restore missing forward_email signature and reformat with black
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/3c4ae596-6052-4a61-9edd-b668a6cda32e

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-04-07 10:38:00 +00:00
copilot-swe-agent[bot] ff7b50d944 fix: retry failed forwarded emails; only post-process successfully forwarded messages
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/e1fb16dc-0187-4ab9-901a-e0a76de64599

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-04-07 10:32:38 +00:00
copilot-swe-agent[bot] da05016143 Fix IMAP emails appearing empty: accept bytearray from aioimaplib literals
aioimaplib stores RFC822 literal data as bytearray in response.lines,
not bytes. The extraction loop checked isinstance(line, bytes) which
returns False for bytearray, silently dropping every email body and
causing all IMAP emails (T-Online, GMX, etc.) to appear empty.

Fix: accept (bytes, bytearray) and convert to bytes() immediately so
the rest of the pipeline is unaffected. Two new regression tests mirror
the real aioimaplib behaviour by passing bytearray as the literal.

Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/341f5c82-70f8-438d-91ca-8e906a06c400

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-28 22:08:04 +00:00
copilot-swe-agent[bot] 0720901265 fix: drop empty emails, clear stale errors on success, harden IMAP extraction
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/d50e7f06-4c6f-4caa-b5dd-329068e8096c

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-28 21:42:19 +00:00
copilot-swe-agent[bot] 062739a9a1 Fix IMAP UID SEARCH crash and RFC 3501 flag parentheses
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/a44d5455-25ea-49b9-8310-4efd6d467e84

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-28 21:00:44 +00:00
copilot-swe-agent[bot] 454452a0b6 fix: use UID-based IMAP commands and batch STORE operations to fix T-Online BYE errors
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/d01a05d3-31e1-4aca-b75d-c4e63b7e5af0

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-28 20:20:43 +00:00
copilot-swe-agent[bot] 0698eca628 fix: resolve 21 mypy type errors across backend modules
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/bc16203d-7907-4e3f-952f-18c760c85076

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-28 19:32:53 +00:00
copilot-swe-agent[bot] aa2ea611b1 Logo banner layout rework, Proton Mail provider, ProviderWizard sizing improvements
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/8dc8f341-02b2-4449-8a88-a2124033c31a

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-28 19:18:17 +00:00
copilot-swe-agent[bot] f8a9f3ce53 fix: SyntaxWarning in mail_processor and stale running runs in tasks
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/b5def92f-03a4-493c-a5a7-d15a7ca82492

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-27 17:28:28 +00:00
copilot-swe-agent[bot] a15216c630 feat: add account toggle, message dedup tracking, SMTP per-user and Gmail OAuth flow plan
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/b77800ca-b452-4427-b0bf-63403e906916
2026-03-25 11:20:22 +00:00
copilot-swe-agent[bot] 27c50e49cf Fix all mypy and eslint errors, add copilot lint instructions
Backend (mypy - 56 errors fixed):
- database.py: Fix async generator return type to AsyncGenerator
- database_models.py: Add type annotations for SQLEnum columns
- middleware.py: Use explicit Optional for exempt_paths parameter
- mail_processor.py: Fix type narrowing in fetch_emails, add Dict type annotation for KNOWN_PROVIDERS
- users.py, auth.py, providers.py, tasks.py: Add type: ignore comments for SQLAlchemy Column assignment patterns

Frontend (eslint - 3 errors, 2 warnings fixed):
- login/page.tsx: Replace any with unknown + type narrowing, prefix unused vars with underscore
- register/page.tsx: Replace any with unknown + type narrowing

Add .github/copilot-instructions.md with lint-check requirements

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/dac7ab78-fe27-4fe4-890f-32c6c1c6d881
2026-03-23 10:48:16 +00:00
copilot-swe-agent[bot] a918421945 Fix all 33 ruff linting errors causing CI failures
- Remove unused imports (F401) across 17 files
- Fix f-strings without placeholders (F541) in 3 files
- Add noqa: E712 to SQLAlchemy == True comparisons (valid ORM pattern)
- Preserve alembic side-effect import with noqa: F401

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/99c3a25f-3479-473d-ac95-9faaa0ddd55b
2026-03-23 10:38:39 +00:00
copilot-swe-agent[bot] bcbef88803 Fix CI failures: add backend/conftest.py for module resolution and run black formatting
- Add backend/conftest.py that inserts the backend directory into sys.path,
  fixing ModuleNotFoundError when pytest runs from the backend/ directory
  (as CI does with `cd backend && pytest tests/`)
- Run black formatter on all 28 backend files that needed reformatting
- All 53 tests pass with both `pytest tests/` and `python -m pytest tests/`

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/beb47db2-da25-416a-8fb0-c1452a3b22a7
2026-03-23 10:24:28 +00:00
copilot-swe-agent[bot] 40150da3a9 Add Gmail API injection, provider presets, delivery method, and frontend wizard
- Add gmail_service.py with Gmail API users.messages.insert() for direct email injection
- Add DeliveryMethod enum and GmailCredential model to database models
- Add delivery_method field to MailAccount schema and model
- Create providers.py endpoint with 12 provider presets (Gmail, GMX, WEB.DE, Outlook, Yahoo, AOL, T-Online, 1&1/IONOS, Freenet, Posteo, mail.de, iCloud)
- Expand MailServerAutoDetect with 30+ domain mappings
- Update Celery tasks to prefer Gmail API injection, with SMTP fallback
- Add ProviderWizard.tsx frontend component for quick provider setup
- Update AddMailAccountModal.tsx with wizard integration
- Add Google API Python client libraries to requirements.txt
- Add Gmail API config settings
- Add unit tests for Gmail service and provider presets

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/pop_puller_to_gmail/sessions/de3ef930-a980-4958-8a9d-a2c802918e81
2026-03-22 19:00:30 +00:00
copilot-swe-agent[bot] bb535028cc Fix code review issues: remove duplicate dependency, improve error handling, fix hardcoded credentials, improve encryption salt
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-01 12:55:26 +00:00
copilot-swe-agent[bot] 130b53d37f Add backend foundation: database models, security, and mail processing service
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-01 12:44:22 +00:00