Skip to content

feat(studio): #1225 — i18n pipeline (next-intl) with en/zh catalogs + locale switcher#1263

Open
ohdearquant wants to merge 2 commits into
mainfrom
show/lionagi-sweep/studio-i18n
Open

feat(studio): #1225 — i18n pipeline (next-intl) with en/zh catalogs + locale switcher#1263
ohdearquant wants to merge 2 commits into
mainfrom
show/lionagi-sweep/studio-i18n

Conversation

@ohdearquant

Copy link
Copy Markdown
Owner

i18n pipeline from the lionagi-sweep show (#1225). Critic APPROVE (CRIT:0 MAJ:0 MIN:3) — traced the full LocaleSwitcher cookie → i18n/request.tsNextIntlClientProvideruseTranslations chain and independently ran lint/typecheck/build green (18/18 pages). pnpm-lock.yaml updated (frozen-install safe).

Pipeline (validated end-to-end)

  • next-intl ^3.26 wired: i18n/request.ts getRequestConfig + NextIntlClientProvider in the root layout; cookie-based locale (NEXT_LOCALE, no URL prefix/middleware), en fallback; next.config.mjs turbopack resolveAlias for Next 16 compat.
  • Locale switcher in the header with year-long cookie persistence.
  • en/zh catalogs — 126/126 keys match exactly; real Chinese translations (运行, 资源库, 阻塞项, 已超时, 协调引擎, 控制台).
  • Converted: global nav/header (Shell, Breadcrumb, NavGroup, ProjectChip), runs list, show detail.

Deferred (documented, non-blocking MIN)

Remaining unconverted pages + shared components + metadata listed for follow-up — the ask was to validate the pipeline end-to-end + one locale, which this does.

Closes #1225

🤖 Generated with Claude Code

ohdearquant and others added 2 commits June 3, 2026 14:52
Wire next-intl end-to-end in apps/studio/frontend (Next.js 16 App Router):
- i18n/request.ts getRequestConfig + NextIntlClientProvider in root layout
- cookie-based locale (NEXT_LOCALE, no URL prefix/middleware), en fallback
- LocaleSwitcher in the header with year-long cookie persistence
- next.config.mjs: turbopack.resolveAlias for Next 16 next-intl compat

Externalize strings (en baseline + real zh translations, 126/126 keys):
- global nav/header (Shell, NavGroup, Breadcrumb, ProjectChip)
- runs list (app/runs/page.tsx) and show detail (app/shows/[topic]/page.tsx)

Remaining surfaces deferred and documented in SUMMARY.md. Critic gate:
APPROVE (CRIT:0 MAJ:0 MIN:3 PASS:5). lint/typecheck/build green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The i18n work added "next-intl" to package.json but did not regenerate the
lockfile, so CI's `npm ci` aborted with "Missing: @formatjs/* / intl-messageformat
/ decimal.js from lock file" before any lint/typecheck/build step ran. Regenerated
the lock (npm install --package-lock-only); it now carries the full next-intl tree.
Verified: npm ci clean (564 pkgs), npm run lint (0 errors), typecheck, and build
all pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ohdearquant added a commit that referenced this pull request Jun 7, 2026
…xonomy, deprecation purge, migration extract, follow-ups, DeepWiki (#1259)

* chore(docs): docs/chore sweep — README CLI, ADR taxonomy, deprecation purge, follow-ups, DeepWiki, db.py migration extract

Addresses six docs/chore issues on one branch (local-only):

- #1120: add accurate "CLI commands" section to README (flags verified against lionagi/cli/)
- #1129: document ADR status taxonomy in docs/adrs/README.md; fix ADR-0028 (Phase 2 Shipped) and ADR-0030 (Proposed)
- #1131: remove v0.21.0 deprecation tombstones (operative_model, request_model, imodel,
  suppress_conversion_errors, inherit_base, frozen, FieldModel.to_dict()) + update call sites and tests (breaking)
- #1132: draft follow-up issues in docs/followups-2026-06.md (#1259-#1263) + add asyncio TODO breadcrumbs (no GH issues filed)
- #1242: add DeepWiki Docs/Architecture link to README (repo description field deferred to director)
- #1128: extract _reconcile_columns migration table to lionagi/state/schema_migrations.py + add regression test

Tests: 746 passed. ruff check/format clean on touched files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Delete docs/followups-2026-06.md

* fix(messages,service): purge orphaned request_model surface left by deprecation sweep

The deprecation sweep removed the request_model/operative_model aliases
from communicate/operate, the instruction.py from_dict conversion, and
the endpoint payload filter — but left three loose ends:

- MessageManager.create_instruction/create_message/add_message (and the
  module-level create_message) still accepted request_model, which is now
  silently dropped since from_dict no longer maps it to response_format.
  Remove the parameter from all four manager surfaces so a stale call
  fails loudly (TypeError) instead of being ignored.
- Schema-less Endpoint.create_payload no longer filtered request_model/
  operative_model, so a stale caller passing one via **kwargs leaked it
  into the outgoing provider payload. Restore both to non_api_params.
- Stale doc pointers: event.py/processor.py referenced the deleted
  docs/followups-2026-06.md; branch.communicate docstring still called
  response_format an alias for the removed request_model.

Verified: create_instruction(request_model=) now raises TypeError;
create_payload(...) no longer leaks the aliases. 1247 targeted tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(operations,docs): reject removed kwarg aliases instead of swallowing them

The deprecation sweep removed request_model/operative_model/imodel from
communicate/operate and inherit_base/frozen from Step.request_operative,
but each function keeps a **kwargs catch-all. A stale caller passing a
removed name was silently swallowed: communicate/operate forwarded it into
the provider payload as imodel_kw (no response_format, no model switch),
and Step.request_operative dropped it with zero warnings.

- Add lionagi/operations/_guards.py::reject_removed_kwargs — raises a
  TypeError naming each removed param and its replacement.
- Guard prepare_communicate_kw, prepare_operate_kw (request_model,
  operative_model -> response_format=; imodel -> chat_model=) and
  Step.request_operative (inherit_base, frozen). Genuine provider kwargs
  (temperature, top_p, ...) still flow through to imodel_kw.
- docs/api/session.md, docs/api/branch.md: replace removed imodel= usage
  and the 'deprecated alias' table rows with chat_model=. The old examples
  failed at runtime.

Verified: stale aliases now raise TypeError; legit kwargs still forwarded;
corrected docs example runs. 443 operation tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

Studio frontend: internationalization (i18n) / multilingual support

1 participant