Skip to content

v0.5#7

Merged
volfiros merged 14 commits into
mainfrom
dev
Feb 23, 2026
Merged

v0.5#7
volfiros merged 14 commits into
mainfrom
dev

Conversation

@volfiros
Copy link
Copy Markdown
Contributor

@volfiros volfiros commented Feb 23, 2026

Summary

Performance

  • Concurrent panel processing: Replaced sequential translation with a fire-and-forget + streaming architecture. The content script sends all panel data at once, the background processes up to 5 panels concurrently, and streams results back to the tab as each panel finishes — overlays appear incrementally instead of all at once
  • Batched bubble translation: All speech bubbles detected in a single panel are now sent to Gemini in one grouped request (chunked at 16 images) instead of sequentially per bubble, significantly reducing API calls and latency
  • Full chapter translation: The translate button now processes all manga panels on the page instead of a single visible panel

Features

  • Stop translation: Clicking stop halts the background batch mid-flight — already-translated panels remain visible on the page
  • Rate limit abort: When a rate limit is hit during batch processing, the entire batch stops immediately and the user is notified
  • Token + time logging: At the end of each batch, the background console logs total time elapsed and token breakdown — input, output, and combined total
  • Type-aware bubble translation: text_free bubbles (sound effects / free-floating text) are labelled separately in the Gemini prompt and translated as onomatopoeia, while speech, narration, and tall types are translated as dialogue

Fixes

  • Rate limit toast no longer shows "Translation complete" when the fallback model is used after the primary hits a rate limit
  • Stop translation preserves existing overlays rather than clearing them

Version

  • Bumped to 0.5.0

Test plan

  • Open a webtoon with 10+ panels and click Translate — overlays should appear panel by panel as results stream in
  • Verify background console shows token breakdown and elapsed time after batch completes
  • Click Stop mid-translation — processing halts, already-translated panels stay visible
  • Trigger a rate limit — batch stops immediately with a rate limit toast, not a success toast

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the extension to v0.5.0 and reworks translation into a batch + streaming architecture so whole-page (chapter) translation can run concurrently and render overlays incrementally, with stop/rate-limit handling and token/time logging.

Changes:

  • Switch from single-panel sequential translation to full-page batch processing with concurrent background execution and per-panel result streaming back to the content script.
  • Batch speech-bubble translation per panel by sending grouped bubble crops to Gemini (chunked) to reduce API calls and latency.
  • Add rate-limit + stop behavior updates, improve error/toast messaging, and log token/time usage after batches.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
ui/src/types/translator.types.ts Renames bubble type interface to DetectedBubble for detector/model pipeline.
ui/src/popup.tsx Improves error toast title for rate limits; adjusts status handling and some button border styles.
ui/src/contents/translator.tsx Replaces sequential per-panel processing with batch dispatch + streaming overlay application and batch completion handling.
ui/src/contents/components/TranslationOverlay.tsx Simplifies overlay styling and updates minimum font size.
ui/src/background.ts Adds concurrent batch processing, stop support, detector/model integration renames, and batch token/time logging.
ui/src/api/services/gemini.ts Adds token accounting, bubble-crop batch translation, and rate-limit/fallback tracking flags.
ui/package.json Bumps extension version to 0.5.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/src/popup.tsx Outdated
Comment thread ui/src/contents/translator.tsx Outdated
Comment thread ui/src/contents/translator.tsx Outdated
Comment thread ui/src/contents/translator.tsx Outdated
Comment thread ui/src/background.ts
Comment thread ui/src/contents/translator.tsx
Comment thread ui/src/contents/translator.tsx
Comment thread ui/src/background.ts Outdated
Comment thread ui/src/background.ts Outdated
Comment thread ui/src/api/services/gemini.ts
@volfiros volfiros merged commit 643d986 into main Feb 23, 2026
@volfiros volfiros mentioned this pull request Mar 14, 2026
Merged
6 tasks
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.

2 participants