fix: prevent new projects from overriding global theme setting#583
fix: prevent new projects from overriding global theme setting#583webdevcody merged 2 commits intoAutoMaker-Org:v0.13.0rcfrom
Conversation
When creating new projects, the theme was always explicitly set even when matching the global theme. This caused "Use Global Theme" to be unchecked, preventing global theme changes from affecting the project. Now theme is only set on new projects when explicitly provided or when recovering a trashed project's theme preference.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (7)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @stefandevo, 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 delivers significant improvements to project theme management, ensuring new projects seamlessly inherit global theme settings. It also centralizes loading indicators for a more consistent user experience and refines data handling across different application modes. Key updates include robust GitHub PR state validation, a unified development data directory, and smarter settings synchronization, all contributing to a more stable and developer-friendly application. 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. 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.
Code Review
This pull request effectively resolves the issue of new projects overriding the global theme setting by centralizing theme logic within the app-store. The solution is well-implemented, ensuring that new projects correctly inherit the global theme by default while preserving themes for recovered trashed projects.
Beyond the primary fix, this PR introduces several valuable improvements across the codebase:
- A consistent, reusable
Spinnercomponent has been created and adopted throughout the UI, which greatly improves code maintainability and visual consistency. - Worktree and Pull Request types have been centralized in
@automaker/types, enhancing type safety and code sharing between the server and UI. - The development environment has been significantly improved with unified data directories for Electron and web modes, and more robust session handling for web development.
- Settings synchronization and migration logic has been made more resilient, preventing potential data loss.
Overall, this is an excellent and comprehensive update. I have one minor suggestion for cleanup.
Missed this code path which is used when opening projects from the dashboard after completing setup.
Summary
Fixes an issue where newly created projects would always have their theme explicitly set, even when it matched the global theme. This caused:
Problem
Multiple call sites were calculating an
effectiveThemeand passing it toupsertAndSetCurrentProject, which always stored it asproject.theme. The design expectstheme: undefinedto mean "use global", but code never left it undefined.Solution
app-store.ts'supsertAndSetCurrentProjectactiontheme-step.tsxnow clears the project theme instead of setting it, ensuring "Use Global Theme" stays checkedFiles Changed
app-store.tsuse-project-creation.tssidebar.tsxproject-switcher.tsxwelcome-view.tsxtheme-step.tsxTest Plan