Conversation
… translation succeeded
…requests and chunking
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Performance
Features
text_freebubbles (sound effects / free-floating text) are labelled separately in the Gemini prompt and translated as onomatopoeia, whilespeech,narration, andtalltypes are translated as dialogueFixes
Version
0.5.0Test plan