feat: 添加实例列表右键编辑功能 (#6000) - #6038
Conversation
NWMA-FYWF
commented
May 2, 2026
- 实例列表项支持右键编辑
- 编辑页面名称唯一性验证排除自身
- 路径变化后不再自动修改名称
Glavo
left a comment
There was a problem hiding this comment.
本审查建议由 GPT-5 生成
已将具体审查建议标注在对应代码行。
相关问题已在 提交 9cf13c7 中解决 |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a context menu for profile list items and improves the profile editing page. Key changes include adding weak listeners to ProfileListItem for reactive UI updates, implementing the ProfileListPopupMenu class, and refining validation logic and listener lifecycle management in ProfilePage. Feedback suggests refactoring ProfileListPopupMenu into a utility class to eliminate redundant inheritance and using FXUtils to dynamically calculate popup positions to prevent the menu from being cut off by screen edges.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request enhances the profile management UI by adding a context menu for editing profiles and implementing weak listeners to keep the profile list synchronized with data changes. It also updates the ProfilePage to improve name validation and directory-based name suggestions. Review feedback recommends restricting the registration and removal of name-suggestion listeners to the new profile creation flow to avoid unnecessary overhead during profile edits.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a popup menu for profile items and enhances the profile list with reactive updates for name and directory changes. It also refines the profile editing page to correctly handle existing profiles and name validation. A review comment suggests delaying the removal of listeners in the save method to ensure that automatic renaming remains functional if path validation fails.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85a3e1e8f3
ℹ️ 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".
| menu.getContent().add(new IconedMenuItem( | ||
| SVG.EDIT, | ||
| i18n("button.edit"), | ||
| () -> Controllers.navigate(new GameDirectoryPage(gameDirectory)), |
There was a problem hiding this comment.
Exclude the edited directory from duplicate-name validation
For every user-created directory whose custom name is unchanged, this new edit route opens GameDirectoryPage with that name, but the validator at GameDirectoryPage.java:131-133 finds the same directory in getGameDirectories() and marks the field invalid. Consequently the Save button remains disabled when the user only changes the path or relative-path setting; the duplicate check must ignore gameDirectory itself.
Useful? React with 👍 / 👎.
| menu.getContent().add(new IconedMenuItem( | ||
| SVG.EDIT, | ||
| i18n("button.edit"), | ||
| () -> Controllers.navigate(new GameDirectoryPage(gameDirectory)), |
There was a problem hiding this comment.
Disable automatic name inference when opening the editor
When the selected directory path ends in .minecraft, constructing this edit page immediately invokes locationChangeListener.changed(...) at GameDirectoryPage.java:198, which replaces the existing display name with the parent-directory name at lines 193-195. Thus opening this menu and saving an unrelated path/toggle change can silently rename the directory (including the built-in default directory); name inference should be limited to creation rather than this edit flow.
Useful? React with 👍 / 👎.
…ectly into GameListPage


