- Header: add "+ AI enhancements" italic subtitle below logo
- Footer: update copyright year to 2021–current, add "AI enhancements by Cloud Host" link
- Admin page: wrap all states in pageBg Box so dark-mode background shows correctly
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- buildBatches: groups texts into chunks that fit within 4800 chars
(200 char safety margin) when joined with the separator
- translateLongText: splits individual cells/paragraphs that exceed
the limit at paragraph/sentence boundaries, translates each chunk,
then rejoins — instead of hitting the API with oversized input
- Process batches sequentially to avoid overloading the local model
- Separator fallback still works: if separator gets translated,
falls back to individual calls per text within that batch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
- Build Next.js app during docker build (not on container start) —
fixes yarn cache permission errors and makes container startup instant
- Remove yarn.lock during build so nothing can accidentally invoke yarn
- Add lean runner stage: copies only .next, node_modules, public —
reduces final image size
- npm start is now the only thing that runs at container start
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Assign a fixed subnet (10.100.50.0/24) to lingvai-net so Docker
doesn't try to auto-allocate from its default address pool, which
fails with 'all predefined address pools have been fully subnetted'
on hosts running many containers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace per-service network_mode:bridge with a shared lingvai-net
so lingvai-app can reach lingvai-translator by hostname
- Set LOCAL_MODEL_ENDPOINT=http://lingvai-translator:5000/predictions
and REPLICATE_MODE=local via environment so admin panel defaults
are pre-configured for the local container
- Add depends_on: translator so the app starts after the model is up
- Host port 5030->5000 kept for direct debugging access
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- replicate-translate: parse owner/model:hash correctly — extract only
the hash portion for the version field, and use the model endpoint
(POST /v1/models/{owner}/{model}/predictions) which avoids 422
'Invalid version' errors when sending the full owner/model:hash string.
- Add local Cog mode: when replicateMode="local", calls the local Docker
container directly (no Replicate API key needed), default endpoint
http://localhost:5030/predictions (host port 5030 → container port 5000).
- settings-store: add replicateMode ("cloud"|"local") and localEndpoint
fields with env var fallbacks REPLICATE_MODE and LOCAL_MODEL_ENDPOINT.
- admin panel: Radio selector for Cloud vs Local mode; shows docker run
command snippet and local endpoint URL field when local is selected;
hides Replicate API token field in local mode (not needed).
Local model startup:
docker run -d -p 5030:5000 \
r8.im/jigsawstack/text-translate@sha256:454df4c...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- settings-store: auto-detect writable path at startup — tries
<cwd>/data/settings.json first, falls back to /tmp/lingvai-settings.json
if the directory is not writable. Logs a warning when fallback is used.
Also supports SETTINGS_PATH env var for explicit override.
- Dockerfile: switch from yarn to npm, explicitly create /app/data with
chown nextjs:nodejs so the directory is writable at runtime without
needing a privileged volume mount.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Admin panel (/admin) with JWT auth: configure Replicate API token,
JigsawStack API key, model version, enable/disable AI translation,
change admin password. Settings persisted in data/settings.json.
- Replicate AI translation: POST /api/translate/replicate uses
JigsawStack text-translate model via Replicate API. Main page
switches to client-side AI translation when enabled.
- Document translation tab: supports PDF, DOCX, XLSX, XLS, CSV.
Excel/Word formatting fully preserved (SheetJS + JSZip XML manipulation).
PDF uses pdf-parse extraction + pdf-lib reconstruction.
Column selector UI for tabular data (per-sheet, All/None toggles).
- Updated README with full implementation documentation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>