DeepTutor icon indicating copy to clipboard operation
DeepTutor copied to clipboard

Interface language preference is ignored on first app load

Open dongyu-will opened this issue 4 months ago • 1 comments

Description

When the persisted interface language is Chinese, a first-time browser session can still render the application in English. Settings → Appearance correctly shows 中文 as selected, but the navigation and home screen remain English.

Steps to reproduce

  1. Set language to zh in data/user/settings/interface.json (or select Chinese in Settings).
  2. Open DeepTutor from a fresh browser origin/session with no deeptutor-language local storage entry.
  3. Navigate directly to /home.
  4. Observe that the global UI renders in English.
  5. Open Settings → Appearance and observe that Chinese is already selected.

Expected behavior

The app shell should bootstrap its interface language from the persisted backend UI settings, so a fresh browser session renders Chinese without requiring the user to toggle the setting again.

Actual behavior

AppShellProvider starts with English and hydrates only from localStorage. The settings page separately loads interface.json, so the selector and the rendered application can disagree.

Environment

  • DeepTutor dev at 740ec413 (v1.5.7)
  • Source frontend on Next.js 16.2.3
  • Backend/frontend started with deeptutor start

Additional evidence

The issue reproduces without console errors. Removing only the deeptutor-language cache entry is sufficient to trigger it while the backend continues to report language: "zh".

dongyu-will avatar Jul 31 '26 01:07 dongyu-will

Thanks for your comments~ feel free to check v1.5.9

pancacake avatar Aug 04 '26 07:08 pancacake