disclosure-bureau/web/app
Luiz Gustavo 2e59b01f1f
Some checks failed
CI / Web — typecheck + lint + build (push) Failing after 37s
CI / Scripts — Python smoke (push) Failing after 5s
CI / Web — npm audit (push) Failing after 27s
CI / Retrieval — golden set (Recall@5 + MRR) (push) Failing after 5s
fix(i18n): render case files in one language per locale
Case bodies hold EN and PT-BR scenes interleaved (## I. EN, ## I. PT, ...),
but the reader rendered the whole body, so an EN visitor saw every scene
twice — once in English, once in Portuguese — and vice-versa.

Add pickLocaleBody(): split by section-number occurrence (first = EN, second
= PT-BR, the narrator's mandated order), with language sniffing only as a
fallback for unpaired/unnumbered sections, and full-body fallback when a body
can't be split (English-only legacy files). Wire it into the case reader
(body, lead, OG description) and the homepage card openings.

Also fix extractBody: it discarded the English H1 by treating the second
(PT-BR) H1 as "the first real heading". Future narrations keep both titles.

Verified live: d44 and doc-65 render EN-only under locale=en and PT-only
under locale=pt-br. Bulk-checked 89 files: 80 clean, 8 structurally clean
(source-language verbatim quotes retained per spec), 1 English-only legacy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 11:57:46 -03:00
..
admin baseline: Disclosure Bureau pipeline + Next.js UI + Supabase stack 2026-05-17 22:44:36 -03:00
api W4: bilingual EN + PT-BR Investigation Bureau (CLAUDE.md §3 contract) 2026-05-24 12:02:59 -03:00
auth ship: synthesize 158 entities, AG-UI artifacts, chat persistence, auth flow 2026-05-18 03:52:59 -03:00
bureau W5.8: language toggle in the navbar (whole-site PT-BR / EN) 2026-05-24 22:54:37 -03:00
c/[slug] fix(i18n): render case files in one language per locale 2026-05-25 11:57:46 -03:00
d/[docId] W3.10: clickable detective tiles + quick-launch form + doc bureau panel 2026-05-23 23:33:00 -03:00
documents W5.8: language toggle in the navbar (whole-site PT-BR / EN) 2026-05-24 22:54:37 -03:00
e/[cls] W5.5 (Phase 3C): Sun-Tzu strategist feeder + entity hero illustrations 2026-05-24 16:41:20 -03:00
graph W2: rerank opt-in, analyze_image_region tool, RAG eval, graph cleanup, ADRs 2026-05-23 19:20:09 -03:00
h/[hypothesisId] W5.8: language toggle in the navbar (whole-site PT-BR / EN) 2026-05-24 22:54:37 -03:00
jobs/[id] W5.8: language toggle in the navbar (whole-site PT-BR / EN) 2026-05-24 22:54:37 -03:00
locations W5.1: enthusiast pivot — strip detective surfacing, magazine homepage 2026-05-24 14:09:46 -03:00
objects W5.1: enthusiast pivot — strip detective surfacing, magazine homepage 2026-05-24 14:09:46 -03:00
operations W5.1: enthusiast pivot — strip detective surfacing, magazine homepage 2026-05-24 14:09:46 -03:00
search baseline: Disclosure Bureau pipeline + Next.js UI + Supabase stack 2026-05-17 22:44:36 -03:00
sightings W5.1: enthusiast pivot — strip detective surfacing, magazine homepage 2026-05-24 14:09:46 -03:00
timeline baseline: Disclosure Bureau pipeline + Next.js UI + Supabase stack 2026-05-17 22:44:36 -03:00
witnesses W5.1: enthusiast pivot — strip detective surfacing, magazine homepage 2026-05-24 14:09:46 -03:00
globals.css W5.7 (Phase 3E): perf + a11y + OG images 2026-05-24 16:55:35 -03:00
layout.tsx W5.7 (Phase 3E): perf + a11y + OG images 2026-05-24 16:55:35 -03:00
page.tsx W5.7 (Phase 3E): perf + a11y + OG images 2026-05-24 16:55:35 -03:00
robots.ts W5.4 (Phase 3B): sitemap + robots + Article schema + magazine reading view 2026-05-24 16:09:50 -03:00
sitemap.ts W5.4 followup: hero illustration on /c/[slug] + sitemap fix 2026-05-24 16:16:20 -03:00