/ CHANGELOG.md
CHANGELOG.md
 1  ## Completed Tasks - 2026-03-18
 2  
 3  - ✅ **Flaky/failing test scripts fixed** (2026-03-18)
 4  
 5  ## Completed Tasks - 2026-03-18
 6  
 7  - ✅ **Gate enrichment on semantic scoring completion** — Already implemented: `src/stages/enrich.js:163` uses `inputStatus = 'semantic_scored'` (or `'vision_scored'` when vision enabled) as the WHERE clause. The status IS the gate — no json_extract needed. Verified 2026-03-18.
 8  
 9  ## Completed Tasks - 2026-03-11
10  
11  - ✅ Created `db/migrations/add-multi-country-support.sql` (migration 022)
12  - ✅ Added country columns to sites table (country_code, google_domain, language_code, currency_code)
13  - ✅ Added country columns to keywords table
14  - ✅ Created `src/config/countries.js` with 25 countries + mobile patterns + GDPR config
15  - ✅ Migration backfills existing data with AU defaults
16  - ✅ `src/scrape.js` accepts countryCode parameter
17  - ✅ ZenRows geo-targeting implemented (premium_proxy + proxy_country)
18  - ✅ Country metadata stored in sites table
19  - ✅ SERP stage uses country-specific targeting
20  - ✅ Keywords table stores country_code per keyword
21  - ✅ `src/proposal-generator-v2.js` has full localization support (lines 312, 348-381)
22  - ✅ Passes country info to LLM (language, currency, spelling, date/phone formats, timezone)
23  - ✅ Supports UK/US spelling variations (optimise vs optimize, colour vs color)
24  - ✅ Currency symbols and cultural context included
25  - ✅ `src/contacts/prioritize.js` uses country-specific phone validation
26  - ✅ `isMobileNumber()` function with regex patterns for all 25 countries
27  - ✅ Prioritizes mobile numbers over landlines for SMS
28  - ✅ Country-specific mobile patterns (US, UK, DE, JP, CN, IN, AU, etc.)
29  - ✅ Created `tests/multi-country.integration.test.js` - all 5 tests passing
30  - ✅ Test country configurations (6 countries: US, UK, DE, JP, AU, FR)
31  - ✅ Test mobile number validation (27 test cases across countries)
32  - ✅ Test contact prioritization (mobile > landline)
33  - ✅ Test database country metadata storage
34  - ✅ Test GDPR country identification (13 GDPR, 12 non-GDPR)
35  
36  # Changelog
37  
38  Completed tasks archived from TODO.md
39  
40  ## Completed Tasks - 2026-02-10
41  
42  - ✅ **Phase 1: Database & Config** (COMPLETED)
43  - ✅ **Phase 2: SERP Scraping** (COMPLETED)
44  - ✅ **Phase 3: Proposal Generation** (COMPLETED)
45  - ✅ **Phase 4: Contact Prioritization** (COMPLETED)
46  - ✅ **Phase 5: Testing & Docs** (COMPLETED)
47  - ✅ X/Twitter and LinkedIn channels fully implemented and integrated
48  - ✅ **Email Open & Click Tracking** (via Resend + Cloudflare Worker)
49    ✅ Poll Cloudflare R2 every 5 minutes via Resend Webhooks API
50    ✅ Expand the Resend webhook handler to process all relevant notifications:
51    ✅ `src/inbound/email.js`:
52    ✅ `src/inbound/processor.js`: Unified inbound processor
53    ✅ Tests created for email and processor modules
54  - ✅ `dashboard/app.py`: Tab-based analytics dashboard
55  - ✅ Auto-refresh functionality with configurable intervals
56  - ✅ Manual refresh button clears cache
57  - ✅ Filters for date ranges, channels, statuses, sentiments
58  - ✅ Run: `npm run dashboard` (http://localhost:8501)
59  - ✅ Python dependencies auto-installed in nix-shell
60  - ✅ All database queries use read-only connections with caching
61  - ✅ Upgrade to Node.js v22.11.0+ to unlock mock.module()
62  - ✅ Change country fallback behavior in `src/config/countries.js`: