diff --git a/app/static/beauty/index.html b/app/static/beauty/index.html index ab481d9..89e760d 100644 --- a/app/static/beauty/index.html +++ b/app/static/beauty/index.html @@ -493,23 +493,29 @@ function app() { if (this.f.alpha_only) p.set('alpha_only', 'true'); if (this.f.no_sld) p.set('no_sld', 'true'); - const hasEnrichFilter = this.f.prescreen_status || this.f.niche || this.f.site_type || this.f.country; + // 'none' (Not checked) = domains never in the pipeline → must search DuckDB. + // Any other enrichment filter (live/dead/parked, niche, site_type, country) + // requires the SQLite enriched_domains table. + const hasEnrichFilter = (this.f.prescreen_status && this.f.prescreen_status !== 'none') + || this.f.niche || this.f.site_type || this.f.country; let endpoint; if (hasEnrichFilter) { - // Enrichment filters require the SQLite table — add them server-side if (this.f.prescreen_status) p.set('prescreen_status', this.f.prescreen_status); if (this.f.niche) p.set('niche', this.f.niche); if (this.f.site_type) p.set('site_type', this.f.site_type); if (this.f.country) p.set('country', this.f.country.trim().toUpperCase()); endpoint = '/api/enriched'; } else { - // Discovery mode: search full 72M DuckDB index (e.g. "Not checked" keyword search) endpoint = '/api/domains'; } const d = await fetch(endpoint + '?' + p).then(r=>r.json()); this.domainsTotal = d.total || 0; - this.domains = d.results || []; + let rows = d.results || []; + // 'Not checked': DuckDB returns all domains joined with enriched data; + // filter client-side to keep only those with no prescreen_status yet. + if (this.f.prescreen_status === 'none') rows = rows.filter(r => !r.prescreen_status); + this.domains = rows; } catch(e) { this.notify('Failed to load: '+e.message, 'error'); } finally { this.loading = false; } },