Commit Graph

66 Commits

Author SHA1 Message Date
e9ac30ed1d style: use same serif/typography font styles on profile page as translate page
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m47s
2026-05-31 23:33:32 +02:00
b4096fd2ca fix: show target-language-specific translations in preview + rename migration
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
Two issues found in screenshot review:
1. Glossary preview always showed English 'target' field (foie → liver)
   instead of the language-specific translation. Now looks up
   term.translations[targetLang] first, falls back to term.target.
   When target is Persian, preview shows 'foie → کبد' (Persian).

2. Previous migration b7c8d9e0f1a2 was already applied on server before
   the rename was added. New migration c8d9e0f1a2b3 handles the rename
   separately: glossaries with target_language='multi' get their name
   changed from 'Anglais' to 'Multilingue'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 23:22:50 +02:00
a79ce0fc9b fix: comprehensive glossary system audit — 6 critical fixes
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m27s
Full audit found 18 issues across backend, frontend, and data files.
Root cause: target_language had no single source of truth — 'en' was
hardcoded as default in 6+ places while templates are actually multilingual.

Fixes applied:
- routes/glossary_routes.py: list_glossaries() fallback 'en' → 'multi'
- routes/glossary_routes.py: import reads target_lang from index.json
  (source of truth) instead of template file
- data/glossaries/*.json: all 8 template files target_lang 'en' → 'multi'
- services/glossary_service.py: get_glossary_terms() now returns
  target_language field (was missing entirely)
- schemas/glossary_schemas.py: all defaults 'en' → 'multi'
  (GlossaryCreate, GlossaryResponse, GlossaryListItem)
- useTranslationConfig.ts: only reset glossary on sourceLang change,
  not targetLang (multilingual glossaries work with any target)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 23:14:41 +02:00
2386e94c6d fix: page /checkout/success qui auto-sync le plan apres paiement Stripe (success_url corrige)
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 3m5s
2026-05-31 23:05:01 +02:00
ab296ea259 fix: Stripe billing portal auto-config programmatique, separation changer-forfait vs gerer-facturation
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
2026-05-31 22:45:45 +02:00
00c54997bf fix: sync plan+tier after checkout, portal same-tab nav, cancel button always visible for paid plans, portal return URL to profile tab
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m44s
2026-05-31 22:37:51 +02:00
c66252bed4 feat: mark glossary templates as multilingual — support 11 target languages
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m30s
Templates enriched by enrich_glossary_templates.py already contain
translations for de, es, it, pt, nl, ru, ja, ko, zh, ar, fa (including
Persian). But they were labeled FR→EN, causing incorrect filtering and
warnings when translating to other languages.

Changes:
- index.json: set target_lang='multi' for all 8 templates
- GlossarySelector: treat target_language='multi' as compatible with
  any target language (no false warnings, auto-select works)
- GlossarySelector: display '🌐 MULTILINGUE' badge instead of EN flag
- glossary_routes: default target_language to 'multi' instead of 'en'
- Migration: detect existing multilingual glossaries in DB (5+ keys in
  translations JSON) and set their target_language to 'multi'

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:32:27 +02:00
ad8ac089a4 fix: don't auto-select glossary when no target language match
When activating the glossary toggle, only auto-select a glossary if it
matches BOTH source and target language. If no matching glossary exists
(e.g. translating to Persian but only have FR→EN glossaries), leave the
selector empty so the user picks manually instead of forcing an
incompatible glossary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:22:05 +02:00
5122bfdf99 fix: glossary selection respects target language — sort by source+target, reset on lang change, fix template import
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
- GlossarySelector: filteredGlossaries now sorts matching target_language
  first so FR→FA appears before FR→EN when translating to Persian
- GlossarySelector: toggle auto-select prefers glossary matching
  targetLang, falls back to first available
- useTranslationConfig: reset glossaryId when targetLang changes (was
  only resetting on sourceLang change)
- glossary_routes: set target_language from template data on import
  (was missing, defaulted to None/en)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 22:00:40 +02:00
89c31f8298 fix: safe JSON parse in checkout handlers, show proper error on 500
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m32s
2026-05-31 21:59:18 +02:00
fbe39d81e1 fix: align landing page prices with backend, pass billing mode in URL to /pricing
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m50s
2026-05-31 21:54:15 +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
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
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
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
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
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
a76f7710e8 fix: move useState hook before conditional return in profile page
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m29s
The activeTab useState was called after the if(loading) return, violating
React's Rules of Hooks and causing error #310 at runtime.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:48:06 +02:00
5e7411c2d4 fix: remove shadcn deps from dashboard pages, restyle services & settings to editorial design
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m29s
- Profile: replace shadcn Select with native select, remove unused shadcn imports (fixes runtime crash)
- Services: rewrite from shadcn Card/Badge to editorial-card design
- Settings: rewrite from shadcn Card/Button/Badge to editorial-card design

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:37:07 +02:00
3938adf10c feat: rewrite all dashboard views with editorial design
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m29s
Translate page: editorial dropzone (rounded-[40px]), config panel,
progress stepper, download button, Momento promo banner.
Profile page: pill tabs, dark subscription card, usage bars, language grid.
Context page: preset grid (rounded-[32px]), instruction/glossary textareas.
API keys page: editorial-card with production key display.
Glossaries page: editorial-card grid with hover lift.
Pricing page: 5-column grid, colored headers, plan badges.

All pages use editorial design system: accent-pill, editorial-card,
premium-button, brand colors, dark mode support.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 12:54:29 +02:00
c2e9617045 fix: rename Office Translator to Wordly everywhere
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m28s
Replaced all references to "Office Translator" with "Wordly" across
i18n translations (13 locales), auth forms, layout components, admin
sidebar, and page metadata.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 12:18:36 +02:00
b2b6f03399 feat: complete editorial redesign of Wordly.art SaaS
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m31s
New design system with cream/dark/copper palette (#FDFCF9, #1A1A1A, #C5A17A),
Inter font, rounded editorial cards, and dark mode support.

- globals.css: Rewritten from 1867→200 lines, new brand colors + editorial utilities
- Landing page: New editorial design with Hero, Steps, Features, Layout, Formats, Pricing, CTA, Footer
- Auth pages: Editorial card design with decorative blur blobs and back-to-home links
- Dashboard sidebar: New w-72 sidebar with Momento promo section
- Dashboard header: New h-20 topbar with editorial styling
- i18n: Added memento/common/dashboard keys for all 13 locales, cleaned duplicate landing keys

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 12:03:49 +02:00
18e1aca148 fix: add cookieConsent and upgradeToPro translations for all 13 locales
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m31s
Translations were missing from i18n.tsx (the runtime translation file),
causing the cookie consent banner to crash. Added keys for en, fr, es,
de, pt, it, nl, ru, ja, ko, zh, ar, fa.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 20:31:29 +02:00
51d07c9ef8 fix: use project's useI18n hook instead of next-intl useTranslations
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m29s
The project uses a custom i18n provider, not next-intl directly.
This was causing a client-side crash on page load.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 20:12:40 +02:00
7aa0c5a892 feat: add GDPR cookie consent banner and upgrade-to-Pro link
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 3m8s
- Cookie consent banner with accept all / essential only buttons
- Uses existing i18n messages (en/fr) and localStorage for persistence
- Animated with Framer Motion, respects dark/light theme
- Free tier users see "Passer Pro →" link next to their badge in sidebar

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 20:01:36 +02:00
a76442b382 feat: add Google Sign-In to login and register pages
- Add GoogleOAuthProvider wrapper in layout.tsx
- Add Google login button to LoginForm with "or continue with email" separator
- Add Google signup button to RegisterForm
- Add Google auth types and API client integration
- Add GOOGLE_CLIENT_ID and NEXT_PUBLIC_GOOGLE_CLIENT_ID to env config
- Add translations (EN/FR) for Google OAuth UI
- Backend already has /api/v1/auth/google endpoint, no changes needed

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 19:47:08 +02:00
05c5dfcbbb fix: add frontend/src/lib/ to git (was ignored by /lib/ pattern)
Some checks failed
Deploy to Homelab / Deploy Wordly to 192.168.1.151 (push) Has been cancelled
Deploy to Homelab / Deploy Monitoring (if configured) (push) Has been cancelled
The root .gitignore had `lib/` which matched frontend/src/lib/,
causing Docker build to fail with "Module not found: Can't resolve
'@/lib/utils'" and '@/lib/i18n'.

Changed to `/lib/` so it only ignores the Python lib at repo root.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 15:17:22 +02:00
3c710c52a1 fix(ui): profile page bugs - billing button, cancel button, header subtitle
Some checks failed
Deploy to Homelab / Deploy Wordly to 192.168.1.151 (push) Has been cancelled
Deploy to Homelab / Deploy Monitoring (if configured) (push) Has been cancelled
- Remove billing portal button (not functional without Stripe configured)
- Show cancel subscription only when user has a real Stripe subscription ID
- Remove muted subtitle from dashboard header (was appearing as grayed out)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 12:33:37 +02:00