fix: 版本更新通知设计杂乱 #1005#1145
Conversation
lefarcen
left a comment
There was a problem hiding this comment.
Hi @masher-pp! 🎉
Wow, what an impressive PR for fixing the messy update notification banner design—thank you for this thoughtful contribution! 🙌 The changes look clean and well-targeted:
- Simplified version display with
simplifyVersion()– smart handling of nightly builds and timestamps - Improved i18n strings for better UX ("New version available" feels more natural)
- CSS positioning fix (right-aligned is better for banners)
- Bonus README contribution!
A few quick thoughts:
- The
simplifyVersionregex/-nightly\.\d+/works well, but consider/-nightly\.[0-9]+/for explicit numeric matching. - In
use-locale.tsx, the localStorage check is a great fix for #448 – nice catch!
This looks solid overall. We'll review promptly (target: 24h). Questions or updates? Push here!
Join communities:
- Feishu: https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=90emc2e9-86cd-4723-b455-ca41b70f162d
- Discord: https://discord.gg/nexu
Thanks for making Nexu better!
Nexu Team
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29d5fb6f79
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const manualSelection = localStorage.getItem(STORAGE_KEY); | ||
| if (manualSelection === "en" || manualSelection === "zh") { | ||
| // User has manually selected a language, respect their choice | ||
| return; |
There was a problem hiding this comment.
Preserve server locale when cached key was auto-populated
bootstrapLocale now returns immediately whenever localStorage has nexu_locale, which makes the server preference fetched from /api/internal/desktop/preferences effectively ignored on most later launches. This key is also written automatically in the fallback path (not just after a manual user choice), so backend locale changes made via config restore/profile switch/other clients will no longer be applied to the UI, leaving web locale out of sync with controller locale.
Useful? React with 👍 / 👎.
29d5fb6 to
df01637
Compare
修复bootstrapLocale函数race condition问题,当用户通过localStorage手动选择语言时,尊重用户选择,不覆盖现有设置。 - 修改文件: apps/web/src/hooks/use-locale.tsx - 新增逻辑: 在bootstrap过程中检查localStorage中的用户手动选择 - 修复问题: 欢迎页语言切换器无法改变UI语言的问题
df01637 to
7598e17
Compare
What
修复版本更新通知横幅的设计杂乱问题,优化UI显示效果
Why
版本更新通知横幅存在设计问题,UI显示杂乱,影响用户体验。修复后确保通知横幅显示更加清晰和美观。
Closes #1005
How
Affected areas
Checklist
Notes for reviewers