feat: project genie integration#77
Conversation
Integrates the dynamically generated interactive 3D capabilities from Google's Project Genie into the continuous Yennefer loop by updating `scripts/genesis.cjs`. Mutates the `generateEvolutionComponent` to include logic to force Genie-like continuous mutations. Update the path resolution for mutations to be written directly to the `mutations/` directory rather than `generated/`. Add sandbox/CI fallback for journal logging path. 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 | ed27d61 | Commit Preview URL | May 02 2026, 08:13 AM |
There was a problem hiding this comment.
Code Review
This pull request introduces "GenieWorld" simulations, including dynamic landscapes and makerspace environments, and adds a fallback mechanism for the journal path to support CI environments. Feedback was provided to make the mutation selection logic more robust, optimize vertex manipulation performance in the landscape simulation, and ensure that additional meshes in the makerspace simulation correctly inherit parent transformations.
| const idx = isGenieSim | ||
| ? Math.floor(Math.random() * 2) + (mutations.length - 2) | ||
| : Math.floor(Date.now() / 1000) % mutations.length; |
There was a problem hiding this comment.
The logic for selecting Genie mutations is brittle as it relies on the assumption that they are always the last two elements of the mutations array. If the array is reordered or new mutations are appended, this logic will break or select incorrect prompts.
const genieIndices = mutations.map((m, i) => m.content.includes("landscape") || m.content.includes("makerspace") ? i : -1).filter(i => i !== -1);
const idx = isGenieSim && genieIndices.length > 0
? genieIndices[Math.floor(Math.random() * genieIndices.length)]
: Math.floor(Date.now() / 1000) % mutations.length;
| const positions = meshRef.current.geometry.attributes.position; | ||
| for (let i = 0; i < positions.count; i++) { | ||
| const x = positions.getX(i); | ||
| const y = positions.getY(i); | ||
| const z = Math.sin(x * 2 + state.clock.elapsedTime) * 0.5 + Math.cos(y * 2 + state.clock.elapsedTime) * 0.5; | ||
| positions.setZ(i, z * Math.min(1, balance * 2)); | ||
| } | ||
| positions.needsUpdate = true; |
There was a problem hiding this comment.
Modifying geometry attributes by calling getX, getY, and setZ in a loop inside useFrame is inefficient for performance, especially as the number of segments increases. Accessing the underlying Float32Array directly is significantly faster.
const attr = meshRef.current.geometry.attributes.position;
const pos = attr.array;
for (let i = 0; i < pos.length; i += 3) {
const x = pos[i];
const y = pos[i + 1];
pos[i + 2] = (Math.sin(x * 2 + state.clock.elapsedTime) + Math.cos(y * 2 + state.clock.elapsedTime)) * 0.5 * Math.min(1, balance * 2);
}
attr.needsUpdate = true;
| <mesh ref={meshRef}> | ||
| ${geometry} | ||
| ${material} | ||
| </mesh> | ||
| ${additionalMeshes} |
There was a problem hiding this comment.
In the makerspace simulation, the additionalMeshes (the red box and blue sphere) are currently siblings of the main mesh. Since the customLogic only applies rotation to meshRef.current, the workbench top will rotate while the objects on it remain static in mid-air. Moving them inside the main mesh component will ensure they inherit the parent's transformation.
<mesh ref={meshRef}>
${geometry}
${material}
${additionalMeshes}
</mesh>
* Fix the CI failure by passing the `--legacy-peer-deps` flag to the npm install * Prevent Cloudflare Workers Builds CI check failures by removing the placement mode. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Renames `workers/index.js` to `workers/index.mjs` to match the entry point ESM requirement. * Modifies `wrangler.toml` to configure `workers/index.mjs` and compatibility date. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Update `wrangler.toml` to build from `yennefer-observatory` rather than `frontend` which was throwing errors. * Sets static assets directory to `yennefer-observatory/dist`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Integrates the dynamically generated interactive 3D capabilities from Google's Project Genie into the continuous Yennefer loop.
PR created automatically by Jules for task 4533367094448095881 started by Igor Holt (@igor-holt)