2026-05-18 01:44:36 +00:00
/ * *
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
* / s e a r c h ? q = . . . & t y p e = . . . & d o c _ i d = . . . — b o o k m a r k a b l e h y b r i d s e a r c h .
2026-05-18 01:44:36 +00:00
*
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
* Magazine - style page : same global SiteHeader as the rest of the site , an
* editorial hero that says in plain language what this page is , and a
* SearchPanel below . No tech jargon ( "BM25" , "BGE-M3" , "rerank" ) visible to
* the reader — that detail is for engineers , not enthusiasts .
2026-05-18 01:44:36 +00:00
* /
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
import type { Metadata } from "next" ;
2026-05-18 01:44:36 +00:00
import { SearchPanel } from "@/components/search-panel" ;
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
import { SiteHeader } from "@/components/site-header" ;
import { getLocale } from "@/components/locale-toggle" ;
2026-05-18 01:44:36 +00:00
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
export const runtime = "nodejs" ;
2026-05-18 01:44:36 +00:00
export const dynamic = "force-dynamic" ;
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
const SITE_URL = process . env . NEXT_PUBLIC_SITE_URL ? ? "https://disclosure.top" ;
export async function generateMetadata ( ) : Promise < Metadata > {
const locale = await getLocale ( ) ;
const title = locale === "en" ? "Search the archive" : "Buscar no arquivo" ;
const desc = locale === "en"
? "Search 28,000+ passages from declassified UAP/UFO documents. Verbatim quotes, page-level citations, bbox crops."
: "Busque em mais de 28 mil passagens dos documentos UAP/UFO desclassificados. Citações verbatim, referências por página, recortes em bbox." ;
return {
title ,
description : desc ,
alternates : { canonical : ` ${ SITE_URL } /search ` } ,
openGraph : { title , description : desc , url : ` ${ SITE_URL } /search ` } ,
} ;
}
2026-05-18 01:44:36 +00:00
export default async function SearchPage ( {
searchParams ,
} : {
searchParams : Promise < { q? : string ; lang? : string ; type ? : string ; doc_id? : string } > ;
} ) {
const sp = await searchParams ;
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
const locale = ( await getLocale ( ) ) === "en" ? "en" : "pt-br" ;
const lang : "pt" | "en" =
( sp . lang as "pt" | "en" ) ? ? ( locale === "en" ? "en" : "pt" ) ;
2026-05-18 01:44:36 +00:00
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
const heroEyebrow = locale === "en" ? "Search the archive" : "Buscar no arquivo" ;
const heroTitle = locale === "en"
? "Find a passage, a witness, a date."
: "Encontre uma passagem, uma testemunha, uma data." ;
const heroLead = locale === "en"
? "Search across every declassified page in the bureau. Results link straight to the source — page, chunk, and the original bounding box around the passage."
: "Busque em todas as páginas desclassificadas do bureau. Cada resultado leva direto à fonte — página, trecho e o recorte original ao redor da passagem." ;
2026-05-18 01:44:36 +00:00
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
return (
< div className = "min-h-screen bg-[#0a0e1a] text-[#e7ecf3]" >
< SiteHeader locale = { locale } / >
< main id = "main" className = "mx-auto max-w-5xl px-4 md:px-8 py-10 md:py-14" >
< header className = "mb-8 md:mb-10" >
< div className = "text-[10px] font-mono uppercase tracking-[0.18em] text-[#e0c080] mb-3" >
{ heroEyebrow }
< / div >
< h1 className = "font-display text-3xl md:text-5xl font-semibold leading-[1.05] tracking-tight text-[#e7ecf3] mb-4" >
{ heroTitle }
< / h1 >
< p className = "text-[16px] md:text-[17px] text-[#cbd2dd] leading-relaxed font-light max-w-2xl" >
{ heroLead }
< / p >
< / header >
2026-05-18 01:44:36 +00:00
ux(search): redesign /search from dev-tool to magazine
The audit's most ostensive gap: /search rendered as a green-on-black
terminal panel with a tech-jargon eyebrow ("HYBRID SEARCH · BM25 + BGE-M3
DENSE + CROSS-ENCODER RERANK"), no global navbar, and a floating locale
toggle disconnected from the rest of the site. Readers landing here saw
a different product.
Page (app/search/page.tsx):
- Render SiteHeader at the top (same primary nav as home; "Search" now
picks up the gold active-page indicator).
- Magazine hero: eyebrow + serif headline ("Find a passage, a witness, a
date." / "Encontre uma passagem, uma testemunha, uma data.") + lead.
- generateMetadata() reads getLocale() so the tab title localises too.
Panel (search-panel.tsx):
- Drop matrix-green palette; switch to magazine gold/cream.
- Rounded input with magnifier icon, gold solid submit pill.
- Plain-language placeholder, no developer terms.
- "Advanced filters" toggle: passage-type + exact doc-id behind a
collapsible — default state is one clean search box.
- Localise passage-type labels (paragraph → parágrafo, heading → título,
classification_marking → marcação de classificação, etc).
- Result card palette switched to gold/cream + clearer page · type ·
classification line; raw retrieval score removed from the UI (debug
noise for users).
- Locale toggle inside the form gone — the navbar carries it now.
Follow-ups noted (not in this commit):
- SearchAutocomplete dropdown still uses the old terminal palette.
- Navbar wraps on narrow mobile widths and the rightmost links overflow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:58:41 +00:00
< SearchPanel
locale = { locale }
initialQ = { sp . q ? ? "" }
initialLang = { lang }
initialType = { sp . type ? ? "" }
initialDocId = { sp . doc_id ? ? "" }
/ >
< / main >
< / div >
2026-05-18 01:44:36 +00:00
) ;
}