Date: 2026-01-22Status: Implemented and deployedWhat changed:Restructured email handling to classify and separate different email types into three categories with separate reporting
Classification: job_type = 'alert' or 'suggestion'Processing: • AI-scored against CV using GPT-4o-mini • Stored with full parsed job data and scores • Included in main 'Scored Jobs' report table • Auto-deleted after 14 daysExample: {'job_type': 'alert', 'score': 8, 'parsed_job': {...}, 'score_reason': '...'}
Classification: job_type = 'application'Purpose: Track when you applied for jobsFeatures: • JobServe application confirmations • Stored with job_type: 'application' marker • Shown in separate 'Job Applications' report table • Includes DateTime and Subject • Auto-deleted after 28 days • Separate from main jobs table (no scores)Example: {'job_type': 'application', 'parsed_application': {...}}
Classification: unclassified = {} (empty marker)Purpose: Debug and visibilityFeatures: • Emails that don't match alert/suggestion/application patterns • Stored with unclassified: {} marker (sub-structure) • Shown in separate 'Unclassified Emails' report table • Includes DateTime and Subject • No auto-deletion (kept for debugging)Example: {'unclassified': {}, 'subject': '...', 'date': '...'}
newparser_jobserve.py: • classify_job() - Added logic to classify emails into three types • Application handling - Confirmed applications stored with classification • Unclassified handling - New unclassified records marked with empty sub-structurejob_analysis_report.py: • generate_html_table() - Now filters OUT applications and unclassified • generate_applications_table() - NEW - Shows application confirmations • generate_unclassified_table() - NEW - Shows unclassified emails • create_full_html_document() - Updated to include all three tables • process_job_analysis() - Enhanced cleanup (14 days for jobs, 28 for apps)
Verified 2026-01-22 reprocess run: ✅ 129 total records loaded from database ✅ 90 scored jobs correctly identified ✅ 2 application confirmations properly classified ✅ 37 unclassified emails detected ✅ Report generated with three separate tables ✅ Old records (37 jobs >14 days) deleted, UIDs returned for email cleanup
Before: All job records mixed in single tableAfter: Same table, but with classification markers: • Scored: {'job_type': 'alert|suggestion', 'score': N, ...} • Applications: {'job_type': 'application', ...} • Unclassified: {'unclassified': {}, ...}Benefit: No separate DB files, single source of truth
Total emails processed: 129Scored opportunities: 90Application confirmations: 2Unclassified: 37Report tables: 3 (Scored Jobs, Applications, Unclassified)
Planned improvements:• Machine learning on user feedback to fine-tune scoring• Email threading/conversation grouping• Advanced filtering (by salary, location, skills)• Integration with calendar for interview scheduling• Batch application actions• Email template suggestions for applications
Standards: Python 3.9+, PEP8 styleTesting: Unit tests in tests/ directoryLinting: flake8 configuration in project rootType hints: Gradually being addedDocumentation: This notes system + inline comments