fix(ui): stabilize settings apply flow and mobile/admin UX - #12
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f0ffd4ed6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let currentLocale: Locale = "ko-KR"; | ||
|
|
||
| if (typeof window !== "undefined") { | ||
| const saved = window.localStorage.getItem(LOCALE_KEY); |
There was a problem hiding this comment.
Guard locale bootstrap from storage access failures
Reading window.localStorage at module initialization can throw a SecurityError in environments where storage is blocked (for example strict privacy settings or sandboxed contexts), and this code runs as soon as t.ts is imported by the app shell. That turns a recoverable preference read into an app-boot crash for all routes, so this read should be wrapped in a safe fallback path instead of executing unguarded at import time.
Useful? React with 👍 / 👎.
What\n- Make app locale state global () and persist in localStorage\n- Sync locale from on load and after save\n- Apply settings immediately after save (reload)\n- Add AppShell brand click -> \n- Improve admin shell mobile tab layout\n- Add preferences read fallback ( -> on 404)\n\n## Why\nAddress runtime issues reported in production-like access:\n- settings save/apply feels not reflected globally\n- mobile settings tab layout breakage\n- home navigation missing on logo click\n\n## Validation\n- bash scripts/run_evidence.sh --scope ui_light PASS\n- API checks for and root children pass