[Feature] 模组等的更新日志以及 HTMLRenderer 的完善#6098
Conversation
# Conflicts: # HMCL/src/main/resources/assets/lang/I18N.properties # HMCL/src/main/resources/assets/lang/I18N_es.properties # HMCL/src/main/resources/assets/lang/I18N_ja.properties # HMCL/src/main/resources/assets/lang/I18N_lzh.properties # HMCL/src/main/resources/assets/lang/I18N_ru.properties # HMCL/src/main/resources/assets/lang/I18N_uk.properties # HMCL/src/main/resources/assets/lang/I18N_zh.properties # HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModUpdatesPage.java
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AddonUpdatesPage.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java # HMCLCore/src/main/java/org/jackhuang/hmcl/mod/LocalModFile.java # HMCLCore/src/main/java/org/jackhuang/hmcl/util/StringUtils.java
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a changelog viewing system for mods and addons, incorporating the CommonMark library for Markdown-to-HTML conversion and significantly upgrading the HTMLRenderer to support tables, code blocks, and asynchronous image loading. UI updates in AddonUpdatesPage and DownloadPage enable users to access changelogs and external version URLs. Feedback points out potential memory leaks in JavaFX property bindings to static controllers, code duplication across changelog dialog implementations, and the need for more robust error handling when generating repository URLs to prevent UI crashes.
Glavo
left a comment
There was a problem hiding this comment.
本审查建议由 GPT-5 生成
已将具体审查建议标注在对应代码行。
Co-authored-by: CiiLu <109708109+ciilu@users.noreply.github.com>
|
现在需要重新解决表格过大的问题 |
Solved |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for fetching and rendering addon changelogs and version page URLs, integrating the commonmark library for Markdown parsing, and upgrading HTMLRenderer to handle tables, ordered lists, and code blocks. The review feedback identifies several critical and high-severity issues, including potential NullPointerExceptions in HTMLRenderer and CurseForgeRemoteModRepository, and JavaFX CSS parser warnings from unmapped CSS properties. Additionally, it suggests addressing virtualization issues in AddonUpdatesPage's table cells and simplifying stage size bindings using standard JavaFX properties.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b825b3df6
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for fetching and rendering addon changelogs from CurseForge and Modrinth, utilizing CommonMark and Jsoup to parse and display HTML/Markdown content. It also generalizes several UI components from 'Mod' to 'Addon' and adds a new auto-sizing table utility. The review feedback highlights several critical stability issues, primarily potential NullPointerException risks when fetching cell factories, table headers, row values, or handling null API responses. Additionally, feedback points out the need for non-negative bounds checks on image width calculations and case-insensitive handling of inline CSS properties.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
我用我的CC(接入DSV4)审查一下 顺便看看我那个SKILL怎么样 |
Minecraft269
left a comment
There was a problem hiding this comment.
🤖 PR 审查报告 — PR #6098
审查模型: DeepSeek V4 (DeepSeek-V4-Pro)
审查维度: 安全漏洞 · 错误处理 · 类型设计 · API 设计
变更规模: 25 文件,+842 / −142 行
具体问题和修复建议已在上方代码行的 inline comment 中标注。以下为汇总。
📊 汇总
| 严重性 | 数量 | 类别 |
|---|---|---|
| 🔴 Critical | 5 | 2 安全 + 3 静默失败 |
| 🟠 Important | 6 | 类型设计 + 健壮性 + 一致性 |
| 🟡 Suggestion | 4 | 代码质量 |
✅ 正面发现
- HTMLRenderer 从旧式 switch 迁移到 switch expression — 代码现代化
- 图像加载同步→异步 — 修复阻塞 UI 的正确方向
- Markdown 支持丰富 (Autolink/Strikethrough/Tables/Ins)
- 链式调用 API (
return this) — 非破坏性流畅接口 - SEMAPHORE 资源管理一致、正确
- 多语言支持周到(含文言文)
核心建议: 优先修复 C1(XSS绕过) + C2(URI方案注入) 两个安全漏洞,以及 C3/C4/C5 三个静默失败。
🤖 Generated with Claude Code | 审查引擎: DeepSeek V4
添加了下载模组、数据包等以及更新模组时显示更新日志的功能
Resolves #4685
具体变化:
HTMLRenderer的优化与完善,以及对 Markdown 的支持(引入了新依赖)TODO: