- site_analyzer: scan onclick/data-href/data-url/data-link/data-action attrs
on ALL tags for WhatsApp (wa.me, api.whatsapp, web.whatsapp, wa.link),
tel: links, and social media URLs; raise dedup cap 5→8
- beauty_ai: rewrite lead quality rules — WARM for any genuine multi-brand
retailer even with zero portfolio matches; portfolio absence NEVER justifies
COLD alone; added country_fiscal fallback to ip_country
- index.html: assessPopup overlay modal on quality badge click in Browse tab;
showAssessPopup() parses beauty_assessment JSON with all_contacts fallback;
[x-cloak] CSS to prevent flash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
beauty_ai.py:
- Add _scrape_legal_pages(): fetches /aviso-legal, /politica-de-privacidad,
/privacidad, /quienes-somos, /legal in parallel — Spanish aviso legal pages
legally contain razón social, CIF/NIF, address and a contact email; legal
snippet passed to AI so it can identify the registered company name
- Rewrite _build_beauty_prompt(): full technical profile (SSL, analytics, CMS,
load time, word count, GDPR, mobile), all contact channels merged from both
site_analyzer and legal pages, updated assessment rules with clearer HOT/WARM
criteria, 700-char search results, richer portfolio portfolio context
- New JSON schema fields: summary (executive description), pitch_angle (one
Spanish hook sentence), all_contacts dict (emails/phones/whatsapp/social
full lists), best_contact_channel, best_contact_value, partnership_signals,
revenue_estimate; outreach_email is now a complete ready-to-send email
- max_output_tokens raised from 2000 → 4000
- Contact merge: all_contacts populated from both site_analyzer and legal pages;
top-level contact_* fields filled from merged data as fallback
- Run DDG search and legal page scraping in parallel (no extra wall-clock cost)
index.html (Pipeline):
- Business Summary panel with pitch_angle as accent subtitle
- Full all_contacts display: all emails (mailto links), all phones, all
WhatsApp (green links), all social profiles (shortened display)
- partnership_signals chips alongside brand detection
- outreach_notes shown in amber at bottom of contact panel
- best_contact_channel chip in contact header
- Table contact column now shows best_contact_value if available
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- loadDomains(): add generation counter so stale auto-advance fetches
cannot overwrite a newer user-triggered search result; snapshot filter
state before the first await so URL reflects what was requested; add
HTTP status check so backend errors surface as toasts rather than
silent empty results; auto-advance now calls loadDomains() without
await so the counter increments correctly per page advance
- beauty_ai: word-boundary regex for short brands (≤5 chars) to stop
'ref' matching 'reference'/'refresh'/'prefer' etc.; merge phones,
whatsapp and social_links from site_analyzer directly into result
(more reliable than AI extraction); add contact_whatsapp and
contact_social fields to AI JSON schema
- db: add requeue_beauty() for re-assessing already-assessed domains
- beauty_main: /api/beauty/reassess/batch endpoint using requeue_beauty
- index.html: Re-assess Selected bulk button, per-row ↺ button in
Browse and Pipeline, WhatsApp + social links in Pipeline contact panel
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>