Serve catalog meshes from manifest base64 data#456
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
|
Caution Review failedThe pull request is closed. WalkthroughA mesh catalog system is introduced with backend routes serving metadata and binary GLB data, a refactored Three.js-based 3D viewer component with transform controls and width tracking, a manifest-driven configurator store managing mesh variants and transforms, updated manifest with expanded metadata and variant definitions, and reference GLB generation scripts producing variants with descriptor metadata and manifest entries. Changes
Sequence Diagram(s)sequenceDiagram
participant Frontend as Frontend (Viewer3D)
participant Store as Store<br/>(Configurator)
participant Manifest as Manifest<br/>(JSON)
participant Backend as Backend<br/>(Routes)
participant GLB as GLB Parser
rect rgb(240, 248, 255)
note over Frontend,Manifest: Initialization Phase
Frontend->>Store: loadMeshManifest()
Store->>Manifest: fetch(/models/manifest.json)
Manifest-->>Store: manifest data
Store->>Store: computeMeshTransform<br/>per variant
Store-->>Frontend: meshTransforms ready
end
rect rgb(245, 245, 220)
note over Frontend,Backend: Mesh Loading Phase
Frontend->>Frontend: selectPrimaryEntry(variantId)
Frontend->>Frontend: useMeshObjectUrl<br/>(meshBase64)
Frontend->>Frontend: render LoadedModel<br/>with ObjectURL
end
rect rgb(255, 250, 240)
note over Frontend,Backend: Optional: Binary Download
alt User requests GLB download
Frontend->>Backend: GET /{variant_id}/mesh.glb
Backend->>GLB: parse variant manifest
GLB-->>Backend: binary GLB data
Backend-->>Frontend: application/gltf-binary
end
end
rect rgb(240, 255, 240)
note over Frontend,Store: Width Update Phase
Frontend->>Frontend: TransformControls<br/>change event
Frontend->>Store: setMeshWidth(variantId, newWidth)
Store->>Store: computeMeshTransform<br/>with override
Store-->>Frontend: updated transform
Frontend->>Frontend: onWidthChange(newWidth)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes The PR introduces heterogeneous changes across backend routes, frontend components, state management, and build scripts. Key complexity drivers: (1) mesh data pipeline with parsing, error handling, and manifest integration; (2) new 3D viewer component with Three.js/Fiber hooks and transform controls; (3) configurator store redesign with variant descriptors and dynamic width computation; (4) manifest schema restructuring; (5) test refactoring. While each cohort follows consistent patterns, the breadth of affected systems and mixture of logic densities (backend route handlers, frontend component hooks, store computations) requires thorough cross-system reasoning. Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (10)
Comment |
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @shayancoin. * #456 (comment) The following files were modified: * `backend/api/routes_catalog.py` * `backend/tests/test_routes_catalog.py` * `frontend/src/app/components/Viewer3D.tsx` * `frontend/src/app/configurator/page.tsx` * `scripts/generate_reference_glbs.py`
Docstrings generation was requested by @shayancoin. * #456 (comment) The following files were modified: * `backend/api/routes_catalog.py` * `backend/tests/test_routes_catalog.py` * `frontend/src/app/components/Viewer3D.tsx` * `frontend/src/app/configurator/page.tsx` * `scripts/generate_reference_glbs.py` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
https://github.com/shayancoin/paform/blob/934b2fe63ff94905a9584599abf41528fe540cdf/frontend/src/app/kitchen-configurator/[sku]/page.tsx#L33-L42
Update kitchen-configurator to use manifest-backed meshes
The commit removes the actual GLB binaries and switches the viewer to decode meshes from the manifest, but this route still uses useGLTF('/models/${sku}.glb') and preloads /models/BaseCabinet600.glb. Those URLs now serve 0‑byte placeholders, so the kitchen configurator will fail to render or throw when GLTF parsing encounters an empty file. This page should fetch the mesh from the same manifest/variant API introduced elsewhere (or otherwise restore the GLB assets) to keep the configurator functional.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68f60d2d91d883309f0f0d24abd8d594
Summary by CodeRabbit