Fix genesis cycle component output path and Three.js materials - #56
Fix genesis cycle component output path and Three.js materials#56Igor Holt (igor-holt) wants to merge 1 commit into
Conversation
- Update PATHS.body to point directly to the mutations directory - Ensure genesis journal log directory exists before appending - Switch to intrinsic React Three Fiber materials to avoid drei import bugs Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
yennefer | d182da3 | Commit Preview URL Branch Preview URL |
Mar 22 2026, 07:13 AM |
Summary of ChangesHello, 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 addresses issues related to the generation and loading of 3D components within the system. It ensures that dynamically created components are saved to the correct location for proper UI integration and standardizes the material usage to native Three.js types, enhancing stability and reducing external dependencies. Additionally, it improves the logging mechanism by guaranteeing that log file directories are always available. Highlights
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 (@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. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request effectively resolves the issues with component output paths and Three.js material dependencies. The changes are clear and address the stated goals. I've included a few suggestions to refactor the new journal logging logic by introducing a helper function. This will centralize the logic, reduce code duplication, and improve overall maintainability. Otherwise, the changes look good.
| function ensureJournalDirectoryExists() { | ||
| const dir = path.dirname(PATHS.journal); | ||
| if (!fs.existsSync(dir)) { | ||
| fs.mkdirSync(dir, { recursive: true }); | ||
| } | ||
| } |
There was a problem hiding this comment.
To avoid duplicating the logic for checking the directory and appending to the journal file, you can create a new helper function that encapsulates this behavior. This will make the code cleaner and easier to maintain by adhering to the DRY (Don't Repeat Yourself) principle. The following comments will show where to use this new function.
function ensureJournalDirectoryExists() {
const dir = path.dirname(PATHS.journal);
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}
}
function appendToJournal(logEntry) {
ensureJournalDirectoryExists();
fs.appendFileSync(PATHS.journal, JSON.stringify(logEntry) + "\n");
}
| ensureJournalDirectoryExists(); | ||
| fs.appendFileSync(PATHS.journal, JSON.stringify(entry) + "\n"); |
| ensureJournalDirectoryExists(); | ||
| fs.appendFileSync(PATHS.journal, JSON.stringify(mutationLog) + "\n"); |
| ensureJournalDirectoryExists(); | ||
| fs.appendFileSync(PATHS.journal, JSON.stringify(errorLog) + "\n"); |
Resolves an issue where procedural 3D components generated by
scripts/genesis.cjs(simulating Project Genie) were saving togenerated/instead ofmutations/, resulting in them not loading in theObservatory.jsxUI. Also refactored the component builder to exclusively use intrinsic Three.js materials to prevent React Three Drei import runtime errors, and ensures log directories are automatically created.PR created automatically by Jules for task 8422478037022723718 started by Igor Holt (@igor-holt)