disclosure-bureau/web/components/entity-list-page.tsx

234 lines
9.8 KiB
TypeScript
Raw Normal View History

W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
/**
* EntityListPage shared shell used by /sightings, /witnesses, /objects,
* /locations, /operations.
*
* Pulls entities of a given class, sorted by total_mentions, paginated.
* Renders a magazine-style index page with a hero header + searchable
* card grid. No detective branding.
*/
import Link from "next/link";
import { pgQuery } from "@/lib/retrieval/db";
import { SiteHeader } from "@/components/site-header";
import { BureauNav } from "@/components/bureau-nav";
import { getLocale } from "@/components/locale-toggle";
interface EntityRow {
entity_class: string;
entity_id: string;
canonical_name: string;
aliases: string[] | null;
total_mentions: number;
documents_count: number;
W5.3 (Phase 3A): entity summaries — sub-pages get magazine-grade prose Today /sightings, /witnesses, /objects, /locations and /operations show a name + mention count and nothing else. After this each row carries a 60-100 word bilingual narrative summary written from the chunks where the entity actually appears. Migration 0008 (apply as supabase_admin): public.entities +summary_en TEXT +summary_pt_br TEXT +summary_generated_at TIMESTAMPTZ +summary_model TEXT +summary_status TEXT CHECK ('pending'|'ai_generated'|'curated'|'refused') + index on summary_status + GRANT UPDATE (summary_*) ON entities TO investigator + new policy entities_investigator_update_summary (RLS UPDATE for investigator role) Enrichment script (investigator-runtime/scripts/enrich_entity_summaries.ts): - Per-class config (chunk_k, min_mentions, max_per_class) - Path A: entity_mentions JOIN chunks (high-precision linker) - Path B (fallback): hybridSearch on canonical_name + aliases when entity_mentions returns zero. This is what unlocked Kenneth Arnold and similar entities — their wiki YAML has high total_mentions counted from frontmatter mentioned_in[], but the entity_mentions extractor was silent because the matches came from the wiki text, not the OCR chunks. - Sonnet 4.6 via OAuth Max, ~$0.04 per entity, ~$10 for the full 260-entity bulk run. - INSUFFICIENT skip when chunks can't sustain a 60-word summary — refused entries get summary_status='refused' so they're not retried. UI uplift: - lib/retrieval/entity-pages.ts: getEntityCore now prefers the DB summary (ai_generated or curated) over wiki YAML narrative. - components/entity-list-page.tsx: * SELECT now pulls summary_en, summary_pt_br, summary_status * Sorted with summary-enriched rows first (so the magazine grid lands on quality content immediately) * MagazineGrid: 4-line summary preview replaces aliases line * CompactGrid: enriched rows render as full editorial cards, bare rows fall back to a compact table below Smoke results: - Kenneth Arnold sighting: "On June 24, 1947, pilot Kenneth Arnold reported sighting unidentified objects over the Pacific Northwest, and the account spread worldwide. It set off a run of similar reports: County Commissioner Crankes saw comparable objects after Arnold's account reached the press, and United Airlines pilot Emil H. Smith spotted flying discs on July 4 during a routine flight out of Boise, Idaho..." - Roswell Incident: includes Colonel Corso's 1997 book + the 1995 GAO finding that radio messages from Oct 46–Feb 47 were destroyed + Senator Strom Thurmond's foreword. Real magazine-grade content. Background bulk run kicked off across all 5 classes (event, uap_object, person, location, organization) — populating live as the homepage rebuilds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:37:01 +00:00
summary_en: string | null;
summary_pt_br: string | null;
summary_status: string | null;
W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
}
export interface EntityListPageProps {
entityClass: "event" | "person" | "uap_object" | "location" | "organization";
/** URL folder under /e/ — kebab-case plural. */
folder: "events" | "people" | "uap-objects" | "locations" | "organizations";
title_en: string;
title_pt: string;
subtitle_en: string;
subtitle_pt: string;
/** Minimum total_mentions to surface — filters out doc-scoped noise. */
min_mentions?: number;
/** Card variant. "magazine" = larger cards with year/icon; "compact" = tabular list. */
variant?: "magazine" | "compact";
}
function parseEventId(id: string): { year: number | null } {
const m = id.match(/^EV-(\d{4})-/i);
return { year: m ? parseInt(m[1], 10) : null };
}
export async function EntityListPage(props: EntityListPageProps) {
const locale = (await getLocale()) === "en" ? "en" : "pt-br";
const rows = await pgQuery<EntityRow>(
`SELECT entity_class, entity_id, canonical_name, aliases,
W5.3 (Phase 3A): entity summaries — sub-pages get magazine-grade prose Today /sightings, /witnesses, /objects, /locations and /operations show a name + mention count and nothing else. After this each row carries a 60-100 word bilingual narrative summary written from the chunks where the entity actually appears. Migration 0008 (apply as supabase_admin): public.entities +summary_en TEXT +summary_pt_br TEXT +summary_generated_at TIMESTAMPTZ +summary_model TEXT +summary_status TEXT CHECK ('pending'|'ai_generated'|'curated'|'refused') + index on summary_status + GRANT UPDATE (summary_*) ON entities TO investigator + new policy entities_investigator_update_summary (RLS UPDATE for investigator role) Enrichment script (investigator-runtime/scripts/enrich_entity_summaries.ts): - Per-class config (chunk_k, min_mentions, max_per_class) - Path A: entity_mentions JOIN chunks (high-precision linker) - Path B (fallback): hybridSearch on canonical_name + aliases when entity_mentions returns zero. This is what unlocked Kenneth Arnold and similar entities — their wiki YAML has high total_mentions counted from frontmatter mentioned_in[], but the entity_mentions extractor was silent because the matches came from the wiki text, not the OCR chunks. - Sonnet 4.6 via OAuth Max, ~$0.04 per entity, ~$10 for the full 260-entity bulk run. - INSUFFICIENT skip when chunks can't sustain a 60-word summary — refused entries get summary_status='refused' so they're not retried. UI uplift: - lib/retrieval/entity-pages.ts: getEntityCore now prefers the DB summary (ai_generated or curated) over wiki YAML narrative. - components/entity-list-page.tsx: * SELECT now pulls summary_en, summary_pt_br, summary_status * Sorted with summary-enriched rows first (so the magazine grid lands on quality content immediately) * MagazineGrid: 4-line summary preview replaces aliases line * CompactGrid: enriched rows render as full editorial cards, bare rows fall back to a compact table below Smoke results: - Kenneth Arnold sighting: "On June 24, 1947, pilot Kenneth Arnold reported sighting unidentified objects over the Pacific Northwest, and the account spread worldwide. It set off a run of similar reports: County Commissioner Crankes saw comparable objects after Arnold's account reached the press, and United Airlines pilot Emil H. Smith spotted flying discs on July 4 during a routine flight out of Boise, Idaho..." - Roswell Incident: includes Colonel Corso's 1997 book + the 1995 GAO finding that radio messages from Oct 46–Feb 47 were destroyed + Senator Strom Thurmond's foreword. Real magazine-grade content. Background bulk run kicked off across all 5 classes (event, uap_object, person, location, organization) — populating live as the homepage rebuilds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:37:01 +00:00
total_mentions, documents_count,
summary_en, summary_pt_br, summary_status
W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
FROM public.entities
WHERE entity_class = $1
AND total_mentions >= $2
AND canonical_name !~ '^(unspecified|unknown|n/a|—|UNKNOWN)$'
W5.3 (Phase 3A): entity summaries — sub-pages get magazine-grade prose Today /sightings, /witnesses, /objects, /locations and /operations show a name + mention count and nothing else. After this each row carries a 60-100 word bilingual narrative summary written from the chunks where the entity actually appears. Migration 0008 (apply as supabase_admin): public.entities +summary_en TEXT +summary_pt_br TEXT +summary_generated_at TIMESTAMPTZ +summary_model TEXT +summary_status TEXT CHECK ('pending'|'ai_generated'|'curated'|'refused') + index on summary_status + GRANT UPDATE (summary_*) ON entities TO investigator + new policy entities_investigator_update_summary (RLS UPDATE for investigator role) Enrichment script (investigator-runtime/scripts/enrich_entity_summaries.ts): - Per-class config (chunk_k, min_mentions, max_per_class) - Path A: entity_mentions JOIN chunks (high-precision linker) - Path B (fallback): hybridSearch on canonical_name + aliases when entity_mentions returns zero. This is what unlocked Kenneth Arnold and similar entities — their wiki YAML has high total_mentions counted from frontmatter mentioned_in[], but the entity_mentions extractor was silent because the matches came from the wiki text, not the OCR chunks. - Sonnet 4.6 via OAuth Max, ~$0.04 per entity, ~$10 for the full 260-entity bulk run. - INSUFFICIENT skip when chunks can't sustain a 60-word summary — refused entries get summary_status='refused' so they're not retried. UI uplift: - lib/retrieval/entity-pages.ts: getEntityCore now prefers the DB summary (ai_generated or curated) over wiki YAML narrative. - components/entity-list-page.tsx: * SELECT now pulls summary_en, summary_pt_br, summary_status * Sorted with summary-enriched rows first (so the magazine grid lands on quality content immediately) * MagazineGrid: 4-line summary preview replaces aliases line * CompactGrid: enriched rows render as full editorial cards, bare rows fall back to a compact table below Smoke results: - Kenneth Arnold sighting: "On June 24, 1947, pilot Kenneth Arnold reported sighting unidentified objects over the Pacific Northwest, and the account spread worldwide. It set off a run of similar reports: County Commissioner Crankes saw comparable objects after Arnold's account reached the press, and United Airlines pilot Emil H. Smith spotted flying discs on July 4 during a routine flight out of Boise, Idaho..." - Roswell Incident: includes Colonel Corso's 1997 book + the 1995 GAO finding that radio messages from Oct 46–Feb 47 were destroyed + Senator Strom Thurmond's foreword. Real magazine-grade content. Background bulk run kicked off across all 5 classes (event, uap_object, person, location, organization) — populating live as the homepage rebuilds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:37:01 +00:00
ORDER BY (summary_status = 'ai_generated' OR summary_status = 'curated') DESC,
total_mentions DESC, canonical_name ASC
W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
LIMIT 200`,
[props.entityClass, props.min_mentions ?? 1],
).catch(() => [] as EntityRow[]);
const title = locale === "en" ? props.title_en : props.title_pt;
const subtitle = locale === "en" ? props.subtitle_en : props.subtitle_pt;
const variant = props.variant ?? "magazine";
return (
<div className="min-h-screen">
<SiteHeader locale={locale} />
<BureauNav crumbs={[{ label: title.toLowerCase() }]} />
<div className="mx-auto max-w-7xl px-4 md:px-8 py-10 md:py-14">
<header className="mb-10 md:mb-14">
<div className="text-[10px] font-mono uppercase tracking-[0.18em] text-[#5a6678] mb-3">
{locale === "en" ? "// The archive" : "// O arquivo"}
</div>
<h1 className="font-display text-4xl md:text-6xl font-semibold text-[#e7ecf3] leading-tight mb-3">
{title}
</h1>
<p className="text-lg text-[#9aa6b8] max-w-2xl">{subtitle}</p>
<p className="text-[11px] font-mono text-[#5a6678] mt-3">
{rows.length} {locale === "en" ? "entries" : "entradas"}
</p>
</header>
{rows.length === 0 ? (
<div className="rounded-lg border border-dashed border-[rgba(224,192,128,0.18)] bg-[#0d1220] p-8 text-center">
<p className="text-[12px] font-mono text-[#9aa6b8]">
{locale === "en" ? "No entries yet — the corpus is still being indexed." : "Sem entradas ainda — o corpus está sendo indexado."}
</p>
</div>
) : variant === "magazine" ? (
<MagazineGrid rows={rows} folder={props.folder} entityClass={props.entityClass} locale={locale} />
) : (
<CompactGrid rows={rows} folder={props.folder} locale={locale} />
)}
</div>
{/* JSON-LD ItemList for GEO */}
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify({
"@context": "https://schema.org",
"@type": "CollectionPage",
name: title,
description: subtitle,
numberOfItems: rows.length,
mainEntity: {
"@type": "ItemList",
itemListElement: rows.slice(0, 50).map((r, i) => ({
"@type": "ListItem",
position: i + 1,
name: r.canonical_name,
url: `${process.env.NEXT_PUBLIC_SITE_URL ?? "https://disclosure.top"}/e/${props.folder}/${r.entity_id}`,
})),
},
}) }}
/>
</div>
);
}
function MagazineGrid({
rows, folder, entityClass, locale,
}: { rows: EntityRow[]; folder: string; entityClass: string; locale: "pt-br" | "en" }) {
return (
<div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-4">
{rows.map((r, i) => {
const year = entityClass === "event" ? parseEventId(r.entity_id).year : null;
W5.3 (Phase 3A): entity summaries — sub-pages get magazine-grade prose Today /sightings, /witnesses, /objects, /locations and /operations show a name + mention count and nothing else. After this each row carries a 60-100 word bilingual narrative summary written from the chunks where the entity actually appears. Migration 0008 (apply as supabase_admin): public.entities +summary_en TEXT +summary_pt_br TEXT +summary_generated_at TIMESTAMPTZ +summary_model TEXT +summary_status TEXT CHECK ('pending'|'ai_generated'|'curated'|'refused') + index on summary_status + GRANT UPDATE (summary_*) ON entities TO investigator + new policy entities_investigator_update_summary (RLS UPDATE for investigator role) Enrichment script (investigator-runtime/scripts/enrich_entity_summaries.ts): - Per-class config (chunk_k, min_mentions, max_per_class) - Path A: entity_mentions JOIN chunks (high-precision linker) - Path B (fallback): hybridSearch on canonical_name + aliases when entity_mentions returns zero. This is what unlocked Kenneth Arnold and similar entities — their wiki YAML has high total_mentions counted from frontmatter mentioned_in[], but the entity_mentions extractor was silent because the matches came from the wiki text, not the OCR chunks. - Sonnet 4.6 via OAuth Max, ~$0.04 per entity, ~$10 for the full 260-entity bulk run. - INSUFFICIENT skip when chunks can't sustain a 60-word summary — refused entries get summary_status='refused' so they're not retried. UI uplift: - lib/retrieval/entity-pages.ts: getEntityCore now prefers the DB summary (ai_generated or curated) over wiki YAML narrative. - components/entity-list-page.tsx: * SELECT now pulls summary_en, summary_pt_br, summary_status * Sorted with summary-enriched rows first (so the magazine grid lands on quality content immediately) * MagazineGrid: 4-line summary preview replaces aliases line * CompactGrid: enriched rows render as full editorial cards, bare rows fall back to a compact table below Smoke results: - Kenneth Arnold sighting: "On June 24, 1947, pilot Kenneth Arnold reported sighting unidentified objects over the Pacific Northwest, and the account spread worldwide. It set off a run of similar reports: County Commissioner Crankes saw comparable objects after Arnold's account reached the press, and United Airlines pilot Emil H. Smith spotted flying discs on July 4 during a routine flight out of Boise, Idaho..." - Roswell Incident: includes Colonel Corso's 1997 book + the 1995 GAO finding that radio messages from Oct 46–Feb 47 were destroyed + Senator Strom Thurmond's foreword. Real magazine-grade content. Background bulk run kicked off across all 5 classes (event, uap_object, person, location, organization) — populating live as the homepage rebuilds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:37:01 +00:00
const summary = locale === "pt-br" ? (r.summary_pt_br ?? r.summary_en) : (r.summary_en ?? r.summary_pt_br);
W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
return (
<Link
key={r.entity_id}
href={`/e/${folder}/${r.entity_id}`}
className="group block rounded-xl border border-[rgba(127,219,255,0.15)] bg-[#0d1220] p-5 hover:border-[#7fdbff]/50 hover:bg-[#10162a] transition-all"
>
<div className="flex items-baseline justify-between mb-2">
<span className="font-mono text-[10px] tracking-[0.14em] uppercase text-[#7fdbff]/70">
{year ?? `#${(i + 1).toString().padStart(3, "0")}`}
</span>
<span className="font-mono text-[10px] text-[#5a6678] tabular-nums">
{r.total_mentions.toLocaleString("pt-BR")} {locale === "en" ? "mentions" : "menções"}
</span>
</div>
<h3 className="font-display text-lg md:text-xl text-[#e7ecf3] group-hover:text-[#7fdbff] transition-colors leading-snug">
{r.canonical_name}
</h3>
W5.3 (Phase 3A): entity summaries — sub-pages get magazine-grade prose Today /sightings, /witnesses, /objects, /locations and /operations show a name + mention count and nothing else. After this each row carries a 60-100 word bilingual narrative summary written from the chunks where the entity actually appears. Migration 0008 (apply as supabase_admin): public.entities +summary_en TEXT +summary_pt_br TEXT +summary_generated_at TIMESTAMPTZ +summary_model TEXT +summary_status TEXT CHECK ('pending'|'ai_generated'|'curated'|'refused') + index on summary_status + GRANT UPDATE (summary_*) ON entities TO investigator + new policy entities_investigator_update_summary (RLS UPDATE for investigator role) Enrichment script (investigator-runtime/scripts/enrich_entity_summaries.ts): - Per-class config (chunk_k, min_mentions, max_per_class) - Path A: entity_mentions JOIN chunks (high-precision linker) - Path B (fallback): hybridSearch on canonical_name + aliases when entity_mentions returns zero. This is what unlocked Kenneth Arnold and similar entities — their wiki YAML has high total_mentions counted from frontmatter mentioned_in[], but the entity_mentions extractor was silent because the matches came from the wiki text, not the OCR chunks. - Sonnet 4.6 via OAuth Max, ~$0.04 per entity, ~$10 for the full 260-entity bulk run. - INSUFFICIENT skip when chunks can't sustain a 60-word summary — refused entries get summary_status='refused' so they're not retried. UI uplift: - lib/retrieval/entity-pages.ts: getEntityCore now prefers the DB summary (ai_generated or curated) over wiki YAML narrative. - components/entity-list-page.tsx: * SELECT now pulls summary_en, summary_pt_br, summary_status * Sorted with summary-enriched rows first (so the magazine grid lands on quality content immediately) * MagazineGrid: 4-line summary preview replaces aliases line * CompactGrid: enriched rows render as full editorial cards, bare rows fall back to a compact table below Smoke results: - Kenneth Arnold sighting: "On June 24, 1947, pilot Kenneth Arnold reported sighting unidentified objects over the Pacific Northwest, and the account spread worldwide. It set off a run of similar reports: County Commissioner Crankes saw comparable objects after Arnold's account reached the press, and United Airlines pilot Emil H. Smith spotted flying discs on July 4 during a routine flight out of Boise, Idaho..." - Roswell Incident: includes Colonel Corso's 1997 book + the 1995 GAO finding that radio messages from Oct 46–Feb 47 were destroyed + Senator Strom Thurmond's foreword. Real magazine-grade content. Background bulk run kicked off across all 5 classes (event, uap_object, person, location, organization) — populating live as the homepage rebuilds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:37:01 +00:00
{summary ? (
<p className="mt-3 text-[13px] text-[#cbd2dd] leading-relaxed line-clamp-4">
{summary}
</p>
) : r.aliases && r.aliases.length > 0 ? (
W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
<div className="mt-2 text-[11px] text-[#5a6678] line-clamp-1">
{r.aliases.slice(0, 3).join(" · ")}
</div>
W5.3 (Phase 3A): entity summaries — sub-pages get magazine-grade prose Today /sightings, /witnesses, /objects, /locations and /operations show a name + mention count and nothing else. After this each row carries a 60-100 word bilingual narrative summary written from the chunks where the entity actually appears. Migration 0008 (apply as supabase_admin): public.entities +summary_en TEXT +summary_pt_br TEXT +summary_generated_at TIMESTAMPTZ +summary_model TEXT +summary_status TEXT CHECK ('pending'|'ai_generated'|'curated'|'refused') + index on summary_status + GRANT UPDATE (summary_*) ON entities TO investigator + new policy entities_investigator_update_summary (RLS UPDATE for investigator role) Enrichment script (investigator-runtime/scripts/enrich_entity_summaries.ts): - Per-class config (chunk_k, min_mentions, max_per_class) - Path A: entity_mentions JOIN chunks (high-precision linker) - Path B (fallback): hybridSearch on canonical_name + aliases when entity_mentions returns zero. This is what unlocked Kenneth Arnold and similar entities — their wiki YAML has high total_mentions counted from frontmatter mentioned_in[], but the entity_mentions extractor was silent because the matches came from the wiki text, not the OCR chunks. - Sonnet 4.6 via OAuth Max, ~$0.04 per entity, ~$10 for the full 260-entity bulk run. - INSUFFICIENT skip when chunks can't sustain a 60-word summary — refused entries get summary_status='refused' so they're not retried. UI uplift: - lib/retrieval/entity-pages.ts: getEntityCore now prefers the DB summary (ai_generated or curated) over wiki YAML narrative. - components/entity-list-page.tsx: * SELECT now pulls summary_en, summary_pt_br, summary_status * Sorted with summary-enriched rows first (so the magazine grid lands on quality content immediately) * MagazineGrid: 4-line summary preview replaces aliases line * CompactGrid: enriched rows render as full editorial cards, bare rows fall back to a compact table below Smoke results: - Kenneth Arnold sighting: "On June 24, 1947, pilot Kenneth Arnold reported sighting unidentified objects over the Pacific Northwest, and the account spread worldwide. It set off a run of similar reports: County Commissioner Crankes saw comparable objects after Arnold's account reached the press, and United Airlines pilot Emil H. Smith spotted flying discs on July 4 during a routine flight out of Boise, Idaho..." - Roswell Incident: includes Colonel Corso's 1997 book + the 1995 GAO finding that radio messages from Oct 46–Feb 47 were destroyed + Senator Strom Thurmond's foreword. Real magazine-grade content. Background bulk run kicked off across all 5 classes (event, uap_object, person, location, organization) — populating live as the homepage rebuilds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:37:01 +00:00
) : null}
W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
</Link>
);
})}
</div>
);
}
function CompactGrid({
rows, folder, locale,
}: { rows: EntityRow[]; folder: string; locale: "pt-br" | "en" }) {
W5.3 (Phase 3A): entity summaries — sub-pages get magazine-grade prose Today /sightings, /witnesses, /objects, /locations and /operations show a name + mention count and nothing else. After this each row carries a 60-100 word bilingual narrative summary written from the chunks where the entity actually appears. Migration 0008 (apply as supabase_admin): public.entities +summary_en TEXT +summary_pt_br TEXT +summary_generated_at TIMESTAMPTZ +summary_model TEXT +summary_status TEXT CHECK ('pending'|'ai_generated'|'curated'|'refused') + index on summary_status + GRANT UPDATE (summary_*) ON entities TO investigator + new policy entities_investigator_update_summary (RLS UPDATE for investigator role) Enrichment script (investigator-runtime/scripts/enrich_entity_summaries.ts): - Per-class config (chunk_k, min_mentions, max_per_class) - Path A: entity_mentions JOIN chunks (high-precision linker) - Path B (fallback): hybridSearch on canonical_name + aliases when entity_mentions returns zero. This is what unlocked Kenneth Arnold and similar entities — their wiki YAML has high total_mentions counted from frontmatter mentioned_in[], but the entity_mentions extractor was silent because the matches came from the wiki text, not the OCR chunks. - Sonnet 4.6 via OAuth Max, ~$0.04 per entity, ~$10 for the full 260-entity bulk run. - INSUFFICIENT skip when chunks can't sustain a 60-word summary — refused entries get summary_status='refused' so they're not retried. UI uplift: - lib/retrieval/entity-pages.ts: getEntityCore now prefers the DB summary (ai_generated or curated) over wiki YAML narrative. - components/entity-list-page.tsx: * SELECT now pulls summary_en, summary_pt_br, summary_status * Sorted with summary-enriched rows first (so the magazine grid lands on quality content immediately) * MagazineGrid: 4-line summary preview replaces aliases line * CompactGrid: enriched rows render as full editorial cards, bare rows fall back to a compact table below Smoke results: - Kenneth Arnold sighting: "On June 24, 1947, pilot Kenneth Arnold reported sighting unidentified objects over the Pacific Northwest, and the account spread worldwide. It set off a run of similar reports: County Commissioner Crankes saw comparable objects after Arnold's account reached the press, and United Airlines pilot Emil H. Smith spotted flying discs on July 4 during a routine flight out of Boise, Idaho..." - Roswell Incident: includes Colonel Corso's 1997 book + the 1995 GAO finding that radio messages from Oct 46–Feb 47 were destroyed + Senator Strom Thurmond's foreword. Real magazine-grade content. Background bulk run kicked off across all 5 classes (event, uap_object, person, location, organization) — populating live as the homepage rebuilds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:37:01 +00:00
// Split rows: with-summary appear as larger editorial cards, no-summary
// fall back to a compact table below.
const enriched = rows.filter((r) => (r.summary_en ?? r.summary_pt_br) != null);
const bare = rows.filter((r) => (r.summary_en ?? r.summary_pt_br) == null);
W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
return (
W5.3 (Phase 3A): entity summaries — sub-pages get magazine-grade prose Today /sightings, /witnesses, /objects, /locations and /operations show a name + mention count and nothing else. After this each row carries a 60-100 word bilingual narrative summary written from the chunks where the entity actually appears. Migration 0008 (apply as supabase_admin): public.entities +summary_en TEXT +summary_pt_br TEXT +summary_generated_at TIMESTAMPTZ +summary_model TEXT +summary_status TEXT CHECK ('pending'|'ai_generated'|'curated'|'refused') + index on summary_status + GRANT UPDATE (summary_*) ON entities TO investigator + new policy entities_investigator_update_summary (RLS UPDATE for investigator role) Enrichment script (investigator-runtime/scripts/enrich_entity_summaries.ts): - Per-class config (chunk_k, min_mentions, max_per_class) - Path A: entity_mentions JOIN chunks (high-precision linker) - Path B (fallback): hybridSearch on canonical_name + aliases when entity_mentions returns zero. This is what unlocked Kenneth Arnold and similar entities — their wiki YAML has high total_mentions counted from frontmatter mentioned_in[], but the entity_mentions extractor was silent because the matches came from the wiki text, not the OCR chunks. - Sonnet 4.6 via OAuth Max, ~$0.04 per entity, ~$10 for the full 260-entity bulk run. - INSUFFICIENT skip when chunks can't sustain a 60-word summary — refused entries get summary_status='refused' so they're not retried. UI uplift: - lib/retrieval/entity-pages.ts: getEntityCore now prefers the DB summary (ai_generated or curated) over wiki YAML narrative. - components/entity-list-page.tsx: * SELECT now pulls summary_en, summary_pt_br, summary_status * Sorted with summary-enriched rows first (so the magazine grid lands on quality content immediately) * MagazineGrid: 4-line summary preview replaces aliases line * CompactGrid: enriched rows render as full editorial cards, bare rows fall back to a compact table below Smoke results: - Kenneth Arnold sighting: "On June 24, 1947, pilot Kenneth Arnold reported sighting unidentified objects over the Pacific Northwest, and the account spread worldwide. It set off a run of similar reports: County Commissioner Crankes saw comparable objects after Arnold's account reached the press, and United Airlines pilot Emil H. Smith spotted flying discs on July 4 during a routine flight out of Boise, Idaho..." - Roswell Incident: includes Colonel Corso's 1997 book + the 1995 GAO finding that radio messages from Oct 46–Feb 47 were destroyed + Senator Strom Thurmond's foreword. Real magazine-grade content. Background bulk run kicked off across all 5 classes (event, uap_object, person, location, organization) — populating live as the homepage rebuilds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:37:01 +00:00
<>
{enriched.length > 0 && (
<div className="grid sm:grid-cols-2 gap-3 md:gap-4 mb-8">
{enriched.map((r) => {
const summary = locale === "pt-br" ? (r.summary_pt_br ?? r.summary_en) : (r.summary_en ?? r.summary_pt_br);
return (
<Link
key={r.entity_id}
href={`/e/${folder}/${r.entity_id}`}
className="group block rounded-xl border border-[rgba(127,219,255,0.15)] bg-[#0d1220] p-5 hover:border-[#7fdbff]/50 hover:bg-[#10162a] transition-all"
>
<div className="flex items-baseline justify-between mb-2">
<h3 className="font-display text-lg text-[#e7ecf3] group-hover:text-[#7fdbff] transition-colors leading-snug">
{r.canonical_name}
</h3>
<span className="font-mono text-[10px] text-[#5a6678] tabular-nums ml-2 shrink-0">
{r.total_mentions.toLocaleString("pt-BR")}
</span>
</div>
<p className="text-[13px] text-[#cbd2dd] leading-relaxed line-clamp-4">
{summary}
</p>
</Link>
);
})}
</div>
)}
{bare.length > 0 && (
<div className="rounded-xl border border-[rgba(127,219,255,0.10)] bg-[#0d1220] overflow-hidden">
{enriched.length > 0 && (
<div className="px-4 py-2 text-[10px] font-mono uppercase tracking-wider text-[#5a6678] border-b border-[rgba(127,219,255,0.10)]">
{locale === "en" ? "// more entries" : "// outras entradas"}
</div>
)}
<table className="w-full text-[13px]">
<thead className="text-[10px] font-mono uppercase tracking-wider text-[#5a6678] border-b border-[rgba(127,219,255,0.10)]">
<tr>
<th className="text-left px-4 py-3">{locale === "en" ? "name" : "nome"}</th>
<th className="text-right px-4 py-3">{locale === "en" ? "mentions" : "menções"}</th>
<th className="text-right px-4 py-3 hidden sm:table-cell">{locale === "en" ? "documents" : "docs"}</th>
</tr>
</thead>
<tbody>
{bare.map((r) => (
<tr key={r.entity_id} className="border-t border-[rgba(127,219,255,0.05)] hover:bg-[rgba(127,219,255,0.03)]">
<td className="px-4 py-2">
<Link href={`/e/${folder}/${r.entity_id}`} className="text-[#e7ecf3] hover:text-[#7fdbff]">
{r.canonical_name}
</Link>
</td>
<td className="px-4 py-2 text-right font-mono text-[#9aa6b8] tabular-nums">{r.total_mentions.toLocaleString("pt-BR")}</td>
<td className="px-4 py-2 text-right font-mono text-[#5a6678] tabular-nums hidden sm:table-cell">{r.documents_count}</td>
</tr>
))}
</tbody>
</table>
</div>
)}
</>
W5.1: enthusiast pivot — strip detective surfacing, magazine homepage User explicit: "1 bilhão de entusiastas pelo mundo ovni" — site is for the UFO-curious public, not for skeptics. The 8-detective scaffolding becomes invisible plumbing; the reader sees stories about what was observed. Reader-facing changes: New homepage (web/app/page.tsx) - SiteHeader: magazine-style top nav (no detective tiles) - HeroBanner: full-bleed editorial opener with declassified-page art background, display-serif headline, live stats row (122 docs, 2047 events, 1861 witnesses, 867 craft catalogued) - FeaturedCase: cover-story treatment of the most recent case_report, uses a real document page as hero image, links to /c/[slug] - PortalGrid: 6 thematic doorways into the archive — Sightings, Witnesses, Craft, Hot spots, Programs, Documents — each tile shows a real entity count and short editorial blurb - GreatestHits: top 9 most-cited events from the corpus (Kenneth Arnold 1947, Mantell 1948, …) as a magazine grid - Doc list kept but reframed as "the primary record" New sub-pages (5) - /sightings → events (2047), magazine grid - /witnesses → people (1861), compact table - /objects → uap_objects (867), magazine grid - /locations → locations (1757), compact table - /operations → organizations (1596), compact table - /documents → full doc list with thumbnails (mirrors homepage section for direct deep-link) All share <EntityListPage> shell with per-page i18n + JSON-LD ItemList Stripped detective surfacing - /jobs/[id]: "Sherlock Holmes / Dr. Watson" → "Investigation in progress" - chat-bubble: detective-named card → neutral "Investigação em andamento" - quick-launch: 7-kind detective dropdown → single "investigar um caso" input (kind=case_report hardcoded) - /bureau: rewritten as the case-file library (no artefact dumps) Typography + design - Fraunces variable serif loaded for display headings (`.font-display` class) - Gold-amber accent (#e0c080) unified as the brand colour - Asymmetric magazine grids (1+2+3 column, generous whitespace) - Hover micro-interactions (image scale on featured case, translateX on portal arrows) SEO + GEO - layout.tsx metadataBase + title.template + per-route Metadata exports - Organization JSON-LD on root layout - WebSite + SearchAction JSON-LD on homepage - CollectionPage + ItemList JSON-LD on every entity list page - openGraph + twitter cards, pt-BR primary + en-US alternate - ai:purpose meta tag for Generative Engine Optimization — declares the site as a citation-linked primary-source archive - robots: index + follow with large image preview The detectives themselves remain alive in the backend (runtime, DB, audit log), but the reader never sees "Holmes / Sun-Tzu / Watson" in the UI. The next phase will reorient case-writer to write as a single best-seller voice synthesising all the internal sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:09:46 +00:00
);
}