Merged
Conversation
Yuki-Nagori
reviewed
Mar 30, 2026
MoonL79
reviewed
Mar 30, 2026
Greptile Summary本 PR 实现了版本更新提示功能:应用启动 10 秒后自动检查远端版本,若有新版本则在窗口顶部显示提示条,支持"立即更新"(跳转官网)、"稍后提醒"(3天后再提示)和"关闭"三种操作。 主要变更:
遗留的小问题(均为 P2,不影响功能):
Confidence Score: 5/5本 PR 可以安全合并,之前反馈的所有 P0/P1 问题均已修复 之前审查中发现的所有严重问题(mock 值未还原、头文件声明无实现、链接错误)均已得到修复;剩余问题为 P2 级别的代码整洁性建议,不影响功能正确性和可构建性 TeXmacs/progs/utils/misc/version-update.scm(死代码常量)和 src/Plugins/Qt/qt_tm_widget.cpp(m_remoteVersion 冗余字段)值得关注,但不阻碍合并 Important Files Changed
Sequence DiagramsequenceDiagram
participant App as 应用启动
participant Timer as QTimer (10s)
participant Widget as qt_tm_widget_rep
participant Scheme as version-update.scm
participant Net as QNetworkAccessManager
participant Bar as UpdateNotificationBar
App->>Timer: singleShot(10000)
Timer->>Widget: checkVersionUpdate()
Widget->>Scheme: should-check-version-update?
Scheme-->>Widget: true / false
alt 处于稍后提醒期间
Widget-->>App: 返回,不显示
else 可以检查
Widget->>Scheme: get-mock-remote-version
Scheme-->>Widget: #f 或 mock版本字符串
alt 有 mock 版本
Widget->>Widget: isVersionNewer(mock, local)
Widget->>Bar: setVersionInfo() + show()
else 无 mock,发起网络请求
Widget->>Net: GET /mogan_latest_version.tm 或 /latest_version.tm
Net-->>Widget: 响应数据
Widget->>Widget: parseVersionFromTM(data)
Widget->>Widget: isVersionNewer(remote, local)
Widget->>Bar: setVersionInfo() + show()
end
end
Bar-->>Widget: updateNowRequested
Widget->>Scheme: get-update-download-url
Scheme-->>Widget: mogan.app 或 liiistem.cn URL
Widget->>App: open_url(url)
Bar-->>Widget: snoozeRequested
Widget->>Scheme: snooze-version-update
Widget->>Bar: hide()
Bar-->>Widget: closeRequested
Widget->>Bar: hide()
Reviews (8): Last reviewed commit: "翻译按照字母排序" | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.