Commit graph

5 commits

Author SHA1 Message Date
Luiz Gustavo
df05b21dff ux(nav): SiteHeader on every sub-page; BureauNav back to pure breadcrumb
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 37s
CI / Retrieval — golden set (Recall@5 + MRR) (push) Failing after 6s
Two related navbar issues from the audit:
- Sub-pages on desktop only had the breadcrumb pills — readers on a case
  file couldn't get to /sightings or /witnesses without going home first.
- Entity-list pages (/sightings, /witnesses, …) stacked SiteHeader AND
  BureauNav and BOTH carried a locale toggle + auth pill, surfacing every
  control twice.

This pass unifies the chrome:

- BureauNav slimmed: only the ← home pill, the section pill, and the
  breadcrumb trail. Locale toggle, auth pill and mobile hamburger removed
  — SiteHeader owns those.
- SiteHeader added above BureauNav on /bureau, /c/[slug], /h/[id], and
  /jobs/[id]. The four pages that previously skipped it now have the full
  global nav on desktop and a single hamburger on mobile.
- Entity-list pages (which already stacked the two) lose their duplicate
  controls; verified live: 1 toggle + 1 sign-in on /sightings, /bureau,
  /c/d44; 1 hamburger on mobile case files.

No regressions on /documents or the home (both already followed the
SiteHeader-only or stacked-correctly pattern).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 01:41:30 -03:00
Luiz Gustavo
067ce7bee6 ux(nav): mobile hamburger + slide-in drawer for narrow viewports
Some checks failed
CI / Web — typecheck + lint + build (push) Failing after 1m23s
CI / Scripts — Python smoke (push) Failing after 41s
CI / Web — npm audit (push) Failing after 37s
CI / Retrieval — golden set (Recall@5 + MRR) (push) Failing after 5s
The mobile audit caught the primary nav overflowing past the viewport edge
("Programs" was clipped on the right at 390px), and sub-pages on mobile had
no access to the entity hub at all because BureauNav doesn't carry it.

- New MobileNav (client) — hamburger button that opens a right-side slide-in
  panel containing the full primary nav, locale toggle and auth pill. ESC,
  backdrop click, link click, and the close button all dismiss; body scroll
  locks while open; focus jumps to the close button so screen readers
  announce the dialog and keyboard users can dismiss in one keystroke.
- SiteHeader — hide desktop nav <md, show hamburger <md. Brand and trigger
  are the only two elements in the row on mobile, so the overflow stops.
- BureauNav — same treatment: keep the breadcrumb pills, hide the desktop
  right cluster <md, surface the hamburger <md. Means a case-file reader on
  mobile can now jump to /sightings, /witnesses etc without going home
  first.
- MobileNav imports LocaleToggleClient directly (not the server-component
  LocaleToggle wrapper, which would fail Next.js's "client cannot import
  server" rule and break the build).

Verified live at 390×844: drawer opens with all 7 links stacked + toggle +
Sign in; main nav row no longer overflows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 01:09:45 -03:00
Luiz Gustavo
2ea350e283 ux(nav): unify navbar palette, localize, fix locale-aware metadata
Some checks failed
CI / Web — typecheck + lint + build (push) Failing after 36s
CI / Scripts — Python smoke (push) Failing after 5s
CI / Web — npm audit (push) Failing after 37s
CI / Retrieval — golden set (Recall@5 + MRR) (push) Failing after 5s
Visual audit found several issues in the navbar / header layer; this pass
addresses the cluster.

- AuthBar: localize sign in/out + dev-disabled message; switch matrix-green
  (#00ff9c) to gold (#e0c080) to match the magazine palette.
- NavLink (new): client component reading usePathname to mark the active
  section with aria-current="page" and a gold underline+fill, so the user
  knows where they are inside the entity hub.
- Locale toggle: bump font to 12px, widen the pill, lift the active state's
  contrast. Hard reload on switch (window.location.reload) instead of
  router.refresh — that is what makes the <title>, <html lang> and og:locale
  actually update on toggle (router.refresh kept stale layout metadata).
- Root layout: convert static `export const metadata` to generateMetadata()
  so title/description/OG/twitter all read the cookie per request. Drop the
  duplicate floating LocaleToggle at bottom-left; the navbar carries it now.
- BureauNav: drop the cyan-on-home / gold-on-bureau split (palette mismatch
  with SiteHeader); single gold tone; localize "home"/"case files" + aria
  labels; mount AuthBar inside the bar so sub-pages get a sign-in surface.
- Pages using BureauNav: drop the standalone <AuthBar /> below it (now
  duplicated). Affected: /bureau, /c/[slug], /h/[hypothesisId], /jobs/[id].
- Lift nav-link rest text from #9aa6b8 to #cbd2dd for WCAG-AA on near-black.

Verified live: title/lang/og:locale switch with cookie; active link gold
indicator on /sightings; "Entrar"/"Sign in" localizes; no double AuthBar.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 17:50:10 -03:00
Luiz Gustavo
3e88a64933 W5.8: language toggle in the navbar (whole-site PT-BR / EN)
Some checks failed
CI / Web — typecheck + lint + build (push) Failing after 1m16s
CI / Scripts — Python smoke (push) Failing after 36s
CI / Web — npm audit (push) Failing after 28s
CI / Retrieval — golden set (Recall@5 + MRR) (push) Failing after 4s
User: "quero que o usuário possa escolher o idioma na navbar, e então leia
o site todo em seu idioma."

The locale infrastructure already existed (cookie + getLocale() + every
page renders bilingual). The toggle only lived as a subtle floating
control bottom-left. This surfaces it in the navbars where users expect
it, and confirms whole-site language switching.

  locale-toggle-client.tsx
    - New variant="navbar": gold-amber pill matching the magazine theme
      (PT | EN, active = solid gold). Retro green variant kept for the
      floating fallback.
    - Guard: clicking the already-active language is a no-op.
    - aria-pressed on each button for a11y.

  locale-toggle.tsx: LocaleToggle gains variant passthrough.

  site-header.tsx: <LocaleToggle variant="navbar"> added to the main nav
    (homepage + /sightings /witnesses /objects /locations /operations
    /documents).

  bureau-nav.tsx: optional `locale` prop renders the same toggle pushed
    to the right (ml-auto) on /bureau, /c/[slug], /h/[id], /jobs/[id].
    All four callers now pass locale (getLocale added to h + jobs pages).

Cookie-based: switching sets `locale` cookie + router.refresh(); the
server re-renders every component through getLocale(), so the entire
page — headers, hero, summaries, case narratives, entity cards — flips
language in one click. The floating bottom-left toggle stays as a global
fallback for pages without a navbar (/d, /e, /search, /graph).

Also this session: Sun-Tzu smoke succeeded on the refreshed
CLAUDE_CODE_OAUTH_TOKEN — brief B-0001 written for the green fireballs
("bolas de fogo verdes confinadas ao corredor nuclear... cor espectral
e trajetória quase horizontal que os próprios analistas consideraram
irreconciliáveis com meteoros naturais", 3 pillars). Bulk entity
enrichment resumed in the background.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 22:54:37 -03:00
Luiz Gustavo
24f12a27f4 W4.1+W4.2: anti-AI-tics house style + bureau nav (back/home everywhere)
Some checks failed
CI / Web — typecheck + lint + build (push) Failing after 31s
CI / Scripts — Python smoke (push) Failing after 4s
CI / Web — npm audit (push) Failing after 31s
CI / Retrieval — golden set (Recall@5 + MRR) (push) Failing after 4s
Two complaints in one wave:

(W4.1) User: "Não pode ter vícios de IA como uso excessivo de '-' que a IA
coloca geralmente no lugar de vírgulas por exemplo. Isso deve fazer parte
do prompt geral."

  - New prompts/_house-style.md banning the 9 most common AI prose tells
    in both EN and PT-BR:
      1. Em dashes as comma replacements (—)
      2. Rule-of-three lists ("concrete, rigorous, and grounded")
      3. Conjunctive openers ("Moreover", "Notably", "Ademais")
      4. Superficial -ing analyses ("marking a shift", "destacando")
      5. Inflated symbolism + AI vocab (tapestry, navigate, delve,
         underscore, robust, multifaceted, marco histórico, ...)
      6. Negative parallelisms ("Not just X but Y")
      7. Vague attribution ("Some scholars say...")
      8. Summary closers ("In summary...", "Em suma...")
      9. Hedging fluff ("It's important to note...")
    Verbatim chunk quotes are explicitly exempt; preserve as-is.
  - claude.ts callClaude() lazily loads _house-style.md once per process
    and PREPENDS it to every detective's system prompt:
        composedSystem = houseStyle + "---" + detective.systemPrompt
    This means all 7 detectives + future ones get the rules without any
    per-prompt change.

(W4.2) User: "Quando entra em uma página da investigação não tem como
voltar! UX terrível!"

  - New <BureauNav> sticky topbar with explicit "← home" + "🔎 bureau"
    buttons + clickable breadcrumb trail. Always visible at the top of
    every bureau page so the user can escape in one click.
  - Wired into /bureau, /h/[hypothesisId], /c/[slug], /jobs/[id]. Each
    page passes its sensible parent crumb (/bureau#hypotheses,
    /bureau#reports, /bureau#jobs).
  - Replaces the previous plain-text "disclosure.top / hypothesis /
    H-0004" line which had no visual affordance.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 13:27:58 -03:00