From b0f7f30f17189a7c509b021bf33897b3993bca2d Mon Sep 17 00:00:00 2001 From: Malin Date: Tue, 10 Mar 2026 10:00:04 +0100 Subject: [PATCH] fix: replace Progress component with plain Box bar + use npm ci in Docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DocumentTranslator: replace Chakra Progress (broken types in 2.2.1 with fresh installs) with a simple Box-based progress bar — no type issues, same visual result - Dockerfile: switch from npm install to npm ci so Docker uses exact locked versions from package-lock.json, preventing type discrepancies between local and Docker builds Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 3 ++- components/DocumentTranslator.tsx | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d0f615..ee28bfa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ WORKDIR /app COPY package.json package-lock.json* ./ # Skip Cypress binary download — not needed in production ENV CYPRESS_INSTALL_BINARY=0 -RUN npm install --legacy-peer-deps +# Use ci to install exact versions from package-lock.json +RUN npm ci --legacy-peer-deps # ── Stage 2: build the Next.js app ────────────────────────────────────────── FROM node:lts-alpine AS builder diff --git a/components/DocumentTranslator.tsx b/components/DocumentTranslator.tsx index de03647..cb31707 100644 --- a/components/DocumentTranslator.tsx +++ b/components/DocumentTranslator.tsx @@ -1,7 +1,7 @@ import { FC, useState, useCallback, useRef } from "react"; import { Box, Button, VStack, HStack, Text, Input, Alert, AlertIcon, - Progress, Select, Badge, Icon, useColorModeValue + Select, Badge, Icon, useColorModeValue } from "@chakra-ui/react"; import { FiUpload, FiDownload, FiFile } from "react-icons/fi"; import { languageList, LangCode } from "lingva-scraper"; @@ -211,7 +211,9 @@ const DocumentTranslator: FC = () => { {/* Progress */} {stage === "translating" && ( - div": { background: "var(--chakra-colors-lingva-400)" } }} /> + + + Translating… this may take a moment for large documents.