fix(web): increase build memory to 8GB and support smooth-scroll in IframeSection
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🏗️ Build (push) Successful in 16m45s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 QA (push) Successful in 1m9s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 3m9s
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-04-10 11:37:09 +02:00
parent 7e9005e338
commit 49abaaf2fd
6 changed files with 45 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ RUN echo "Building with ID: ${BUILD_ID}"
COPY . .
# Build application (monorepo filter)
ENV NODE_OPTIONS="--max_old_space_size=4096"
ENV NODE_OPTIONS="--max_old_space_size=8192"
RUN pnpm --filter @mintel/web build
# Stage 2: Runner

View File

@@ -1,7 +1,7 @@
FROM node:20-alpine
# Install essential build tools if needed (e.g., for node-gyp)
RUN apk add --no-cache libc6-compat python3 make g++
RUN apk add --no-cache libc6-compat git python3 make g++
WORKDIR /app

View File

@@ -196,11 +196,13 @@ export const IframeSection: React.FC<IframeSectionProps> = ({
const updateScrollState = React.useCallback(() => {
try {
const win = iframeRef.current?.contentWindow;
const doc = iframeRef.current?.contentDocument?.documentElement;
if (doc) {
const atTop = doc.scrollTop <= 5;
if (doc && win) {
const scrollTop = doc.scrollTop || win.scrollY || 0;
const atTop = scrollTop <= 5;
const atBottom =
doc.scrollTop + doc.clientHeight >= doc.scrollHeight - 5;
scrollTop + doc.clientHeight >= doc.scrollHeight - 5;
const isScrollable = doc.scrollHeight > doc.clientHeight + 10;
setScrollState({ atTop, atBottom, isScrollable });
}

View File

@@ -31,6 +31,7 @@ services:
# - CI=true
- NPM_TOKEN=${NPM_TOKEN:-}
- DATABASE_URI=postgres://${postgres_DB_USER:-payload}:${postgres_DB_PASSWORD:-payload}@postgres-db:5432/${postgres_DB_NAME:-payload}
- QDRANT_URL=http://qdrant:6333
- PAYLOAD_SECRET=dev-secret
command: >
sh -c "pnpm install --no-frozen-lockfile && pnpm --filter @mintel/web dev"

36
scripts/visual_debug.mjs Normal file
View File

@@ -0,0 +1,36 @@
import puppeteer from 'puppeteer';
(async () => {
// Launch browser
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
// Set viewport
await page.setViewport({ width: 1920, height: 1080 });
try {
console.log("Navigating to case study page...");
await page.goto('https://mintel.me/case-studies/klz-cables', { waitUntil: 'networkidle2' });
console.log("Waiting a bit for iframes to load...");
await new Promise(r => setTimeout(r, 5000));
// Let's get console logs from the page too
page.on('console', msg => console.log('PAGE LOG:', msg.text()));
console.log("Taking screenshot...");
await page.screenshot({ path: '/Users/marcmintel/Projects/mintel.me/screenshot_case_study.png', fullPage: true });
// Also take a screenshot of the actual showcase HTML page directly to compare
console.log("Navigating directly to showcase HTML...");
await page.goto('https://mintel.me/showcase/klz-cables.com/power-cables-medium-voltage-cables.html', { waitUntil: 'networkidle2' });
await new Promise(r => setTimeout(r, 3000));
await page.screenshot({ path: '/Users/marcmintel/Projects/mintel.me/screenshot_showcase.png', fullPage: true });
console.log("Done!");
} catch (e) {
console.error("Error:", e);
} finally {
await browser.close();
}
})();

1
wget_out.txt Normal file
View File

@@ -0,0 +1 @@
zsh:1: command not found: wget