Skip to content

Use the viewer language for generated briefing presentation - #497

Closed
NewWorldVenture wants to merge 2 commits into
codex/strategy-briefing-all-day-readers-20260910from
codex/strategy-briefing-api-localization-20260910
Closed

NewWorldVenture wants to merge 2 commits into
codex/strategy-briefing-all-day-readers-20260910from
codex/strategy-briefing-api-localization-20260910

Conversation

@NewWorldVenture

@NewWorldVenture NewWorldVenture commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

Generated briefings and their deterministic digest used English prose even when the page's language was different. The API now resolves the existing request locale once and uses it for greetings, date/time labels, summaries, conflicts, known meal labels, digest deadlines/USD display, recommendations and generated completion wrappers. German, French and European Portuguese retain formal address.

The digest carries optional typed source facts internally. A pure view formatter validates each descriptor against its canonical title/detail/member/deadline before translating it, then removes metadata from the public response. Missing or inconsistent facts fall back per item. Canonical sorting/counts/grounding, original household names/titles/meal/location text, stable IDs/status enums, permissions, queries, limits and existing notification marking remain unchanged; translated prose is not persisted. The optional model receives trusted language/register instructions with the same bounded schema and untrusted-data fence. This is best-effort steering, not guaranteed language compliance for schema-valid provider output.

Based on #492 at4b3c37517e554ad84b9ee3d5a90726fea4e3099f. Implementation source is863a58a80057e7a3090e5c40bbbf8aca61532c53. Client session isolation is the companion #495; static controls and mobile badge wrapping are a separate reviewed UI change. Preserve the earlier completed-plan/undated-history API correction when integrating into the combined branch.

Validation: eight baseline request cases reproduced seven language failures. All439 affected tests across13 suites pass, plus TypeScript, scoped lint, eight translation gates and diff check. Independent review passes318 overlapping tests and13 adversarial descriptor cases; six reproduced coherence defects are fixed. Forty-four base/current comparisons preserve every legacy canonical field and grounding byte. All12,753 prior catalogue values/order remain plus41 keys per locale;26 protected source files are unchanged. Fifty-six actual React/Chromium content states render actual POST fixture responses across seven locales, morning/evening/weekly and narrow/wide screens with zero errors/external requests. The existing dense320px badge overflow is explicitly recorded and belongs to the static UI companion; this PR alone does not claim clean mobile layout.

The unpublished combined ea2d7a1a rehearsal passes471 tests across17 briefing/digest suites, retaining the earlier completed-plan correction. Full-suite/build evidence from preceding checkpoints is not reassigned. Browser/server/provider transports use disclosed local fixtures; no live model, delivery-language or production acceptance is claimed. No SQL, shared navigation, dependencies or provider actions. Keep draft until required checks pass at this head.

Final published head16111a48a9bc75b10d04e5457aabb05d7c8e5afe corrects two newly added Spanish count labels to invariant wording valid at one or many. All69 actual API/formatter tests pass after that catalogue-only follow-up. The combined client grid correction is #498 at21e2132e; independent combined56563555 browser checks pass56 views with no overflow and readable short household titles. Full12,337-test evidence belongs to849d62ab; the243-page production build belongs to56563555 immediately before these two catalogue strings. Keep final-head CI pending until verified.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bubaly Ready Ready Preview Sep 10, 2026 4:25pm UTC

Request Review

NewWorldVenture pushed a commit that referenced this pull request Sep 10, 2026
# Conflicts:
#	lib/i18n/messages/de-DE.json
#	lib/i18n/messages/en-US.json
#	lib/i18n/messages/es-ES.json
#	lib/i18n/messages/fr-FR.json
#	lib/i18n/messages/it-IT.json
#	lib/i18n/messages/nl-NL.json
#	lib/i18n/messages/pt-PT.json
#	tests/briefing-calendar-days.test.ts
#	tests/helpers/in-memory-supabase.ts

Copy link
Copy Markdown
Owner Author

Shipped — this landed on main in #500 (merge commit f478dce5).

It stayed open only because its base is codex/strategy-briefing-all-day-readers-20260910, a stacked branch that never moved, so the auto-close-on-merge never applied. Retargeting it to main is refused by GitHub with "There are no new commits between base branch 'main' and head branch 'codex/strategy-briefing-api-localization-20260910'" — which is the confirmation that every commit here is already in main.

Your parseOr evolution won the tie against #443's: the merged helper carries the clearer mode: 'or' | 'and' signature, with the one straggling caller normalized to it. Worth flagging that this seam produced a genuine bug the full suite caught — the resolved file briefly held both an early return accepting a nested or(...) and, below it, the deliberate throw rejecting it. The return shadowed the throw, so in-memory-supabase-logic stopped seeing the malformed grammar it pins. The accepting branch was the stray and is gone.

Closing as redundant, not rejected.


Generated by Claude Code

This branch was successfully deployed

2 active deployments
Production — 16111a48 Deployed Sep 10, 2026 by vercel[bot]
Preview — 16111a48 Deployed Sep 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant