Skip to content

chore(electron): prune the root-level files of every translated docs mirror from the desktop bundle - #13235

Merged
diegosouzapw merged 2 commits into
release/v3.8.51from
chore/electron-prune-docs-i18n
Sep 12, 2026
Merged

diegosouzapw merged 2 commits into
release/v3.8.51from
chore/electron-prune-docs-i18n

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

PR-5 of the locale-expansion plan (D4). The desktop bundle stops shipping the root-level files of every translated docs mirror — README.md, llm.txt, CLAUDE.md, GEMINI.md, CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md — by extending the existing localeRootFiles prune rule that already removed the translated CHANGELOG.md.

Why not the whole docs/i18n, as D4 first said

The in-app docs route reads docs/i18n/<locale>/docs/<section>/<FILE>.md (src/app/docs/[...slug]/page.tsx, path pinned by src/lib/docsI18nPath.ts). Dropping the directory would have broken localized docs inside the desktop app. The existing test already guarded this ("prunes authoring payloads without removing runtime docs"). No runtime reader exists for the locale root files (grep over src/ and electron/), so those are the honest scope.

Measured on release/v3.8.51 (51 locales)

Slice of docs/i18n Size Fate
<locale>/docs/** (served by the docs route) 25.7 MB kept
<locale>/CHANGELOG.md 103.5 MB already pruned
<locale>/{README.md, llm.txt, CLAUDE.md, GEMINI.md, CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md} 11.4 MB pruned by this PR

Validation

  • tests/unit/electron-packaging.test.ts — the prune test now seeds README.md and llm.txt mirrors and asserts they leave while docs/i18n/ko/docs/guides/ELECTRON_GUIDE.md stays (RED → GREEN, 4/4).
  • Idempotence assertion unchanged (second call removes nothing).

⚠️ base-red inherited: #12732 — release/v3.8.51 unit shards and Fast Quality Gates are red for every PR cut from this base; nothing here touches those areas.

…mirror

The desktop runtime reads exactly one slice of docs/i18n: the translated
docs/** tree, through the in-app docs route (src/lib/docsI18nPath.ts pins
the path). Each locale's root-level mirrors — README.md, llm.txt, CLAUDE.md,
GEMINI.md, CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md — exist for
GitHub readers and are never opened by the packaged app, so they leave the
bundle together with the translated CHANGELOG that was already pruned.

Measured on release/v3.8.51 with 51 locales: docs/i18n is 139 MB, of which
25.7 MB is the served docs/** tree (kept), 103.5 MB the CHANGELOG mirrors
(already pruned) and 11.4 MB these root files (pruned now). The plan's D4
called for dropping docs/i18n entirely; that would have broken localized
docs inside the app, which is why the served subtree stays.
@diegosouzapw
diegosouzapw merged commit 6dc6692 into release/v3.8.51 Sep 12, 2026
15 of 21 checks passed
Githab-capibara added a commit to Githab-capibara/OmniRoute that referenced this pull request Sep 17, 2026
…mirror from the desktop bundle (diegosouzapw#13235)

Merged as part of the owner batch of 2026-09-11.

This PR had a live worktree in another session, so it sat outside the main 39. Merged on your explicit call, validated first rather than taken on trust: boarded with the other 10 worktree-held PRs into a consolidated worktree off `release/v3.8.51`.

- ESLint over every changed file: no errors
- `typecheck:core` clean; `check:dashboard-typecheck` OK; `check:changelog-integrity` OK
- complexity 2821 / baseline 3218 and cognitive-complexity 1272 / baseline 1437
- 203 of 208 assertions green. The 5 remaining (`guide-settings-route` ×4, `hard-session-lease-bypass-inventory` ×1) reproduce on the pure tip with nothing from this batch applied.
- `imageGeneration.ts` rebaselined 3259 → 3293 for diegosouzapw#12945's image-only-model guard, landed separately in diegosouzapw#13392 so nothing was pushed onto a live branch.

⚠️ base-red inherited: diegosouzapw#12732 — provider count 356 vs 358 and `open-sse/utils/stream.ts` 3115 > frozen 3098, both reproducing on the pure tip.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…mirror from the desktop bundle (diegosouzapw#13235)

Merged as part of the owner batch of 2026-09-11.

This PR had a live worktree in another session, so it sat outside the main 39. Merged on your explicit call, validated first rather than taken on trust: boarded with the other 10 worktree-held PRs into a consolidated worktree off `release/v3.8.51`.

- ESLint over every changed file: no errors
- `typecheck:core` clean; `check:dashboard-typecheck` OK; `check:changelog-integrity` OK
- complexity 2821 / baseline 3218 and cognitive-complexity 1272 / baseline 1437
- 203 of 208 assertions green. The 5 remaining (`guide-settings-route` ×4, `hard-session-lease-bypass-inventory` ×1) reproduce on the pure tip with nothing from this batch applied.
- `imageGeneration.ts` rebaselined 3259 → 3293 for diegosouzapw#12945's image-only-model guard, landed separately in diegosouzapw#13392 so nothing was pushed onto a live branch.

⚠️ base-red inherited: diegosouzapw#12732 — provider count 356 vs 358 and `open-sse/utils/stream.ts` 3115 > frozen 3098, both reproducing on the pure tip.
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