Skip to content

feat(web): persist language preference - #359

Open
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:feat/issue-350-language-preference
Open

feat(web): persist language preference#359
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:feat/issue-350-language-preference

Conversation

@seekskyworld

Copy link
Copy Markdown

Problem

Implements the language-preference slice of #350. The Web workbench selected a locale only from the browser and lost the choice on reload.

Value

Users can keep a deliberate English/Chinese preference across reloads without involving Session or credential storage.

Approach

Read a validated openpi.language value from browser-local storage, fall back to navigator detection, and add an accessible language toggle. Invalid values are ignored and storage failures degrade to in-memory behavior.

Validation

  • npx tsc --noEmit
  • node --test --experimental-strip-types tests/web/app-render.test.ts
  • git diff --check

Impact

  • User-visible behavior: adds a language toggle and reload persistence.
  • Model-visible context/tools: none.
  • Runtime/lifecycle: none.
  • Persisted config/data: browser-local language key only; no Session data or secrets.
  • Compatibility/risk: unsupported storage values fall back to browser detection.

Signed-off-by: seekskyworld <djh1813553759@gmail.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.

1 participant