feat: 记录并展示本地整合包实例的版本号 - #1886
Merged
Merged
Conversation
Contributor
Reviewer's GuideAdds support for recording a modpack version when creating an instance and displaying that version in the instances list, by wiring a new optional modpackVersion/modpack_version field through the frontend, Tauri commands, and backend models. Sequence diagram for propagating modpackVersion from import to instances listsequenceDiagram
participant ImportModpackModal
participant InstanceService
participant TauriInvoke as invoke_create_instance
participant CreateInstance as create_instance
participant InstanceSummary
participant InstancesView
ImportModpackModal->>InstanceService: createInstance(directory, name, description, runtimeConfig, modLoaderResourceInfo, modpackPath, isInstallFabricApi, isInstallQfApi, modpack.version)
InstanceService->>TauriInvoke: invoke create_instance{ modpackVersion }
TauriInvoke->>CreateInstance: create_instance(directory, name, runtime_config, modpack_path, is_install_fabric_api, is_install_qf_api, modpack_version)
CreateInstance->>CreateInstance: set instance.modpack_version = modpack_version
CreateInstance->>InstanceSummary: InstanceSummary::from(instance)
InstanceSummary-->>InstancesView: modpack_version
InstancesView->>InstancesView: render titleExtra with modpackVersion
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
createInstancecall inimport-modpack-modal.tsxnow has a long tail of positional optional arguments ending inmodpack.version; consider refactoring this API to use an options object or named parameters to make the call site clearer and less error‑prone when adding more options. - In
InstancesView, themodpackVersionformatting logic (prefixing withv) is embedded in the UI; you might consider normalizing this value at the service/model layer so all consumers get a consistently formatted version string and the view stays simpler.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `createInstance` call in `import-modpack-modal.tsx` now has a long tail of positional optional arguments ending in `modpack.version`; consider refactoring this API to use an options object or named parameters to make the call site clearer and less error‑prone when adding more options.
- In `InstancesView`, the `modpackVersion` formatting logic (prefixing with `v`) is embedded in the UI; you might consider normalizing this value at the service/model layer so all consumers get a consistently formatted version string and the view stays simpler.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
UNIkeEN
approved these changes
Aug 6, 2026
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.
Checklist
This PR is a ..
Related Issues
resolves #1785
Description
Additional Context
Summary by Sourcery
Record and surface modpack version information for local instances, from creation/import through to display in the instances list.
New Features:
Enhancements: