Fix module resolution, Docker setup, and UI issues#261
Conversation
Make pino runtime files available to the standalone build so worker threads can resolve their modules. next.config.ts marks pino and related packages (pino-pretty, pino-roll, pino-abstract-transport, thread-stream) as serverExternalPackages so Turbopack doesn't bundle them, and the Dockerfile copies the actual pino-abstract-transport package into the flat node_modules in the final image to avoid "Cannot find module 'pino-abstract-transport'" at runtime. pnpm-lock.yaml updated to reflect the dependency changes.
The ab633d1 commit ran pnpm install which dropped the overrides block from pnpm-lock.yaml while package.json still declares them. This caused Docker build to fail with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH when using --frozen-lockfile.
…target - docker-compose.yml: override SITE_URL=http://localhost:3002, LOG_LEVEL=debug and DATABASE_URL pointing into the mounted ./data volume so the SQLite DB persists across container restarts - .gitignore: add logs/ (data/ was already ignored) - Makefile: add local-test target (mkdir -p guards + compose up with build and log streaming)
When the fetch page shows an error with little content, the footer was floating up instead of sticking to the bottom of the viewport.
Root cause: youtube-dl-exec postinstall runs inside the pnpm cache mount and can write a 'Not Found' placeholder when the GitHub download is rate-limited or fails. Subsequent builds use the cached broken binary → ENOEXEC on every yt-dlp spawn. Fix: add an explicit wget step in the deps stage that always overwrites whatever postinstall put there with the real platform-specific binary, verified with --version. Also: - Remove dead 'node copy-binaries.js' from the dev script (next dev never exits so the copy never ran anyway) - Document in copy-binaries.js that it is for local pnpm start only, not Docker (the .next/server/bin path is outside .next/standalone)
The youtube-dl-exec postinstall downloads a pre-compiled PyInstaller binary (yt-dlp_linux / yt-dlp_linux_aarch64). These are glibc-compiled and cannot execute on Alpine musl without libc6-compat. On ARM64 builds (OrbStack on Apple Silicon) the postinstall also picks the wrong architecture. pnpm's cache mount then freezes the broken binary across rebuilds. Fix: install yt-dlp via pip3 in the runner stage. Python3 is already present (ffmpeg dep), pip3 via py3-pip is architecture-agnostic, and the pinned version is read from .ytdlp-version (stripping leading zeros with awk so 2026.03.17 → 2026.3.17 matches PyPI naming). The pip entry- point script is copied to node_modules/youtube-dl-exec/bin/yt-dlp where selectYtDlpPath() expects it. Also removes the failed wget step added in the previous commit.
When the fetch page shows an error or little content, the stroy-500 blue section ended mid-screen leaving a dark stroy-800 gap before the footer. - main: add flex flex-col so children can grow vertically - fetch section: add flex-1 so it fills remaining space in main
submitUrl() calls setIsLoading(true) then router.push() on success but never calls setIsLoading(false). The component stays mounted across same-route navigations (searchParams change), so isLoading remained true indefinitely — causing the search button to stay stuck in 'Recherche en cours...' even after the video loaded. Fix: useEffect on videoUrl resets isLoading and syncs url state whenever searchParams.videoUrl changes, i.e. when the navigation has completed.
|
Warning Review limit reached
More reviews will be available in 53 minutes and 45 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR updates Docker image setup to install yt-dlp via pip and fixes Next.js standalone module resolution; adds local development commands and docker-compose environment overrides; adjusts Next.js config to declare external packages; and refactors frontend layout to use flexbox-based responsive design with form input synchronization. ChangesBuild, Runtime, and Frontend Layout Updates
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@copy-binaries.js`:
- Around line 8-10: Update the stale header comment in copy-binaries.js that
references Docker downloading yt-dlp in the "deps" stage: change the wording to
state that yt-dlp (and similar Python-installed binaries) are installed in the
Dockerfile's runner stage via pip and therefore the .next/server/bin/ path is
outside .next/standalone and not copied; ensure the comment clearly reflects the
current Dockerfile flow and mentions "runner stage via pip" instead of "deps
stage" so future maintainers are not confused.
In `@Dockerfile`:
- Around line 47-49: The Dockerfile RUN step that computes YTDLP_VERSION and
installs yt-dlp should pass pip's --no-cache-dir to avoid leaving wheel/cache
files in the image; update the pip3 install command in the RUN line (the block
that sets YTDLP_VERSION and calls pip3 install "yt-dlp==${YTDLP_VERSION}") to
include --no-cache-dir so caches aren't persisted in the image layers.
🪄 Autofix (Beta)
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: ASSERTIVE
Plan: Pro
Run ID: bc4a32d8-39b3-4d2e-bdad-d7c124c08f03
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.gitignoreDockerfileMakefileapp/[locale]/fetch/page.tsxapp/[locale]/layout.tsxcomponents/custom/GetterInput.tsxcopy-binaries.jsdocker-compose.ymlnext.config.tspackage.json
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx,js,jsx}: Always useimport { prisma } from '@/lib/prisma'for database access — never instantiatenew PrismaClient(). Prisma 7 requires aPrismaLibSqldriver adapter; bare instantiation throws at runtime.
Do not callprisma.$disconnect()on the shared singleton instance. Calling disconnect on the singleton breaks subsequent requests and cron runs.
Files:
copy-binaries.jscomponents/custom/GetterInput.tsxapp/[locale]/fetch/page.tsxnext.config.tsapp/[locale]/layout.tsx
🪛 Hadolint (2.14.0)
Dockerfile
[warning] 31-31: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>
(DL3018)
[warning] 47-47: Avoid use of cache directory with pip. Use pip install --no-cache-dir <package>
(DL3042)
🔇 Additional comments (10)
Dockerfile (1)
31-46: LGTM!Also applies to: 50-54, 56-70
next.config.ts (1)
8-23: LGTM!Also applies to: 28-33, 54-55
copy-binaries.js (1)
13-23: LGTM!package.json (1)
6-6: LGTM!Makefile (1)
58-68: LGTM!Also applies to: 102-102
.gitignore (1)
50-51: LGTM!docker-compose.yml (1)
11-21: LGTM!Also applies to: 27-27
app/[locale]/layout.tsx (1)
131-131: LGTM!Also applies to: 135-135, 144-144
app/[locale]/fetch/page.tsx (1)
31-31: LGTM!components/custom/GetterInput.tsx (1)
6-6: LGTM!Also applies to: 11-11, 25-32
Summary by CodeRabbit
New Features
make local-testcommand for local Docker testing and smoke tests.Bug Fixes
Chores