-
Notifications
You must be signed in to change notification settings - Fork 50
Persistence for generation state #2832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @nighca, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the application's persistence layer by introducing a dedicated application context ( Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a significant refactoring aimed at centralizing project persistence logic. Helper classes (CloudHelpers, LocalHelpers, XbpHelpers) are introduced and provided through a Vue context, which is a great improvement over instantiating them everywhere. The Project class is renamed to SpxProject and its persistence-related methods have been moved to these new helpers. Additionally, history management has been moved from the project model to the EditorState. The file structure for models has also been reorganized under models/spx.
While this is a solid architectural improvement, I've found a critical issue where properties related to asset generation state (spriteGens, backdropGens) have been removed from EditorState but are still being accessed by other components, which will lead to runtime errors. There are also some incomplete implementations for the new generation state persistence feature. Please address these points.
| } | ||
| } | ||
|
|
||
| export class EditorState extends Disposable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The properties spriteGens, backdropGens, and their management methods (addSpriteGen, removeSpriteGen, etc.) have been removed from EditorState. However, other components like SpriteList.vue still access editorCtx.state.spriteGens. This will cause a runtime error. It seems the intention was to move this logic into the new GenManager class, but GenManager is not used within EditorState. These properties should be restored or the dependent components should be updated to use the new GenManager.
| static load(serialized: PhaseSerialized): Phase<unknown> { | ||
| const phase = new Phase(serialized.actionName, serialized.state) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export(): Files { | ||
| // TODO | ||
| return {} | ||
| } | ||
|
|
||
| async load(files: Files) { | ||
| // TODO | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| static async loadAll(files: Files) { | ||
|
|
||
| } | ||
|
|
||
| static async load(files: Files) { | ||
| // TODO | ||
| } | ||
|
|
||
| export(): Files { | ||
| // TODO | ||
| return {} | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close #2579.