Skip to content

Phase 1: segment-aligned model + side-by-side viewer + budget tracking#10

Merged
CreatmanCEO merged 18 commits into
mainfrom
feat/phase1-viewer
Jun 3, 2026
Merged

Phase 1: segment-aligned model + side-by-side viewer + budget tracking#10
CreatmanCEO merged 18 commits into
mainfrom
feat/phase1-viewer

Conversation

@CreatmanCEO

Copy link
Copy Markdown
Owner

Phase 1

Segment-aligned TranslationDocument pipeline + synchronized side-by-side viewer, per-document budget tracking (admin), iOS download fix.

Backend

  • Segmenter (Intl.Segmenter sentences + whitespace tokens, NFC), align validator (graceful), TranslationDocument builder.
  • LiteLLM batch translate+align (few calls/doc, not per-sentence) with usage/cost + actual-model capture.
  • Pipeline assembly (chunking, segment cap, validated align), usage aggregator, result store (TTL).
  • GET /api/result/:token (token-validated, usage stripped, no-store); GET /api/admin/usage (ADMIN_KEY, per-owner).

Frontend

  • SideBySideViewer: XSS-safe (React text nodes only), RTL source, 3-level bidirectional highlight (word/sentence/block).
  • Fetch TranslationDocument on completion; admin usage panel (key-gated); direct-attachment download (iOS).

Guardrails (design-guardrails-audit) — 8 🔴 acceptance criteria all met.

Tests: server 57, client 6, builds clean.

🤖 Generated with Claude Code

CreatmanCEO and others added 18 commits June 3, 2026 09:02
Batch translate+align (few calls, not per-sentence), precomputed word-align for
<1s click, HTML side-by-side viewer with block/sentence/word sync highlight,
per-document budget tracking (admin), iOS download fix. Includes guardrails
audit with 8 🔴 acceptance criteria (XSS-safe render, /api/result hardening,
align validation, schemaVersion cache, segment cap, admin-gated usage).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…admin monitoring

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… cap)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…oken)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-by-side viewer

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ests green

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CreatmanCEO CreatmanCEO merged commit 5c5d77a into main Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant