Skip to content

RDAT: Translation Copilot v0.3.0 — Bidirectional EN↔AR + Cross-Platform CI/CD

Choose a tag to compare

@waleedmandour waleedmandour released this 25 Jul 10:02
· 34 commits to main since this release

RDAT: Translation Copilot v0.3.0

Professional Bidirectional English↔Arabic Computer-Assisted Translation (CAT) Environment

v0.3.0 is a major release that completes the bidirectional translation pipeline, polishes the dark/light theme, and adds GitHub Actions CI/CD with cross-platform Tauri builds.

⏳ Installers building: The Windows (.exe), macOS (.dmg), and Linux (.deb / .rpm / .AppImage) installers are being built right now by the Release GitHub Actions workflow. The first run takes 15–30 minutes per platform because Rust compiles every dependency from scratch. Once complete, the installers will appear in the Assets section below.


🌐 Bidirectional Translation (Phase 1)

AR→EN translation now works end-to-end across all three tiers — previously it only worked on the Tauri+Ollama path; every other tier silently hardcoded an EN→AR assumption.

Tier 0 — Local Translation Engine (LTE)

  • Bidirectional enIndex + arIndex built in load(); getSuggestion() / search() take a direction parameter (default "en-ar" for backward compat).
  • Arabic sentence-splitting now recognises the Arabic question mark ؟ (U+061F) and Arabic-letter lookahead.
  • normalize() strips ؟ alongside the existing ؛ / ، punctuation stripping.

Tier 1 — Local LLM (Ollama + WebLLM)

  • generateLocalTranslation() / generateRAGTranslation() / prefetchTranslation() accept a direction parameter and call the shared buildRAGSystemPrompt() / buildUserPrompt() from llm-adapter.ts.
  • The duplicated hardcoded prompts that caused the original AR→EN bug are deleted.
  • WebLLM adapter reads direction from the workspace store (mirroring Ollama adapter); the dead buildRAGSystemPrompt/buildUserPrompt import is removed.

Tier 2 — Cloud Gemini (Vercel + Tauri proxy)

  • GeminiBurstRequest / GeminiFullRequest / GeminiTutorRequest accept an optional direction field.
  • New shared api/_lib/prompts.ts keeps PWA and Tauri prompt builders in sync.
  • useGemini hook forwards direction; TargetEditor.tsx passes it at the call site.

AI Translation Tutor

  • Prompt now labels the source/target correctly for AR→EN attempts ("Arabic Source" / "English Translation Attempt") instead of always saying "English Source" / "Arabic Translation Attempt". The course title stays "Arabic-English professional translation" because the tutor teaches bidirectional AR↔EN translation.
  • isRTL still controls the output language of the tutor's feedback, separate from the translation direction.

Persistence + UI

  • Segment source_lang / target_lang derived from active direction on save.
  • Source panel header, language tag, placeholder, and textarea direction all flip with direction.
  • Target panel's speech-synthesis locale switches to en-US in AR→EN mode.

📒 Glossary UX (Phase 2)

"Download" → "Use" with persistence

  • Downloaded reference DBs are tracked in IndexedDB sync_meta (downloaded_reference_dbs key), so the button label survives page reloads.
  • "Use" is a toggle — clicking it removes that DB's entries (identified by a source_db field on each tagged entry).
  • Multiple DBs can be "in use" simultaneously (matches the existing data model).

Inline editing

  • Every glossary entry, regardless of source (manual add, JSON upload, or reference DB), can be edited in place via a Pencil icon next to the existing Trash2.
  • Edits trigger an LTE rebuild (deferred via queueMicrotask) so ghost-text reflects the change immediately.

Dark-mode fixes

  • 15 hardcoded bg-[#0A0B0E] / dark:bg-[#0F1116] patterns replaced with bg-background / bg-surface tokens across TranslationWorkspace, SourceEditor, TargetEditor, WelcomeTab, GlossaryView, QuickGuideModal.
  • Toasts converted from always-dark bg-[#1a1d23] to theme-aware bg-surface / text-foreground / border-border.
  • WelcomeWindow splash left intentionally always-dark (flagged for project owner decision — see release notes below).

🔬 Regression Sweep + Lint Hardening (Phase 3)

Direction regression sweep

  • AI Tutor prompt was the largest remaining hardcoded direction assumption — now direction-aware (see above).
  • server.ts (local dev Express server) had hardcoded EN→AR prompts for all three endpoints — rewrote to use the shared direction-aware builders from api/_lib/prompts.ts.

Data model correctness

  • Manual Add-Term and JSON-upload paths now derive source_lang / target_lang from active direction (with JSON honouring explicit per-row fields if present).
  • Reference-DB catalog and SEED_CORPUS loader keep en/ar because those datasets are intrinsically English-source → Arabic-target — verified as correct.

TypeScript strictness

  • noUnusedLocals + noUnusedParameters now enabled in tsconfig.json so npm run lint catches dead imports going forward.
  • The Phase 1 dead-import root cause was "no lint rule was on at all" — that gap is now closed.
  • All 30 pre-existing unused-var errors cleaned up.

🤖 CI/CD (new in v0.3.0)

.github/workflows/ci.yml

Runs on every push/PR. Provides fast feedback (~2 min):

  • TypeScript strict lint (with noUnusedLocals/noUnusedParameters)
  • Phase 1 LTE smoke test (12/12)
  • Phase 3 regression sweep (30/30)
  • Vite production build

.github/workflows/release.yml

Triggered by pushing a v* tag. Pre-flights with the same lint+test+build gate, then builds Tauri installers in parallel:

  • Windows x64 — .exe NSIS installer
  • macOS Apple Silicon — .dmg
  • macOS Intel — .dmg
  • Linux x64 — .deb / .rpm / .AppImage

All four platform installers attach to this release automatically via tauri-apps/tauri-action@v0. First run on each platform takes 15–30 min for Rust compilation; subsequent runs reuse cargo cache and finish in 5–10 min.


🧪 Smoke Tests

Two offline smoke-test scripts ship in scripts/:

npx tsx scripts/test-bidirectional-lte.ts   # Phase 1 — 12 tests
npx tsx scripts/test-phase3-regression.ts   # Phase 3 — 30 tests

Both pass clean as of this release.


⚠️ Known limitations flagged for project owner

  1. WelcomeWindow splash is intentionally always-dark (~30 text-white/NN opacity layers). Converting it to follow the theme toggle is a mechanical but spread-out change. Flagged for project owner decision.
  2. Reference-DB "Use" is a toggle (multiple DBs in use simultaneously). If exclusive single-DB use is preferred, the change is local to GlossaryView.tsx's handleDownloadDb.
  3. docs/RDAT-Translation-Copilot-v0.2.0-User-Guide.pdf still describes the app as English-to-Arabic only. This is a v0.2.0 release artifact; updating it is a release-engineering task for v0.3.1.
  4. Comprehensive EN↔AR dictionary: the current seed corpus is ~85 hand-picked entries. Sourcing a licensed multi-thousand-entry bidirectional dictionary is still on the roadmap (see README).
  5. LTE performance at scale: the current "rebuild whole in-memory index on every mutation" approach (deferred via queueMicrotask) should be load-tested with a multi-thousand-entry corpus. If it janks, move to a Web Worker.

📥 Install

Desktop (recommended)

Download the installer for your platform from the Assets section below. The installers will appear once the Release GitHub Actions workflow finishes building them.

  • Windows: RDAT Copilot_0.3.0_x64-setup.exe (NSIS installer)
  • macOS Apple Silicon (M1/M2/M3): RDAT Copilot_0.3.0_aarch64.dmg
  • macOS Intel: RDAT Copilot_0.3.0_x64.dmg
  • Linux: pick .deb (Debian/Ubuntu), .rpm (Fedora/RHEL), or .AppImage (universal)

After install, open the Models panel and click Pull on gemma4:e2b (~1.5 GB) to get the recommended starter model. See the Getting Started guide for full setup instructions.

PWA (browser, no install)

Visit https://rdat.vercel.app (or your own Vercel deployment) in Chrome 113+ or Edge 113+ for browser-only mode with optional WebLLM inference.


🙏 Acknowledgements

Developed by Dr. Waleed Mandour, Assistant Lecturer at Sultan Qaboos University, Oman. The development of RDAT: Translation Copilot has been performed with the assistance of multi-AI agents. The primary AI assistant used throughout the development lifecycle was GLM 5.2 (2026) by Z.ai, used for code generation, architectural analysis, debugging, documentation, and visual design.


Full changelog: v0.2.0...v0.3.0