Repository navigation
Releases
Kites v1.5.2
What changed
Lines already in the target language are no longer re-translated. A French page translated to English was sending its English bubbles to the model and then spending recovery requests when they came back unchanged — because a verbatim return cannot be told apart from a failure after the fact. A per-line language oracle now runs before dispatch, so those lines never reach the prompt.
Measured, 2 French + 2 English lines, fr → en:
| recovery requests | lines sent | page time | |
|---|---|---|---|
| before | 4 | 4 | 10 051 ms |
| after | 1 | 2 | 5 354 ms |
The oracle may only make the pipeline skip work: it never rejects a translation, never marks a page untranslated, never reaches the prompt. Measured precision: 22/22 English lines skipped with 0 false skips once bubbles under 4 Latin letters are excluded (those were the only miss — Yes and Ah are too short to classify).
The prompt no longer asserts a source language the pipeline guessed. A Chinese manhua with katakana sound effects measures a 0.375 kana share and resolved as ja, then told the model "from Japanese". Only a source you pin reaches the prompt now. Honest result: no measurable quality difference either way (59 auto runs vs 42 pinned, Welch t = 0.18), shipped because it stops the pipeline claiming what it does not know.
The translation gate was failing the reference build. It compared against one recorded sample of a stochastic model. auto-vi-zh measures 2–11 of 36 slots across twelve runs of identical code, so the baseline now stores a measured band and a combo fails only by exceeding the worst run the reference ever produced. Verified it still catches a real regression by injecting 30/36.
The storage meter was under-reporting by one image per page. Three full-page images are stored per job; the meter summed two, and the missing one (the delivered page) is usually the largest.
Verification
- 1 663 tests / 141 files;
docs:check880 delta +0 with 0 shape violations; lint exit 0; build clean;npm run gate:translationpassed. - Extension loads: smoke 6/6 PASS, including a storage write past the 10 MB default quota.
- The 4.6 MB language-detection chunk is loaded by dynamic
import(), only on mostly-Latin pages, only when a Latin target is requested — it never enters the popup or content-script bundle, and contains noeval/new Function(MV3 CSP safe).
Known limitations
See docs/development/known-limitations.md — now a measured document rather than a memory. It records, with numbers: short lines at 1–3 failed of 16 on the reference band, only 0.1 % of 1 187 measured pages sitting in the band the escalation rule refuses, ~55 unmeasured target languages, and the balloon-split question still open.
Install
Download kites-v1.5.2.zip, unzip, and load the folder via chrome://extensions → Developer mode → Load unpacked.
v1.5.1 - Preserve dialogue beside sound effects
Translation fixes (built from main at 2766bc0, merged after this tag)
The tag v1.5.1 points at the version bump (6aae5d0). This zip is built from main after the
translation fixes below were merged, so the download is newer than the tag's source archive.
- Romaji answers are no longer accepted as translations. A 0.8B model answered
待たせたわね…withtsu datsu wa ne…; the answer carries no CJK, so the echo check passed it and
it was baked into the page. The answer is now converted back to kana and compared with the source's
kana: a copy shares a 3+ kana run or 35%+ ordered coverage, while measured real translations share
at most one kana. A flagged slot spends the page's recovery budget, and if recovery also
transliterates the bubble keeps its Japanese instead of the romaji. - Answers left in the source script are caught for every non-Latin script, not just CJK. Measured
on the real model: Arabic → Vietnamese answered 5 of 6 slots in Arabic and every slot was accepted.
The source's dominant writing system is now derived from the text itself (so it works underauto)
and an answer that is still half in it fails; same-family targets such as Russian → Ukrainian are
exempt. Arabic, Devanagari, Hebrew and Greek are also recognised as native scripts now, which
recovery eligibility and the OCR noise filters depend on. - A translation gate makes the measurement mandatory.
npm run gate:translationand
.github/workflows/translation-gate.ymlfail a pipeline change that ships without a receipt
measured against the current pipeline fingerprint, or that is worse than baseline by more than the
measured run-to-run swing. Seedocs/development/translation-gate.md.
Verification (this build)
- 1,644 tests passed across 140 files; lint exit 0; documentation gate 880 undocumented symbols,
delta +0, zero docstring-shape violations; production build clean. - Real-browser local-model matrix, 2 repeats:
auto-en-zh0/36,auto-vi-zh2/36 (was 3/36),
auto-en-zh-real3/40 (was 5/40),zh-ru-zh0/36. Receipt committed under
docs/dev-history/receipts/translation-gate/. - Arabic → Vietnamese re-measured after the fix: 3/12 failed, down from 12/12.
Known limitations
- Short lines still echo: the remaining failures are mostly 1–3 character lines.
- A model that answers in the source language with different words is caught only when it is still in
the source script; a wrong-language answer written in the target script is not detectable this way. - The gate proves a measurement exists for the shipped pipeline, not that the sampled directions
cover all ~55 target languages.
Fixes
- Preserve kana dialogue beside larger kana/Latin sound effects instead of incorrectly removing it as furigana. Automatic furigana removal now requires a Kanji-bearing parent; existing geometry thresholds remain unchanged.
- Include the detector-resolution and packaged-build pipeline-audit fixes committed since v1.5.0.
- Add native OCR scale/threshold diagnostics and 12 focused furigana regression tests.
Verification
- 1,618 tests passed across 139 files.
- Production package, lint, documentation checks, and API documentation generation passed. Lint reports 59 warnings and zero errors; the build reports a chunk-size warning.
- Native CPU retest of the reported image retains the missing sentence at detector limit 1920, with no other merged-text changes; the 960 result is unchanged.
- ZIP integrity, packaged version 1.5.1, and extension entry points verified.
Known limitations
Possible ruby remains visible when its base is non-Kanji or misrecognized. This is a conservative dialogue-preservation guard, not a general layout classifier. Browser end-to-end parity and a broader real-ruby image corpus have not been verified.
Install
Download and extract kites-v1.5.1.zip, then use Load unpacked in the browser extension manager. Chrome Web Store submission is a separate manual step.
SHA-256: 8d59729faca1db52027d49f4c8112da57cc9a9c91a8965365b224460e4101ba7
v1.5.0 - Measured local translation, honest job state, model sizes
Summary
Version 1.5.0 covers every commit since v1.4.1: a measured rebuild of the local WebLLM translation path, honest job state in the background queue, model size shown before download, model deletion, and provider/worker hardening.
Highlights
- Local translation is measured, not guessed — the first pass samples at 0.7 with a 1.5 presence penalty (2.0 regressed), recovery samples hotter than the pass that failed, and recovery works line by line on local engines because local requests are free. Copy-back of short lines, JSON skeletons rendered as text, and bracketed sound effects scored as failures are gone.
- One source language per page — a page resolves to Japanese only with hiragana or ~15% kana density, so Chinese pages full of katakana product names stop being read as Japanese. Echo verdicts are gated by script, which stops Latin debris on a CJK page counting as a translation.
- Loops are caught, lettering is not — runaway repetition is detected on contiguous spans of 12+ characters, so
ドドドドand!!!!survive while a 40-character loop still discards its batch. - WebLLM driven by its shipped contract —
context_window_size: 2048, usage reported throughstream_options, the redundantresetChat()removed, andenable_thinkingdropped after it measured 34.6% failure against 11.5%. Load requirements are checked before a multi-GB download, the WebGPU adapter is probed first, and generation is capped at two minutes with a progress watchdog. - A finished job is never reported as stalled — the queue now measures silence per job, the offscreen document reports progress every 20s while it works, a late pipeline cannot overwrite the background's error state, and a job that finished after its response was lost is delivered instead of failed. That is the missing red error icon and the three-second cascade fixed together.
- Model size on the row that offers it — every engine shows a VRAM estimate (
~1.6 GB) beside its hardware tag, formatted from the catalogue so 711 MB and 31 GB read as one scale. - Model management — a downloaded WebLLM model can be deleted from Settings, engine dropdowns are grouped by family, saved custom API configurations can be edited in place, and the registry is curated around WebLLM 0.2.89.
- Worker fallback — the health probe proves a real translation per declared output mode, optional TPM/TPD route budgets are enforced, reasoning routes no longer eat their own answer, Typhoon 2.5 30B joins the waterfall, and gateway token/output bounds close the abuse paths.
- Pipeline and Studio — blocks the renderer discards are no longer translated, preserved artwork is never paid for, contours re-typeset on resize, captions fit their frames, staggered caption columns merge, and high-confidence two-glyph names stay dialogue.
- Gates —
docs:checknow fails when TypeDoc errors, the docs tree is reorganised, and the matrix, probe, smoke and real-browser harnesses that measured all of the above are in the repository.
Verification
npm test 1603 passed / 138 files · docs:check 880, delta +0 · lint 0 errors · build clean · smoke 6/6 · real browser: two pages translated around a 62s idle with zero stall lines and zero console errors · matrix: auto-en-zh 0/18, auto-vi-zh 2/18, auto-en-zh-real 1/20.
Package
kites-v1.5.0.zip — 156 files, unpacked from dist/.
v1.4.1 - Balloon ownership, artwork preservation, and config-driven provider routes
Summary
Version 1.4.1 covers every commit since v1.4.0: balloon ownership and merged-line fixes, sound-effect and artwork preservation, layered-reader hover placement, worker provider health and config-driven routes, runtime queue hardening, and the documentation/CI gates added during the audit.
Highlights
- Balloon ownership and merged lines — balloon ownership is resolved per raw OCR line before merging, with one shared policy for reader and Studio. Topological partitions are validated by polygon area, merged lines re-resolve their balloon, two-line welds use a relaxed group majority, and traced contours own the typeset box. Studio re-typesets contours on resize instead of scaling glyphs.
- One sentence, one balloon — staggered balloon columns merge into one sentence, welded regions keep the balloon's full width, duplicate whole-balloon readings are dropped, and skewed native dialogue stays out of the high-tilt drop.
- Sound-effect artwork preservation — sound effects, short OCR fragments, and brush lettering are preserved by default instead of being erased and translated. Latin text is never misclassified as artwork, preserved artwork is never painted during export, and the preserve pair is kept together through every stage.
- Layered-reader hover fix — hover resolution follows
elementsFromPointpaint order, and the control is placed from measuredgetBoundingClientRect()values through one sharedrequestAnimationFrametracker, so covered pages in fixed readers queue the hovered page. - Worker provider health and configuration — adds the live credential health probe and CI gate, accepts both configured Google OAuth audiences, and makes provider routes configuration-driven: catalog-owned reasoning/routing parameters, configurable Gemini endpoint and schema field, catalog-owned Workers AI concurrency, one exhaustive output-mode plan, and one shared dispatcher. ADR-013 and devlog 103 record the decision and evidence.
- Runtime queue hardening — single-command delivery, an honest queue guard, and batch error reset.
- Settings — Max Queue Capacity moves to Advanced & Integrations.
- Documentation and CI — documentation coverage ratchet and TSDoc shape gate, generated API reference, tightened
AGENTS.md, and store-listing copy cleanup.
Verification
- Extension suite: 1,467 tests / 126 files passing (
npm test). - Worker suite: 146 tests / 11 files passing under Node 22.14.0 (
node:sqlite); the quota suite does not load on Node 20. - Worker typecheck: clean. Lint: clean on changed paths. Docs gates:
docs:check880/880 documented with 0 shape violations;docs:apizero warnings. - Production build: clean; package contains
dist/manifest.jsonat 1.4.1. - Version:
package.jsonandmanifest.jsonbumped from 1.4.0 to 1.4.1.
Compatibility
Drop-in for existing installs. No storage migration: saved profiles, popup state, and the community pool request contract are unchanged. The worker's Gemini route now sends one configured schema field instead of both; a live per-route probe is still required before deploying the worker, and ADR-013 records the one-line responseSchema fallback. Worker source changes are included in this release; deploying them to the production Worker is a separate step.
Repack — 2026-11-15
The v1.4.1 release asset was rebuilt in place from current main at cf01ee6. Version and tag remain v1.4.1; no new release was cut.
Additional fixes in this asset:
- Stacked balloon layout — restored the donor split for stacked lobes and stepped panels (
b0b9cc7), then fixed the tall three-utterance case (image8) by falling back from a full-height topological cell to Koharu's horizontal anchor bisectors (cf01ee6).THANK YOU.,WE HAVE AN APPOINTMENT FOR 4 P.M., andI AM...now occupy separate horizontal regions instead of narrow vertical strips. - Short CJK names — a high-confidence two-glyph OCR block (for example
莲实) is kept as dialogue when punctuation was dropped, instead of being classified as artwork and left untranslated (7a23ce4). - Staggered captions — free-text columns belonging to one caption merge into one sentence (
9b1a2be). - Visual harness — the neural bubble visual pass now receives a real canvas instead of silently downgrading every line to free text (
0df553c); this is test-only.
Verification for the rebuilt asset: npm test 1,474 tests / 126 files passing, npx tsc -b clean, npm run build clean, npm run docs:check 0 shape violations, npm run docs:api generated.
Studio typeset fixes — 28daa96
The asset was rebuilt again in place from current main at 28daa96. Version and tag remain v1.4.1; no new release was cut.
- Bubble Contour reflows on resize — measured pipeline lines are treated as generated layout, so resizing un-wraps and re-breaks the words instead of keeping the first translation's line structure.
- Caption Box fits its box — keeps the persisted word-to-line split and grows or shrinks the glyph size to fill the caption; a manual size edit stays pinned until the next geometry change.
- YOLO contour frames real balloons — the carrier-relative 10x area guard was replaced with a page-relative 80% leak guard. Sparse dialogue in a large balloon now uses the traced contour box instead of the tight text carrier.
- Balanced Fit uses the slider ceiling — the fit cap is
maxFontSizeCap ?? 48instead ofmin(max(fontSize, 48), cap), so a 59px fit can grow to the 120px slider maximum.
Verification for this rebuild: npm test 1,479 tests / 126 files passing, npx tsc -b clean, npm run build clean, npm run docs:check 0 shape violations, npm run docs:api generated, npm run lint 0 errors.
Reader per-image controls — 5f69526
The asset was rebuilt again in place from current main at 5f69526. Version and tag remain v1.4.1; no new release was cut.
- Per-image translate controls — hovering another page no longer removes a queued image's spinner. Each pending translation keeps its own control pinned to its own image, while the hovered control shows that image's own state. Five queued images show five independent spinners.
- Auto-translate feedback — automatic translation now uses the same pending state, so queued visible images show a spinner instead of appearing ignored.
- Eye toggle after re-entry — the control keeps its mounted image target and uses
data-kites-orig-srcas the stable registry identity instead of the post-translation blob URL. Re-entering a translated image and toggling no longer freezes on one view. - Original restoration fallback — restoring the original falls through the target backup attrs, source attr, and archived record, so a recycled backing image without its own backup can still be restored.
- Queue semantics unchanged — the background pipeline remains strictly serial; Max Queue Capacity still bounds waiting jobs, not parallel execution.
Verification for this rebuild: npm test 1,484 tests / 126 files passing, npx tsc -b clean, npm run build clean, npm run docs:check 0 shape violations, npm run docs:api generated, npm run lint 0 errors.
v1.4.0 - Structured-output tiers, SFX artwork preservation, and layered-reader hover fix
Summary
Version 1.4.0 gives custom API profiles real structured-output control, stops the pipeline from erasing hand-lettered sound effects, fixes the hover button on layered manga readers, and closes out the first popup/Studio/site UX audit:
- Custom API Structured-Output Tiers: New per-profile
Output Constraintscontrol with three tiers (prompt-only,json-object,json-schema). The tier is auto-detected from the endpoint host — nativejson_schemahosts (OpenAI, OpenRouter, Groq, Fireworks, Together, Mistral, Cerebras, SambaNova, xAI, Nebius, DeepInfra),json_object-only hosts (DeepSeek, Novita, Hyperbolic, Lepton), andprompt-onlyfor everything unproven (proxies, Ollama/vLLM, search endpoints). The detected tier can be overridden per profile. - Schema Actually Reaches The Wire:
CustomApiEnginepreviously discarded the per-batch schema and asked forb0..bNkeys in prompt text only, so small models dropped or hallucinated keys. OpenAI-shaped endpoints now receiveresponse_formatin the same body shape the community pool already uses, with OpenRouterprovider.require_parametersso a downstream backend cannot silently ignore it. - Safe Degradation: An endpoint that answers HTTP 400 to the structured request is downgraded to
prompt-onlyonce per engine instance instead of failing the page; 401/429/5xx keep their existing transient-retry behavior. Gemini and Claude stayprompt-onlybecause this engine does not send their provider-specific schema fields, and the control is hidden for them. - No Migration Required: The tier is validated against the shared catalog on read, and an unknown or retired value is dropped rather than trusted, so profiles saved before 1.4.0 keep working unchanged.
- Popup, Studio, and Site UX Audit: "Open Edit Studio" no longer sits inside the disabled/paused dimming wrapper (turning Kites off could lock users out of the editor), helper text gets a real
--color-mutedrole (was ~2:1 contrast on--color-dust), the accent splits into text and fill values, Studio drops its second neon pink and off-brand purple accents, and the site uses one flat accent fill with accessible store-badge text and a scrollable section-link strip under 860px. - Studio Canvas Toolbar: The top bar clamps its left cluster with
min-w-0/overflow-hiddenand yields project name, size readout, and the Hide Boxes label in priority order instead of painting over the document URL and pushing Export out of the bar; the three unlabelled fit glyphs collapse to one best-fit button (Fit Width/Height stay in the zoom menu). - OCR Fix: Multi-character native-script dialogue (2+ chars) now uses a 0.20 noise floor instead of 0.60, so genuine low-scoring CJK dialogue is no longer suppressed as screentone or clothing-fold noise.
- Sound-Effect Artwork Preservation: New
Sound Effectssetting in Reading & Interaction with two policies —Leave as artwork(default, never inpainted or overlaid) andTranslate plainly. The OCR pipeline now carries an artwork role per block:sound-effect(kana onomatopoeia lexicon over the 557-entry J-Ono dataset, katakana→hiragana folding, one-glyph OCR drift tolerance, plus the existing CJK/Hangul shout rule),display-lettering(glyphs ≥ 2.0× the page's body-size baseline, measured rather than chosen: brush lettering scored 5.63×, the largest genuine line 1.52×), andfragment(≤ 2 CJK glyphs, no sentence punctuation — always preserved). On the reported page erased area dropped from 21.2% to 7.6% while all 13 dialogue/caption blocks still translated. Latin text is never classified as artwork, so an EnglishHUH?still gets translated. Classifiers compose behind oneISoundEffectClassifiercontract; the lexicon regenerates byte-for-byte withscripts/generate-sfx-lexicon.mjs(MIT notice insrc/shared/sfx/ATTRIBUTION.md). No dependency on the optional bubble tier — see ADR-012. - Brush Strokes Read As Text: A 716×349 patch of hand lettering OCR'd as
こブンャっーused to be translated and inpainted, erasing 249,884 px² (10.8% of the page) in one box; single-glyph readings (糸,名0,房) becameSILK,NAME,FATE. Those blocks are now artwork roles, so the same page erases 7.6% instead of 21.2%. - Whole-Balloon Duplicate Readings: Two translations no longer overlap inside one balloon. A region is dropped when it swallows ≥ 2 other readings (each ≥ 60% inside it), shares no 3-glyph run with any of them, and is no longer than their combined text. Checked against the donor's
deduplicate_and_unify_regionsfirst — its branches do not fire on this geometry (IoU 0.32), so the rule is ours. - Hover Button on Layered Readers (issue #48): Readers that stack pages in a fixed overlay above the artwork page's own
<img>(Pixiv reading mode) anchored the button to the covered image and queued that first page no matter which page was hovered. Hover resolution now takes the topmost usable candidate inelementsFromPointpaint order instead of ranking by rendered area — a covered image that rounding made 0.1px wider used to win. The control is also placed from measuredgetBoundingClientRect()values through one sharedrequestAnimationFrametracker with a compositedtranslate3d, replacing CSS Anchor Positioning, whoseanchor()offsets go stale inside nested scroll containers and resolved against the wrong coordinate space inside the fixed viewer. Verified on a live reader: hovering pages 1–4 places the control on each page, follows inner scroll, and queues the hovered page's own URL. - Settings Layout: Max Queue Capacity moved out of Reading & Interaction into Advanced & Integrations, where a throughput limit belongs; same binding, same bounds, same hint.
- Worker Structured Output: Google Gemma 4 (
26b-a4b-it,31b-it) and Cloudflare Workers AI Llama 3.2 1B routes configured forjson-schemaoutput, with@types/nodeadded so the worker CI typecheck resolves Node globals. - Community Standards:
SECURITY.md,CODE_OF_CONDUCT.md, issue/PR templates, andCONTRIBUTING.mdaligned with CodePath conventions.
Verification
- Extension suite: 1,417 tests / 123 files passing (
npx vitest run src/) - Extension typecheck: clean (
npx tsc -b), lint clean (exit 0); no findings in touched files - Hover placement: real-page verification with the packed extension in Chrome for Testing — pages 1–4 each anchor the control on the hovered page, a 130px inner scroll moves it with the image, and clicking page 2 queues
..._p1_master1200.jpg - Sound-effect classifier: 9 pages / 100 OCR blocks measured; 0 false positives on every page containing real dialogue
- Transport smoke: engine driven over real TCP against local accept/reject servers — schema fields, bearer credential, token floor, 400 downgrade body, and downgrade memoization all asserted
- Production build: clean,
dist/manifest.jsonat 1.4.0 - Version:
package.jsonandmanifest.jsonbumped from 1.3.2 to 1.4.0
Compatibility
Drop-in for existing installs. Saved custom API profiles, popup state, and the community pool contract are unchanged; the only new persisted fields are optional — outputMode (structured-output tier, auto-detected) and sfxPolicy (defaults to the non-destructive preserve), so older profiles simply omit them.
v1.3.2 - Community pool hardening and strict keyed JSON protocol
Summary
Version 1.3.2 hardens the Community Shared Pool backend and offscreen translation engine:
- Strict Keyed JSON Protocol: Eliminates commentary leakage into speech bubbles by enforcing upstream JSON schema constraints and strict exact-key validation (
b0..b{N-1}). - Provider Fallback Reordering: Groq-first baseline (
gpt-oss-120b,qwen3.8-27b,gpt-oss-20b), Google Gemma 4 (26b-a4b-it,31b-it), OpenRouter Free, Mistral 3B, and Cloudflare Llama 3.2 1B emergency fallback. - Fair Quota Accounting: Decouples daily successful translations (100/day) from durable attempt limits (250/day) using atomic reservations.
- Worker Reliability: Durable Object SQLite schema migration via
transactionSync, workload-bucketed EWMA latency tracking, and 64KB streamed upstream body guards. - Backward Compatibility: Fully compatible with existing extension installs while providing hardened parsing for v1.3.2+.
v1.3.1 - Popup Custom API scroll fix
🐛 Bug Fixes
- Popup Custom API panel scrollable: the Add Custom API form inside the Translation Engine dropdown was clipped by the dropdown's fixed height, making the Save/Cancel buttons unreachable. The form is now the dropdown's scrollable content, using the same scrollbar as the engine list.
🔧 Installation
Chrome Web Store (auto-updates): https://chromewebstore.google.com/detail/kites/pcaokchkdgnmfgjkljfpghlfohbdjcmj
Manual Install: Download kites-v1.3.1.zip, extract, load as unpacked extension in chrome://extensions
v1.3.0 - Color-bubble detection, Koharu contour typesetting, OCR and font updates
🎨 Full-Page Colorization + Color-Bubble Detection & Wrap
The headline feature of this release: Kites can now colorize grayscale manga pages and detect the color of each original speech balloon so translated text blends in like professional lettering.
- Manga colorization tier — a dedicated WebGPU-accelerated colorization engine integrated into the pipeline (OCR → Colorize → Inpaint), eliminating white-box artifacts on grayscale pages, with popup controls to enable/disable per run
- Per-bubble text color detection — samples the original ink of every balloon and snaps the translated font color to pure black/white accordingly, so red annotations stay red, gray SFX stays gray
- Speech balloon wrapping — translated text is fitted inside the original balloon shapes instead of overlaying rectangles
- Works with Chinese, Japanese, Korean manga / manhwa / webtoons
Full Translation + Colorization (Chinese → English)
| Original Chinese | Kites Translated + Colorized |
|---|---|
![]() |
![]() |
🖌️ Kites Studio: Project Editor
Studio grew from a single-page fixer into a proper project editor:
- Project management — a redesigned project library with rose branding, multi-page chapter rail, direct-fit toolbar buttons, and translated composite previews; projects are optional and editor-first
- Layered PSD export — export any page as a single-page layered PSD (text layers properly bounded and invalidated on re-export) for finishing in Photoshop/Clip Studio
- Batch page upload — drop a whole chapter at once with format enforcement and a progress bar
- CJK vertical column typesetting — centered RTL layout and vertical punctuation mapping for manhua/original-style pages
- Contour-aware text editing — inline selection highlight, caret, and pointer mapping follow the painted scanline layout; per-range formatting reflows inside the bubble contour; manual font-size slider works in every mode with one-undo drag gestures (size, line space, rotation share a single gesture model)
✍️ Koharu Contour Typesetting Engine
The text layout engine was rebuilt as a faithful port of established scanlation lettering math, then extended where Kites can be better:
- Contour fitting — scanline profile measurement, dynamic-programming line breaking, and a readability-floor font search with hyphenation recovery: text now fills bubble shapes the way dedicated manga lettering does
- Fill sizing — long words hyphenate into visibly larger text instead of shrinking the whole block, with a cut-count tax that prevents spray-hyphenation
- Smart Bubble Fit — advanced bubble detection (Heuristic & Neural YOLO) expands narrow CJK columns into roomy balloon chambers with tail severing, eliminating tiny squeezed fonts
- Unified 3-tier rendering — heuristic, neural YOLO, and classic MST tiers share one ellipse/contour geometry pipeline with rotated-ellipse support
- Font ceiling raised to the slider maximum (120px) across balanced fit, vertical CJK, and the canvas drag handle
🌐 Smarter Translation
- Custom Prompt tier — bring your own LLM with a two-tier prompt system, language-aware glossary filtering, and a calibrated dual-budget sliding window for long chapters
- Universal script casing normalization — translated output keeps the source casing intent (no more forced ALL-CAPS English)
- Parser hardening — recursion fix, digit/timestamp preservation, and glossary boundary handling in CJK text
🔍 OCR Robustness
- Edge-flush native-script text kept: vertical columns that touch the page edge no longer get dropped by the margin-noise filter when recognition confidence is marginal
- High-quality Lanczos3 downsampling for detection input on large pages
- Tall webtoon 1D tiled OCR for >14,000px stitched strips at original resolution
🗨️ Smarter Bubble Discovery
- Engine-owned tier geometry: heuristic and neural bubble tiers are isolated behind their engines, with shared-chamber association and partitioning for multi-utterance balloons
- Evidence-validated heuristic discovery with adaptive component extraction, hardened against artwork false positives
- Utterance splitting no longer false-splits continuous vertical columns at punctuation
📚 Font System
- On-demand font catalog with a searchable picker in the popup and Studio
- Bundled comic lettering fonts (CC Wild Words, Anime Ace, Patrick Hand SC) with explicit
@font-faceregistration - First-open repaint fixes so saved bubbles render with their preset fonts immediately
⚙️ Better Default Settings (First Install Experience)
| Setting | Old Default | New Default | Why |
|---|---|---|---|
| Inpainting | Simple Fill | Telea Diffusion | Cleaner background repair, preserves screentones |
| Font | Standard (sans-serif) | Wild Words (Comic) | Authentic manga dialogue lettering out of the box |
🐛 Bug Fixes
- Studio first-open font registration race: overlay now repaints after font-library loading settles
- Text measurement mixed-script and NaN guard fixes in the ellipse solver
- Studio height manual resize restored; legacy ellipse mode normalized to contour on restore
- Content-script original-toggle state synchronized across registry and observer
- Conjoined double-bubble splitting and burst balloon expansion fixed
- Sub-chamber collision and double-bubble blowout eliminated; parallel-column over-splitting fixed
- Hyphen markers healed in every Studio reflow route; hyphenated fallback enabled when unhyphenated text overflows
- Page dimensions retained across the bitmap lifecycle in the offscreen document
- Project pages protected from storage retention cleanup; projectId forwarded on upload
- Popup reorganized: theme toggle moved to the top header, GPU panel moved to Advanced, engine dropdowns ordered by size tier
🔧 Infrastructure & Maintenance
- Tier 2 multi-tier CPU pipeline smoke-test matrix in CI; visual test suite added to the smoke workflow
- OCR registry model URL validation in CI
- Clean-architecture refactors: content-script image replant module extraction, bubble engine decoupling with provider capability checks, god-file decomposition
- Memory: unified engine disposal, WebGPU serialization, and bitmap lifecycle cleanup
📦 What's Changed
- ✨ Colorization tier + per-bubble color detection + balloon wrapping
- 🖌️ Studio project management, layered PSD export, batch upload, CJK vertical typesetting
- ✍️ Koharu contour typesetting engine with fill sizing and contour-aware editing
- 🌐 Custom Prompt translation tier, glossary filtering, sliding window, casing normalization
- 🗨️ Unified YOLO bubble tier, shared-chamber partitioning, heuristic discovery hardening
- 🔍 OCR edge-flush fix, Lanczos detection input, punctuation split floor, tiled webtoon OCR
- 📚 On-demand font catalog, bundled comic fonts, first-open repaint fixes
- 🎛️ One-undo slider gestures, 120px font ceiling across all Studio sizing paths
- 🎯 Better defaults: Telea inpaint + WildWords font
- 🔧 Version bump: 1.2.3 → 1.3.0
🔧 Installation
Chrome Web Store (auto-updates): https://chromewebstore.google.com/detail/kites/pcaokchkdgnmfgjkljfpghlfohbdjcmj
Manual Install: Download kites-v1.3.0.zip, extract, load as unpacked extension in chrome://extensions
v1.2.3 - studio clean plate save and editor state preservation
What's changed since v1.2.2
Studio
- Enforce Clean Plate Storage on Save to Database. Clicking "Save to DB" now saves the clean inpaint background raster without burning text into the image pixels. Text objects remain persisted as structured records in IndexedDB (
db.textBlocks), preventing duplicated ghost text and ensuring all text boxes stay selectable, movable, and editable like a standard editor. - Preserve Editor Canvas State and Focus on Save. Saving to the database no longer triggers a full job reload that unmounts
<Studio />. Active text selections, tools, zoom, pan position, and undo history are kept intact during and after saving. - Clean Plate Storage Contract Testing. Added automated unit tests to verify working background canvas persistence preserves clean plate semantics and does not bake typography overlay onto disk or database blobs.
Documentation
- Added Devlog 055: Studio Save Clean Plate & State Preservation.
- Clarified composite export vs clean plate persistence documentation in
compositeExport.ts.
Verification
- 84 test suites and 870 unit tests passed.
- Production package
kites-v1.2.3.zipbuilt and verified (33 MB).
Install
Download kites-v1.2.3.zip below, then load it unpacked from chrome://extensions with Developer mode enabled. Existing settings, library data, and saved pages are preserved.
In-place update (2026-10-23, same version)
Performance
- Fast-path hover detection on anti-scrape overlays. Hover resolution now hit-tests the elements physically under the cursor via
elementsFromPoint, capping ancestor fallback at two levels with feed-card boundaries, so the translate button appears on wrapped media (X.com, Pixiv) without full-feed DOM scans. - Coalesced hover events and canvas caching. High-frequency mouseover bursts resolve once per animation frame, and canvas inspection is size-gated with a 2-second data-URL cache to avoid synchronous GPU-to-CPU stalls.
- Incremental auto-translate scans. Auto-translate now processes only the DOM subtrees that actually changed instead of rescanning the whole document on every style mutation, with capped batches and a non-resetting debounce so animation-heavy feeds cannot starve image discovery.
- Idle CPU on non-reader sites. Recurring chapter scans run only on recognized manga reader pages; social feeds no longer trigger continuous background traversal.
- Faster chapter-reader startup. History page images are base64-encoded through the native FileReader pipeline instead of a per-byte string loop on the service worker thread.
Fixes
- Memory leak on long feed sessions. The media target registry prunes entries whose image left the DOM instead of retaining every scrolled-past post forever.
- CDN image fetch failures after service-worker restarts. Referer session rules are registered idempotently, so a counter reset can no longer collide with an orphaned rule and break all CDN fetches until browser restart.
- Chapter-scan listener churn. The recurring chapter scanner no longer rebuilds its interval and scroll listener every time a new page is detected.
Documentation
- Added Devlog 056: Content Hover Performance & Fast-Path Detection.
- Added Devlog 057: Audit Follow-ups (Incremental Auto-Translate Scans & Registry Hygiene).
Verification
- 85 test suites and 884 unit tests passed.
- Package
kites-v1.2.3.ziprebuilt and re-uploaded (33 MB).
v1.2.2 - studio upload layout, OCR rotation, CJK typesetting, and reader fixes
What's changed since v1.2.1
Studio
- Renderer layout survives page uploads. Studio page uploads now run through the same persisted translation pipeline as normal pages, so the initial typeset layout, font size, line breaks, and sampled colors are preserved until you edit them. Layout updates are centralized and editing modes are deferred instead of silently reflowing the page. (PR #26)
- Rotation is preserved through Studio re-OCR and retranslate. Re-OCR and "Retranslate full page" now store the OCR block angle and the centered, unrotated box instead of the polygon's axis-aligned bounds. Tilted SFX and balloons stay tilted in Studio, and re-saves keep angle, line spacing, typeset mode, and skipped state.
- CJK typesetting no longer collapses on resize. Widening a Chinese or Japanese box no longer snaps the font size from large readable text down to roughly 14px. CJK text is tokenized as breakable characters, so the fitter keeps the largest valid size as the box grows.
- Soft line-break hyphens rejoin on reflow. Words split by the pipeline hyphenator (for example
com-\nmunity) are restored tocommunitywhen a box is widened, and intentional hyphens such astwenty-oneremain untouched. - Short second-box dialogue now uses calibrated translation and font ratios instead of inheriting the first box's sizing.
Reader and content scripts
- Strict page URL scoping. Image replacement now follows the current
window.location.href, and chapter-scope merging was removed so one chapter cannot overwrite another. - Paginated gallery image replacement race fixed. The chapter-scope ID is aligned between the image registry and the message handler, eliminating stale replacements during paginated navigation.
Documentation
- Added Devlogs 050, 053, and 054.
- Updated Studio and typesetting architecture notes, testing guidance, Mermaid diagrams, and inpaint tier documentation.
- Clarified translation quota and engine documentation across the store listing, READMEs, and site.
Verification
- 84 test suites and 869 unit tests passed.
- TypeScript build, lint, and production extension build succeeded.
Install
Download kites-v1.2.2.zip below, then load it unpacked from chrome://extensions with Developer mode enabled. Existing settings, library data, and saved pages are preserved.

