Skip to content

feat: remember the picked language in every example - #1

Merged
rubinbasha merged 1 commit into
mainfrom
feat/remember-language
Nov 9, 2026
Merged

rubinbasha merged 1 commit into
mainfrom
feat/remember-language

Conversation

@rubinbasha

Copy link
Copy Markdown
Contributor

Summary

Every example now remembers the language picked in its language picker, System default included, and starts in it next time. The SDK itself saves no language choice.

pick a language (or System default)
  save "it" | "fr" | "system" under rerune-example-language   (localStorage, AsyncStorage in Expo)
next start
  React       read before ReRune.setup -> first render already in it
  Angular     bundled: engine start language
              dashboard-only: after ReRuneService.ready(), like a picker change
  Expo        read during startup, applied before the first screen
nothing saved, or storage fails -> English, as before
 examples/react-native-expo/package.json
+  "@react-native-async-storage/async-storage": "2.2.0"   # already installed by @rerune/react-native 1.8.0

The Angular pickers mark the current language through each option's selected state, which also fixes System default showing on a fresh start.

Evidence

  • Before: picking Italian and reloading showed English.
    After: new specs in tests/browser/chapter.spec.ts and ota.spec.ts fail on the old builds and pass now.
  • pnpm lint, pnpm typecheck, pnpm test (11/11), pnpm check:dependencies, CI=true pnpm build, and CI=true pnpm export:android passed.
  • pnpm test:browser 32 passed and pnpm test:parity 2 passed, run locally on Chromium revision 1234 (this PR's CI runs the pinned revision). With French remembered and its download held, all three web apps keep English, then show French.
  • The Expo app has no runtime test in this repository; it was type-checked, linted, and exported, not run on a device.

Merge Danger

Door: two-way

Example code, tests, docs, and one direct dependency that was already in the lockfile. Revert the commit to undo.

Blast Radius: examples

A browser or device that ran the examples keeps the remembered language until the user picks another.

🤖 Generated with Claude Code

Each app saves the language picker's value (a language code, or "system"
for System default) under rerune-example-language and starts in it next time:
the React app before ReRune.setup, both Angular apps through the engine's
start language (a dashboard-only language once ReRuneService.ready()
resolves), and the Expo app from AsyncStorage during startup. The SDK still
saves no language choice. The Expo app now declares
@react-native-async-storage/async-storage 2.2.0, the version SDK 1.8.0 already
installs, so it can import it. The Angular pickers mark the current language
through each option's selected state, which also fixes System default
showing on a fresh start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rubinbasha
rubinbasha merged commit 148e626 into main Nov 9, 2026
2 checks passed
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