fix(web): move budget banner to persistent layout to prevent re-mount flicker#1138
fix(web): move budget banner to persistent layout to prevent re-mount flicker#1138JujiuYey wants to merge 7 commits intonexu-io:mainfrom
Conversation
lefarcen
left a comment
There was a problem hiding this comment.
Hey @JujiuYey! 👋
Thanks for the update on this PR! 🎉 Clean and targeted fix - moving the BudgetWarningBanner to the persistent layout is the right approach to eliminate re-mount flicker across route changes (Home → Sessions).
Quick review of changes:
- ✅
getBudgetBannerRouteVariant: Perfect logic unification - now/workspace/homecorrectly returnsglobalalongside sessions routes - ✅
home.tsx: Surgical removal of banner + hooks (imports, uses, two render sites) without touching unrelated code - ✨ No new issues introduced, checklist solid (typecheck/lint pass, no secrets/any types)
This looks production-ready! 🚀
Join our 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
lefarcen
left a comment
There was a problem hiding this comment.
Hey @JujiuYey! 👋
Quick re-review after your latest push - still looking great! 🎉 The core budget banner fix remains solid:
✅ use-desktop-budget-guard.ts & home.tsx changes unchanged and correct
✨ docs/github-metrics.svg updated with fresh repo stats (nice touch for docs!)
No issues - ready to ship! 🚀
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!
Nexu Team
lefarcen
left a comment
There was a problem hiding this comment.
Hey @JujiuYey! 👋 Thanks for keeping this PR fresh with repo metric updates! 📊 The budget banner fix continues to look excellent:
✅ Core changes (hooks/home.tsx) unchanged & solid
✅ docs/github-metrics.svg: Latest stats + simplified contributors (if intentional)
No issues spotted. Ship it! 🚀
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
Nexu Team
|
|
||
| <!-- Footer --> | ||
| <text x="480" y="390" text-anchor="middle" font-size="10" fill="#8b949e">Updated 2026-03-27 · nexu-io/nexu</text> | ||
| <text x="480" y="390" text-anchor="middle" font-size="10" fill="#8b949e">Updated 2026-04-20 · nexu-io/nexu</text> |
There was a problem hiding this comment.
P3 Note: Top contributors section fully cleared (was showing users like lefarcen/claude). Confirm if intentional for this PR scope, or should retain prior data? Otherwise LGTM!
lefarcen
left a comment
There was a problem hiding this comment.
Hey @JujiuYey! 🎉
Excellent work keeping the metrics current! The banner fix is solid across all pushes:
✅ No new issues
✅ Prior nits addressed/clarified
✅ Ready to merge 🚀
(Admin confirm for final approve per policy)
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
Nexu Team
Fixes #1091
What
将 BudgetWarningBanner 从页面组件(home.tsx)提升到 workspace-layout.tsx 的布局层渲染.
Why
路由切换时(Home → Sessions),banner 会 unmount/remount 导致视觉闪烁。
How
getBudgetBannerRouteVariant: home 路由从inline改为global,与 sessions 统一home.tsx: 移除两处BudgetWarningBanner渲染及相关 hook 引用workspace-layout.tsx: 已有的 global banner 逻辑自动覆盖,无需改动Affected areas
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpassespnpm generate-typesrun (if API routes/schemas changed)anytypes introduced (useunknownwith narrowing)Notes for reviewers
Banner 的 DEV 调试面板(
BudgetBannerDebugPanel)保留在 home.tsx 中未做改动,它是独立的开发工具组件,不影响本次修复。