🐛 fix(desktop): unbreak dev cold-start + restore UI language across reloads#15547
Merged
Conversation
`ViteRendererFallback` now proxies via globalThis `fetch` (Node undici) instead of Electron `net.fetch`, and Vite dev server is pinned to IPv4 listen. The main-process Chromium `net` pool is small and surfaces `ERR_INSUFFICIENT_RESOURCES` under cold-start module bursts + ~50 i18n namespace fan-out under non-en-US locales. undici queues internally and avoids that pool entirely; v4 listen avoids happy-eyeballs dual-stack connect storms. A Semaphore(64) still caps in-flight fetches so the OS socket layer never gets buried. Fixes LOBE-10086
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## canary #15547 +/- ##
===========================================
- Coverage 89.10% 70.56% -18.54%
===========================================
Files 898 3308 +2410
Lines 108660 326763 +218103
Branches 9680 34664 +24984
===========================================
+ Hits 96818 230580 +133762
- Misses 11659 96000 +84341
Partials 183 183
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The renderer's `<html lang>` was being computed from `?lng=` (injected by the main process at `loadURL` time) with `navigator.language` as fallback. On `Cmd+R` the webContents reload reuses the prior URL without rebuilding it against `storeManager.locale`, so users who changed their language after launch got dropped back to the OS locale on every reload (white screen, then English). Read the i18next localStorage cache first — that's the actual persisted user setting written by the language switcher — and fall back to the URL param + navigator as before.
Contributor
🚀 Desktop App Build Completed!Version: 📦 Release Download · 📥 Actions Artifacts Build Artifacts
Warning Note: This is a temporary build for testing purposes only. |
This was referenced Jun 9, 2026
Closed
Closed
Closed
Merged
arvinxx
added a commit
that referenced
this pull request
Jun 10, 2026
# 🚀 LobeHub Release (20260610) **Release Date:** June 10, 2026 **Since v2.2.2:** 131 merged PRs · 13 contributors > This weekly release strengthens agent collaboration across cloud, desktop, CLI, and workspace flows, with steadier runtime behavior and a broader foundation for workspace-scoped data. --- ## ✨ Highlights - **Agent execution across devices** — Unifies per-device working directories, project skill discovery, and sub-agent suspend/resume behavior across server, QStash, and device RPC flows. (#15543, #15566, #15481, #15620, #15591) - **Connector and sandbox platform** — Expands connector permissions, custom OAuth MCP connector onboarding, sandbox provider support, and user-uploaded file sync into cloud sandbox runs. (#15463, #15546, #15184, #15550) - **Desktop and CLI reliability** — Fixes desktop cold-start, auto-update, Windows build, CLI skill discovery, and `lh connect` agent dispatch paths. (#15547, #15525, #15527, #15562, #15632, #15634) - **Pages and sharing** — Refreshes topic sharing, improves Page Editor layout behavior, and routes Page Agent tool execution through the server-side editor path. (#15581, #15556, #15588, #15023, #15610) - **Model availability and provider updates** — Adds user-scoped LobeHub model availability, Claude Fable 5, Qwen thinking preservation, and MiniMax M3 updates. (#15590, #15639, #13494, #15376) --- ## 🏗️ Core Product & Architecture ### Agent Runtime & Heterogeneous Agents - Improves sub-agent lifecycle handling, including async suspend/resume, queue-mode QStash resume delivery, and blocking nested sub-agent calls. (#15481, #15620, #15575) - Stabilizes heterogeneous agent ingestion and streaming with raw stream dumps, per-turn usage, image forwarding on regenerate, and duplicate-text fixes. (#15602, #15577, #15592, #15585) - Adds execution-device and working-directory controls across device RPC, legacy defaults, and remote-spawned Claude Code sessions. (#15543, #15566, #15591, #15572) - Improves runtime diagnostics and compatibility, including Gemini multimodal output capture, abort stream semantics, and trace quality analysis. (#15535, #13677, #15508) --- ## 📱 Platforms, Integrations & UX ### Connectors, Sandbox & Tools - Ships API-level connector tool permissions, custom OAuth MCP connector onboarding, and connector-first runtime execution. (#15463, #15546) - Adds sandbox provider support, cloud sandbox file sync, and safer external URL file input handling with SSRF validation. (#15184, #15550, #12657) - Improves tool visibility and execution with pinned app-fixed tools, ANSI output rendering, gateway-tunneled MCP calls, and automatic headless tool runs. (#15509, #15516, #15469, #15492) ### Desktop, CLI & Web UX - Restores desktop startup and reload behavior, preserves IPC error causes, and keeps the tab bar new-tab action visible across routes. (#15547, #15597, #15638) - Fixes desktop update and build stability for browser quit guards, macOS update signing, and Windows Visual Studio detection. (#15525, #15527, #15562) - Shows the plan-limit upgrade UI on desktop builds. (#15628) - Adds the Agent Run delivery checker and fixes CLI device dispatch plus skill list/search output. (#15489, #15634, #15632) - Refreshes onboarding, auth source preservation, topic UI states, referral/Fable campaign copy, and chat-input control bar behavior. (#15629, #15544, #15573, #15614, #15616, #15617, #15622, #15643) --- ## 🔒 Security, Reliability & Rollout Notes - External URL file input now includes SSRF validation for safer Google file handling. (#12657) - Database workspace-scope migrations are part of this release; self-hosted operators should run the normal migration path before serving the updated app. (#15446, #15465, #15468, #15472) - The release branch was re-cut from `canary` and includes the latest `main` release-version commit so `v2.2.2` is the verified compare base. --- ## 👥 Contributors @ONLY-yours, @sxjeru, @hardy-one, @xujingli, @hezhijie0327, @Coooolfan, @arvinxx, @tjx666, @Innei, @rivertwilight, @rdmclin2, @cy948, @AmAzing129 **Full Changelog**: v2.2.2...release/weekly-20260610-recut-3
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.
💻 Change Type
🔗 Related Issue
Fixes LOBE-10086
Two desktop dev-mode bugs that surface together when running with a non-en-US UI language. Both regress from recent main-process changes (
#15304and the?lng=URL-injection pattern), and a fresh dev start withnavigator.language=zh-CNhits both.🔀 Description of Change
1. Cold-start renderer-resource burst exhausting the main-process net pool
#15304unified dev underapp://renderer/and routes every Vite asset through the main process. On cold start (~2.5k modules transforming) plus a non-default UI language (each i18n namespace fans out to its own HTTP request, ~50 at once), the Chromium main-processnetpool blew up withERR_INSUFFICIENT_RESOURCESand the renderer stayed white.Fix is a three-part combo (all three are necessary — see verification table):
ViteRendererFallback→globalThis.fetch(Node undici) instead of Electronnet.fetch. undici has a per-origin connection pool and queues excess work internally instead of failing withERR_INSUFFICIENT_RESOURCES.127.0.0.1(server.host+hmr.host). With Vite on::1only, undici's happy-eyeballs attempts dual-stack connects per request, which under bursts surfaces asETIMEDOUTfrominternalConnectMultiple. Single-stack listen eliminates those wasted attempts.Semaphore(64)capping in-flightfetchcalls. Even with undici, an unbounded burst of thousands of concurrent module fetches saturates the OS socket layer.2. UI language reverting to OS locale on Cmd+R / webContents.reload
The renderer's
<html lang>was computed from?lng=(injected by the main process atloadURLtime viastoreManager.locale) withnavigator.languageas fallback.webContents.reload()reuses the prior URL without rebuilding it, so users who changed their language after launch got dropped back to the OS locale on every reload — exactly the white-screen-into-English experience the cold-start fix was already setting up.Read the i18next localStorage cache (
i18nextLng) first — that's the actual persisted user setting, written by the language switcher every timechangeLanguageruns — then fall back to the URL param and navigator. Web isn't affected because cookies + SSR set<html lang>correctly there;app://can't persist cookies.🧪 How to Test
Cold-start bursts — locally verified with
navigator.language=en-GB:net.fetch+ Semaphore 64)Reload language persistence — set language to Chinese in Settings, then navigate to
app://renderer/(no?lng=query) to simulate a fresh reload that hasn't gone through main-process URL injection. After fix:htmlLang=zh-CN, body renders in Chinese.RendererProtocolManager.test.tsupdated tovi.stubGlobal('fetch', ...)— all 9 tests pass.