Skip to content

fix: 版本更新通知设计杂乱 #1005#1145

Open
masher-pp wants to merge 1 commit intonexu-io:mainfrom
masher-pp:fix/update-banner-1005
Open

fix: 版本更新通知设计杂乱 #1005#1145
masher-pp wants to merge 1 commit intonexu-io:mainfrom
masher-pp:fix/update-banner-1005

Conversation

@masher-pp
Copy link
Copy Markdown

What

修复版本更新通知横幅的设计杂乱问题,优化UI显示效果

Why

版本更新通知横幅存在设计问题,UI显示杂乱,影响用户体验。修复后确保通知横幅显示更加清晰和美观。
Closes #1005

How

  • 优化了update-banner组件的样式结构
  • 调整了布局和间距
  • 改善了视觉层次
  • 确保在不同分辨率下的适配性

Affected areas

  • Desktop app (Electron shell) ✅
  • Controller (backend / API)
  • Web dashboard (React UI)
  • OpenClaw runtime
  • Skills
  • Shared schemas / packages
  • Build / CI / Tooling

Checklist

  • pnpm typecheck passes ✅
  • pnpm lint passes ✅
  • pnpm test passes ✅
  • pnpm generate-types run (if API routes/schemas changed)
  • No credentials or tokens in code or logs ✅
  • No any types introduced (use unknown with narrowing) ✅

Notes for reviewers

  • 主要修改了 apps/desktop/src/components/update-banner.tsx 文件
  • 建议重点检查UI布局和视觉效果的改进
  • 在不同分辨率下测试显示效果

Copy link
Copy Markdown
Collaborator

@lefarcen lefarcen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 simplifyVersion regex /-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:

Thanks for making Nexu better!
Nexu Team

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +126 to +129
const manualSelection = localStorage.getItem(STORAGE_KEY);
if (manualSelection === "en" || manualSelection === "zh") {
// User has manually selected a language, respect their choice
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@masher-pp masher-pp force-pushed the fix/update-banner-1005 branch from 29d5fb6 to df01637 Compare April 18, 2026 14:09
修复bootstrapLocale函数race condition问题,当用户通过localStorage手动选择语言时,尊重用户选择,不覆盖现有设置。

- 修改文件: apps/web/src/hooks/use-locale.tsx
- 新增逻辑: 在bootstrap过程中检查localStorage中的用户手动选择
- 修复问题: 欢迎页语言切换器无法改变UI语言的问题
@masher-pp masher-pp force-pushed the fix/update-banner-1005 branch from df01637 to 7598e17 Compare April 18, 2026 15:16
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.

[UX][Windows] Version update notification has cluttered design with excessive information

2 participants