add fix for build error - #77
Conversation
…nd-generator-updates feat: consolidate CORS, harden looney-check rate limiting, and fix resource handling
|
@Coder-soft is attempting to deploy a commit to the yamura3's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe PR adds an August 2026 release post, updates navigation badges, synchronizes Background Generator card heights with ChangesRelease updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 Warning |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/BackgroundGenerator.tsx`:
- Line 133: Replace the measurement effect in BackgroundGenerator with
useLayoutEffect, using the existing preview-card measurement and
--preview-card-height update logic so the CSS variable is set before the first
repaint. Add the required React import and preserve the current dependencies and
cleanup behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c9a70553-d819-4aa8-b3d3-76bd58993926
⛔ Files ignored due to path filters (2)
bun.lockis excluded by!**/*.lockpackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
release-blog-looney-check.mdsrc/components/Footer.tsxsrc/components/Navbar.tsxsrc/pages/BackgroundGenerator.tsxvercel.json
| const [isRecording, setIsRecording] = useState(false); | ||
| const [recordingProgress, setRecordingProgress] = useState(0); | ||
| const [isLoadingTextures, setIsLoadingTextures] = useState(true); | ||
| const [previewCardHeight, setPreviewCardHeight] = useState<number | null>(null); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
files="$(fd -a -t f . | rg '(^|/)(package\.json|vite\.config\..*|next\.config\..*|src/(main|entry).*\.(c|m)?[jt]sx?|server.*\.(c|m)?[jt]s)$' || true)"
[ -z "$files" ] && exit 0
while IFS= read -r file; do
rg -n 'createRoot|hydrateRoot|renderToString|renderToPipeableStream|renderToReadableStream|react-dom/server' "$file" || true
done <<< "$files"Repository: creatorcluster/renderdragon.org
Length of output: 234
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- component structure ---'
file="$(fd -a -t f 'BackgroundGenerator\.tsx$' | head -n 1)"
[ -n "$file" ]
sed -n '1,210p' "$file"
printf '%s\n' '--- entry and dependency context ---'
fd -a -t f . | rg '(^|/)(package\.json|src/(main|entry).*\.(c|m)?[jt]sx?)$' |
while IFS= read -r path; do
printf '\n--- %s ---\n' "$path"
sed -n '1,100p' "$path"
doneRepository: creatorcluster/renderdragon.org
Length of output: 12940
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file="$(fd -a -t f 'BackgroundGenerator\.tsx$' | head -n 1)"
[ -n "$file" ]
printf '%s\n' '--- preview-card references and responsive classes ---'
rg -n -C 8 'previewCardRef|previewCardHeight|--preview-card-height|md:h-\[var\(--preview-card-height\)\]|md:max-h' "$file"
printf '%s\n' '--- relevant CSS custom-property and height rules ---'
rg -n -C 3 --glob '*.css' -- '--preview-card-height|preview-card-height|md:h-|max-height' .Repository: creatorcluster/renderdragon.org
Length of output: 4114
Measure the preview card with useLayoutEffect.
The app uses client-only ReactDOM.createRoot, so an SSR wrapper is not required. Replace the measurement effect with useLayoutEffect to set --preview-card-height before the first repaint.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/pages/BackgroundGenerator.tsx` at line 133, Replace the measurement
effect in BackgroundGenerator with useLayoutEffect, using the existing
preview-card measurement and --preview-card-height update logic so the CSS
variable is set before the first repaint. Add the required React import and
preserve the current dependencies and cleanup behavior.
Greptile SummaryThis change standardizes Vercel dependency installation on pnpm, moves navigation badges, makes the background-generator controls follow the preview height, and adds an August release announcement draft. The background generator currently falls back to an error page when T-Rex validation blocked
Confidence Score: 3/5This change is not ready to merge until the generator has a fallback for unavailable Two independent user-facing failures remain. Browser rendering reproduced the generator error fallback, and a successful production build plus an ingestion check established that the announcement Markdown does not reach the public blog. Files Needing Attention:
What T-Rex did
|
| }; | ||
|
|
||
| updatePreviewCardHeight(); | ||
| const observer = new ResizeObserver(updatePreviewCardHeight); |
There was a problem hiding this comment.
Missing ResizeObserver crashes the generator
BackgroundGenerator constructs ResizeObserver unconditionally. In browsers and embedded WebViews that do not implement this API, mounting /background-generator throws before the page can render and the application error fallback is shown. Keep the initial height measurement, but create and register the observer only when ResizeObserver is available, or provide a compatible fallback.
| @@ -0,0 +1,68 @@ | |||
| # RenderDragon August 2026 Update: Check Your Music, Then Go Animate | |||
There was a problem hiding this comment.
Release announcement is not published
This root-level Markdown file is not consumed by the build or application. The public blog listing and detail pages load only published rows from Supabase, so deploying this change will not make the August announcement appear on the site. Publish the announcement through the blog administration flow or add an explicit, tested content-ingestion path that creates a published blog record.
Summary by CodeRabbit