Commit Graph

107 Commits

Author SHA1 Message Date
b067be2ff7 fix: deploy.sh auto-selects compose file, docker-compose.yml uses correct Stripe var names
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m16s
2026-05-31 21:51:38 +02:00
c7c1fd8436 fix: deploy.sh migrate works without .env.docker on production
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m59s
2026-05-31 21:45:55 +02:00
374c605027 feat: Stripe integration complete - products created, DB migration, payment_failed handler, credit buttons wired
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m5s
- Create Stripe products/prices (Starter/Pro/Business monthly+yearly)
- Fix CRITICAL bug: add subscription_ends_at + cancel_at_period_end columns to users table
- Alembic migration: f6a7b8c9d0e1_add_subscription_ends_at_cancel_at_period_end
- Fix: implement handle_payment_failed() to set subscription_status=PAST_DUE
- Fix: harmonize .env.production Stripe variable names to match pricing_config.py
- Fix: add missing FRONTEND_URL and STRIPE_PUBLISHABLE_KEY to .env.production
- Add all Stripe Price IDs (test mode) to .env.production
- Wire credit purchase buttons to /api/v1/auth/create-credits-checkout
- Dashboard sync post-checkout was already implemented (no change needed)

Stripe test keys: configured in .env.production
Webhook: must be configured on server via stripe CLI or Stripe Dashboard
Webhook URL: https://wordly.art/api/v1/auth/webhook/stripe
2026-05-31 21:40:31 +02:00
3a9de12f26 fix: glossary cards UX - boutons clairs, badge compatible/incompatible, alerte cible dans sidebar
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m39s
2026-05-31 13:46:13 +02:00
d657b65adb fix: FORMAT NATIF hors cadre, apercu glossaire toujours FR/IR, prompt juridique par defaut
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m32s
2026-05-31 13:29:12 +02:00
85cd5456f8 feat(glossaries): add target_language support - DB migration, API, and UI language pair display
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m52s
2026-05-31 13:25:12 +02:00
fecb3f7abb ux(glossaries): add how-it-works guide, status badges and activation hints
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m41s
2026-05-31 13:02:19 +02:00
6d800b1077 design(frontend): align glossaries page typography with translation page editorial style
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m44s
2026-05-31 11:36:55 +02:00
f33da82c29 fix(frontend): improve glossary selector responsiveness and add contextual warning logic
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 3m10s
2026-05-31 11:24:52 +02:00
58d9d8a74c fix(frontend): increase translation config legibility and integrate templates in glossary selector
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m31s
2026-05-31 11:18:57 +02:00
3f635e809e feat(translate): implement intelligent language filtering and creation links for glossaries
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m34s
2026-05-31 11:09:56 +02:00
8ab45f1b6e style(translate): make LLM cards compact in a 3-column grid, remove glossary language filtering, and add contextual help under engine selection
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m58s
2026-05-31 11:05:34 +02:00
cd8a57324d style(translate): redesign glossary and translate images card layout to match mockup compact styling
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m31s
2026-05-31 10:58:22 +02:00
a5b18b5a24 fix(pdf): add support for translate_images to PDFTranslator to fix API mismatch
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m36s
2026-05-31 10:36:30 +02:00
78eca6d453 feat(translate): refonte complete du composant GlossarySelector (Etape 4)
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
2026-05-31 10:33:57 +02:00
a0de00a4e7 fix(translate): ajout des cles de traduction manquantes et re-positionnement intelligent du bouton de traduction
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m41s
2026-05-31 10:28:12 +02:00
c1ea65f10f feat(translate): refonte du design de la page de traduction et du sélecteur de moteurs (Etapes 1-3)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m12s
2026-05-31 10:14:23 +02:00
9532fef2cd fix: remove DeepSeek/MiniMax branding, fix glossary visibility, improve translate page UX
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m7s
- US1: Replace exposed provider names (DeepSeek V3 → IA Express, MiniMax → IA Avancée)
  in legacy_routes.py, remove 52 DeepSeek references from i18n pricing/landing keys,
  add generic modelName key across all 13 languages
- US2: Fix glossary selector filtering (fallback to all glossaries when source lang
  filter returns empty), show templates by default, fix 3 broken presets
  (hvac/construction/automotive → hr/scientific/ecommerce)
- US3: Replace 15 hardcoded French strings with i18n t() calls, increase font sizes
  from 8-9px to 11px, improve text contrast (opacity /20→/40, /25→/45, /30→/50)
- US4: Add missing provider labels in admin ProviderStatus (deepseek, minimax, zai,
  google_cloud, openrouter, openrouter_premium)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 08:24:33 +02:00
b472dcd4b7 style: apply Inter + Playfair Display fonts matching reference landing page
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m16s
- Add Playfair Display as serif font via next/font/google
- Hero headings: font-serif font-medium tracking-tight (was font-extrabold uppercase)
- Body text: font-light (was font-medium)
- Section headings: font-serif tracking-tight (was heavy sans-serif)
- Pricing titles: font-serif font-medium (was font-black uppercase)
- CTA button: rounded-[32px] larger pill style
- Overall softer, more editorial feel matching architectural-grid reference

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 13:45:44 +02:00
03cf4cd276 fix: show current language flag instead of next language in landing page button
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m24s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 13:36:58 +02:00
4b52f4d9df fix: fallback to free Google Translate when Cloud API key is invalid/blocked
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m5s
Google Cloud Translation API was returning "Requests to this API are
blocked" which got wrapped as a misleading "Erreur lors de la lecture
du fichier PowerPoint". Now probes the key once (cached 10min) and
falls back to deep_translator (free) when the Cloud key is invalid.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 00:02:29 +02:00
bacbf6cce8 fix: compact glossary dropdown, sticky translate button, and mode badge
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m10s
- Restructure right sidebar as flex-col with scrollable config and
  fixed translate button (never scrolls away)
- Replace expanded GlossarySelector list with compact dropdown (~80px
  instead of ~400px), collapsible templates section, click-outside close
- Add visible Classic/IA mode badge after provider selector with hint
  about glossary availability for Pro users in classic mode

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 21:41:16 +02:00
f1dc4c0b0b fix: remove garbage esenaw api key
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m17s
2026-05-17 20:28:52 +02:00
e41dca6fe3 fix: cache headers and frontend pro tier resolution
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m34s
2026-05-17 20:06:26 +02:00
590d4347f7 fix: ignore stale pro features (glossary/prompt) from frontend localstorage for free users instead of blocking translations
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m17s
2026-05-17 19:09:00 +02:00
10c9a14487 fix: ignore string literals 'null' and 'undefined' from frontend form data for optional fields
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m35s
2026-05-17 18:52:44 +02:00
6a6b510e56 fix: remaining multiline logger job_id errors and prevent grafana removal during deploy
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m34s
2026-05-17 18:32:32 +02:00
3a901548a0 fix: logger keyword argument error with job_id in translate routes
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
2026-05-17 18:30:37 +02:00
f6818924b1 fix: resolve alembic multiple head revisions by fixing migration tree
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m9s
2026-05-17 18:02:02 +02:00
4ec39a42a8 fix: prevent docker compose from consuming stdin in ssh deploy script
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m14s
2026-05-17 17:31:19 +02:00
63aeb5978d fix: disable silent google cloud fallback to expose true provider errors
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2s
2026-05-17 17:25:00 +02:00
b50419e2ec fix: integrate deepseek, resolve silent google api errors, fix google cloud keys
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2s
2026-05-17 17:11:06 +02:00
669cf7fde8 fix(ui): critical translation workflow improvements
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2s
- Extracted Translate button to sticky bottom wrapper (always visible)
- Added humanFriendlyError mapper for readable error messages
- Added 'Réessayer' and 'Nouveau fichier' buttons to FAILED state
- Hid GlossarySelector for non-Pro users
- Fixed silent failure: attempted=0 now fails explicitly
2026-05-17 16:54:59 +02:00
3e41bee470 fix: remove Ollama from all default fallback chains - cloud-only defaults
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2s
2026-05-17 16:43:17 +02:00
087341b045 fix: Google Cloud API translation key environment and fallback logic
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2s
2026-05-17 16:13:05 +02:00
c0f93501cc fix: use Google Cloud API key for classic mode + translation verification
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2s
Two critical fixes:

1. Provider "google" (default classic mode) now checks for a Google Cloud
   API key (GOOGLE_CLOUD_API_KEY in env or admin settings). If present,
   uses GoogleCloudTranslationProvider (official API). Previously it
   always fell through to deep_translator (free scraper) which gets
   blocked in production, silently returning untranslated text.

2. Added translation verification: each translator now tracks how many
   texts were attempted vs actually changed. If 0 texts were translated,
   the job is marked as FAILED with a clear error message instead of
   returning the original file as "completed".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:09:26 +02:00
6c0ecded47 fix: automatic DB migration — run before backend starts
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 3s
Three fixes to ensure alembic migrations always run in production:

1. entrypoint.sh: add `exec "$@"` passthrough so `docker compose run
   --rm backend alembic upgrade head` actually runs alembic instead of
   ignoring args and starting uvicorn.

2. entrypoint.sh: remove `|| echo` fallback on alembic — if migration
   fails the container must stop, not silently continue.

3. deploy.yml: start only postgres+redis first, run migration, THEN
   start backend. Previously the backend started before migration,
   ran with stale schema, and the separate migration step was broken
   by the entrypoint bug.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 11:03:42 +02:00
413f610f1a feat: production CI/CD with DB backup and auto-rollback
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2s
8-step pipeline:
1. Git pull
2. pg_dumpall + gzip backup (keep last 10)
3. Build images (with cache)
4. Start services
5. Wait for postgres
6. Run alembic migration (one-shot container)
   - On failure: auto-restore DB from backup
7. Health check backend
   - On failure: auto-rollback DB + restart
8. Summary with backup path

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 10:02:36 +02:00
392418c3f9 fix: run alembic migration in one-shot container before backend start
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m1s
- Use 'docker compose run --rm backend alembic upgrade head' to run
  migration in a throwaway container (doesn't need backend running)
- Restore entrypoint migration fallback (don't block startup)
- Restart backend after migration to pick up schema changes
- Remove --no-cache (too slow, was causing timeouts)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 09:59:20 +02:00
f409ccc647 fix: force --no-cache on docker build to pick up all dependency changes
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 2m39s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 01:38:07 +02:00
ee65428fa8 fix: make alembic migration mandatory — fail deploy if migration fails
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 2m15s
Removed silent fallback that was hiding migration failures.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 01:32:35 +02:00
3069cf5928 fix: add explicit alembic migration step to CI pipeline
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 52s
Entrypoint migration can fail silently. Now runs explicitly:
  1. Wait for postgres
  2. alembic upgrade head (explicit, fails the deploy if broken)
  3. Wait for backend healthy

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 01:28:55 +02:00
7f8a08af7b fix: add source_language to glossary import + expose error details
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 52s
- Set source_language from template data during import
- Return actual error message instead of generic one for debugging

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 01:24:11 +02:00
3eb418e7ec fix: send template_id as query param (not JSON body) for glossary import
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m19s
The backend expects template_id as a Query parameter, but the frontend
was sending it as a JSON body — causing validation error on every click.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 01:14:54 +02:00
6ba39cc01b fix: glossary selector — clear selected state, error feedback, click existing templates to select
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m33s
- Round check icon on selected glossary (unmissable)
- Error banner when import fails (no more silent spinner)
- Click template that already exists = select it (no re-import)
- Single fetch for glossaries + templates (faster load)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 01:11:18 +02:00
9843023c4c fix: improve glossary selector click feedback — check icon, deselect X, visible selected state
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m37s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 01:04:20 +02:00
ca8abc560d feat: multilingual glossary templates + inline GlossarySelector rewrite
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m28s
- Enriched 8 glossary templates with 18,191 translations across 11 languages
  using LLM batch generation + back-translation validation (99.98% confirmed)
- Rewrote GlossarySelector as inline section with template creation
- Fixed sidebar duplicate (single Glossaries link with proOnly flag)
- Added glossaryId reset when sourceLang changes
- Always show GlossarySelector (locked with Pro badge for free users)
- Added source_language flag on glossary cards
- Redirected /dashboard/context to /dashboard/glossaries
- Updated import endpoint to read translations from templates
- Added enrichment script (scripts/enrich_glossary_templates.py)
- Added 6 i18n keys across all 13 locales

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 00:52:24 +02:00
9be640c449 feat: merge Context page into Glossaries — single page for glossary + system prompt + presets
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m30s
- Add system prompt textarea and professional presets (HVAC, IT, Legal, etc.) to Glossaries page
- Remove Context from sidebar navigation (constants.ts)
- Make GlossarySelector always visible for Pro users (not just LLM mode)
- Send system prompt from Zustand store to backend via custom_prompt
- Add 24 new i18n keys across all 13 locales for glossaries page

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 16:27:10 +02:00
50d5a8d22f feat: multilingual glossary UI, translate selector, context fusion
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m30s
- TermEditor: rewritten with expandable multilingual translation grid
  (13 languages), editorial styling, source/target + translations JSON
- GlossarySelector: new component in translate page config panel,
  fetches user glossaries, shows flag + term count, Pro+LLM only
- useTranslationConfig: added glossaryId state
- useTranslationSubmit: sends glossary_id to backend
- Context page: removed textarea glossary, presets now create API
  glossaries via template import, added link to Glossaries page
- i18n: added 12 keys × 13 locales for glossary/translate/context

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 15:54:04 +02:00
b2d918c832 feat: add multilingual glossary support (backend + frontend types)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m31s
Backend:
- Add source_language column to glossaries table
- Add translations JSON column to glossary_terms table
- Alembic migration for schema changes
- format_glossary_for_prompt now language-aware: extracts correct
  translation per target language, falls back to EN reference for
  templates with only FR→EN data
- CRUD routes accept/return source_language and translations
- Pydantic schemas updated

Frontend:
- Types updated: GlossaryTerm now has translations: Record<string, string>
- Glossary/GlossaryListItem now have source_language
- Added SUPPORTED_LANGUAGES constant (13 languages)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 15:25:28 +02:00