Skip to content

fix(ui): 修复侧边栏切换主页卡顿 (#129) - #131

Open
Bloriko wants to merge 5 commits into
Windowsfrom
fix/issue-129-sidebar-nav-stall
Open

fix(ui): 修复侧边栏切换主页卡顿 (#129)#131
Bloriko wants to merge 5 commits into
Windowsfrom
fix/issue-129-sidebar-nav-stall

Conversation

@Bloriko

@Bloriko Bloriko commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

  • 根因:RinUI NavigationView 每次侧边栏切页都会 StackView.replace 销毁并重建页面,Home.qmlComponent.onCompleted 会反复调用 refreshActivityInfo / refreshServerInfo,再叠加主线程 getLaunchItems 扫盘,造成侧边栏卡顿。
  • 修复
    • 主页先读本地缓存出骨架,远程刷新改到 Qt.callLater 下一帧
    • 活动信息 / 查服数据增加 5 分钟 TTLin-flight 去重localmod 跳过打网
    • 启动项列表短时缓存(15s),安装/删除/改目录时 invalidate
    • /api/info 与查服请求统一 timeout=5,避免慢网线程堆积
    • BBBS / Live 列表同样 TTL;手动「刷新」按钮 forceRefresh=true
  • 在关闭但未合并的 fix(ui): avoid sidebar stall from sync network on page show (#129) #130 思路上重做于当前 Windows(头像异步契约沿用主干,不回退)。

close #129

Test plan

  • python3 -m unittest test_runtime_regressions -v 通过(含新增 关于侧边栏点击时发生的卡顿的性能问题 #129 断言)
  • 冷启动进入主页:活动条 / 服信息仍能显示(缓存或首次请求)
  • 主页 ↔ 其它页快速切换:无明显卡顿;短时间内不应每次都打 /api/info 与查服 API
  • 约 5 分钟后再进主页:允许再刷新一次远程数据
  • 安装或删除核心后,启动项列表仍正确
  • BBBS / Live 手动刷新按钮仍能强制拉新数据

NavigationView recreates pages on every sidebar click. Defer Home network
work, add TTL/in-flight guards for activity/server data, cache launch items
briefly, and give remote requests timeouts so offline/slow nets cannot pile
up threads and stall navigation.

close #129
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

- DownloadDialog: non-modal + no dim overlay so navigation works during
  downloads; ListModel in-place updates; full status_text, stopwatch,
  speed/ETA/size, max threads; signal-driven progress patches
- VersionNameDialog / SelectVersionDialog: raise heights so inputs and
  combos are not clipped by RinUI padding/footer
- Download page: poll only when StackView-active; stable status ListModel
  with detailed status/speed lines
- download_manager: throttle QML progress signals and prune less often
  to reduce main-thread stalls when switching pages
Rebrand the Resource Pack Editor's AI assistant from "BLRPE Copilot"
to "Blora Agent", aligning with the launcher's existing agent brand
name, and switch its avatar from icon/BLRPE.png to icon/Bloriko.jpg.

- QML: AgentTab avatar/source, editor tab label, notification strings,
  Settings notification label and AI provider description
- Backend: system prompt self-identification, OS notification titles,
  permission label, notification doc, BLAPI validation messages
- i18n: update keys/values across all 5 lang files
- Docs: plugin specs, plugin developer guide, wiki pages
Replace RinUI Frame+clip and anchors.fill MouseArea height trap with a
content-sized Rectangle (min height 88), always show progress/status
rows, and rebuild the status ListModel so active downloads are visible.
- Bump RinUI: Icon circular mask, NavigationItem wiring, safePush
  coalescing + watchdog, TitleBar/NavigationBar title leading width
- main.qml: passport nav item sets circular/radius/cropToFit for avatar
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.

关于侧边栏点击时发生的卡顿的性能问题

2 participants