3 Commits
Author SHA1 Message Date
Haozhe Wu 71933ecf31 feat(frontend): guided-minimalism WebUI overhaul — 12-way audit + fix fleet
Land the pre-talk WebUI campaign: first-frame stability (pre-paint theme
boot via CSP-safe public/theme-boot.js, self-hosted fonts + OFL license),
streaming performance (rAF token batching, throttled flush, streaming
markdown with deferred highlight, 160-row windowing, swarm state in its
own store slice with per-run coalescing), correctness (FIFO tool matching,
retry preserves request semantics, display/request separation, cache-hit
session refresh, multi-tab message.received), guided-minimalism welcome
(time-aware greeting + brand lockup + 4 quick actions + collapsible
library, fill-first affordance), SwarmDashboard rebuild with honest
indeterminate progress, five-locale copy de-jargoning with lazy locale
chunks, accessibility Level-A fixes (color-blind metric glyphs, aria-live
streaming, skip link, focus-visible affordances), robustness (markdown
link/table/KaTeX overflow, safe localStorage, portal modal), and '/' now
opens the product with marketing moved to /about.
2026-07-29 23:07:35 +08:00
digger yu ae9aee9282 feat(i18n): add ja/ko/ar locales, RTL layout, LanguageSwitcher, and i18n tests
Add Japanese, Korean, and Arabic locales to match the README set,
replace the two-option zh/en toggle with a full language dropdown,
and add comprehensive i18n parity tests.

i18n core
- New ja/ko/ar.json (634 keys each, 100% parity with en.json).
- SUPPORTED_LANGUAGES registry + isRtl()/applyDocumentDirection()
  helpers; navigator as secondary detector with Node.js 21+ guard;
  nonExplicitSupportedLngs for regional variant matching.
- New i18next.d.ts for strict t() key type-checking at compile time.

Components
- LanguageSwitcher dropdown in Layout.tsx: position: fixed + JS-measured
  coords (resists overflow/clipping/RTL direction), full ARIA, touchstart
  + Escape dismiss, i18n.languages array for regional code matching.
- WelcomeScreen: fix double-prefix bug — CATEGORIES/CAPABILITY keys now
  carry full i18n paths with `as const`.
- AlphaZoo: 10 dynamic t() calls use `as any` + defaultValue fallback.
- APP_VERSION constant removed; version string sourced from t('app.version').

RTL & theme
- Logical properties throughout (border-e, ps/pe, border-s-2) +
  rtl:flex-row-reverse on main layout.
- --popover CSS variable defined (light + dark); bg-popover was producing
  no color before, making every popover transparent.
- [dir="rtl"] .rtl\:flip-x rule for mirroring directional icons.

Tests (i18n.test.ts — 231 total, all passing)
- Key parity: 5 locales × 2 directions (missing + extra) + sanity check.
- Interpolation variable parity across all locales.
- isRtl: base codes, regional variants (ar-EG/ar-SA), unknown codes.
- SUPPORTED_LANGUAGES registry integrity.

zh-CN.json
- Translation refinements ("A股回测"→"多市场回测", description alignment
  with en.json); key ordering aligned to en.json structure.

Signed-off-by: digger yu <digger-yu@outlook.com>
2026-06-29 09:28:59 +08:00
warren618 34eae37ba4 Initial commit 2026-04-01 18:14:49 +08:00