Repository navigation
fix(desktop): inherit login-shell Android SDK selection - #24623
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The desktop now honors login-shell Android SDK selections and refreshes the local device host's SDK environment when used. Existing inherited selections and discovery defaults are preserved, keeping the change limited to local tool selection. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main now forwards the login-shell environment to the backend as a ShellEnvironmentPatch, which only carries the fields its schema lists. Add ANDROID_HOME and ANDROID_SDK_ROOT so the hydrated SDK selection reaches the server's device tools. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dismissing prior approval to re-evaluate 35ff8e9
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
… later The desktop shell environment reaches the server after startup, but LocalDeviceHost resolved the Android SDK and copied the process environment once at construction. The hub, the agent-device daemon and emulator commands kept a standard-location SDK even after the login shell selected another one. Resolve the SDK and helper environment each time a helper starts or a command runs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dismissing prior approval to re-evaluate 364ca6d
EvidenceBuilt and ran both commits as real Electron desktop apps on Linux under headless-desktop. Every capture uses fresh isolated state, a 1280×900 window, and dark theme.
The base reports “Android not available — Android SDK was not found”; the head reports “Android available.” Stills were captured only after two screenshots 500 ms apart matched. Additional controls all displayed Android available:
For both preservation controls, the profile points ANDROID_HOME at an empty SDK directory, making an override observable as unavailable. Reproduction and seed driver · Synthetic observations Verified by gpt-6.1-sol through the Codex harness. Not shown:
|
合入上游 286 个提交。冲突 8 处: - apps/desktop/src/shell/DesktopShellEnvironment.ts:fork 的代理端点与绕过列表补全、上游 pingdotgg#24623 的 Android SDK 补全两段都保留,先代理后 Android SDK。 - apps/server/src/mcp/McpHttpServer.ts:layerTools 里 fork 的 layerPluginAgentTools 与上游的 layerMessageToolkit 都保留。 - apps/server/src/peer/RemoteDelegation.ts:服务对象两边字段合并(fork 的 checkout、finishedCheckout、place 与上游 pingdotgg#24475 的 runStatus)。 - apps/server/src/peer/RemoteDelegation.test.ts:makeLaptop 参数取上游的 beforeFollow(第 4 个,保持上游调用不变)再接 fork 的 load、descriptor,fork 唯一传这两个参数的调用补一个 undefined;层组合取上游的 ThreadManagement 包装,再接 fork 的 layerForwarding(代替 PeerForwarding.layer)。 - apps/server/src/provider/agentContextBudget.json:取上游 claude/codex 实测值,mcpToolListJsonBytes 按合并后实测 50432。 - apps/web/src/components/ChatMarkdown.tsx:上游 pingdotgg#36364 的 agentRoots 接在 fork 提到组件层的 otherProjectRoots 上。 - apps/web/src/components/DiffPanel.tsx:fork 的插件 reveal 与上游 pingdotgg#36606 的 trimEnd 都保留(trimEnd 只作用于回合差异的路径)。 - evals/mcp-tool-use/cases/orchestration.ndjson:两边新增的用例都保留。 更新说明(nightly 20261114.4682) 桌面 / 网页 - 智能体可以用主题色和 CSS 改 T3 Code 的外观(主题编辑器) - 新开的浏览器标签按默认缩放与外观打开;Agent 从链接打开的新标签不再抢走输入框焦点;鼠标前进后退留在浏览器标签内 - Agent 在 cd 进去的检出里引用的文件链接能打开对应文件;文件预览选区滚动后复制仍是所选行;回合差异超出大小上限时会说明不完整 - 删除定时任务前先确认;去掉常规的成功通知;运行中等待前台子代理时显示原因而不是「思考中」 - 修复:模型选择不再继承另一个模型的特性、重新创建的文件夹不再显示已删文件、清屏保留终端输入模式、粘贴的 URL 与路径保留下划线、Linux 中键点击空白处不再粘进输入框等 移动端(需更新商店版才有) - 线程列表的项目筛选先列最近活跃的项目;新线程从当前筛选的项目开始;已是项目的文件夹再次添加会直接打开 - 修复 iOS 引用块长按遮挡、Android 返回键、iPhone 上 HTML 预览内联播放视频等问题 服务端与 Agent - 停止的提供方线程可原生恢复;Codex 的 Stop 迟迟不完成时提供 Force stop;delegate_task 子任务以 Codex 子代理启动 - 新线程首轮启动更快;线程列表只为返回的这一页构建元数据;多处线程读取不再读全部历史 - T3 Connect 新设备需要批准;其他网站不能再嵌入网页版;提供方登录链接只打开网页地址 - Git:尊重跟踪分支配置的推送远端、轮次差异跟随分支切换、远端删掉的默认分支不再用于新建 worktree 线程;GitLab、Azure DevOps、Forgejo 多处修复 - 修复:网络挂载卡住时启动进程不再冻结服务端、btrfs 上数据库目录关闭写时复制、远端委派任务的跟随者出错后不再一直显示运行中、Claude 可完整展示轮次中途的文字、OpenCode/Cursor/Pi 多处用量与子代理问题等 Co-Authored-By: Claude Opus 5.5 <[email protected]>


A POSIX desktop app launched from the GUI could not find an Android SDK configured only in the login-shell profile. Read
ANDROID_HOMEandANDROID_SDK_ROOTduring the existing shell probe and carry them into the desktop environment before the backend starts.Treat the two names as one SDK selection: hydrate them only when neither is inherited. This prevents a shell
ANDROID_HOMEfrom overriding an inheritedANDROID_SDK_ROOT. Windows, WSL forwarding and standalone server startup are unchanged.Retains the fix by @thelonewander3r in #11648, with the pinned main revision merged and the original commits preserved.
Validation at c4c9ff1ee9:
DesktopShellEnvironmenttests pass. The original single added test is replaced by two behavioral cases covering normal hydration and inherited SDK selection; 22 existing tests remain unchanged.Independent Opus and Sol full-diff reviews found no code blockers after the SDK-precedence correction.
Current-head CI will run after this update; previous checks cover the original head only.
Implementation: Claude Fable 5.1. Test assessment and independent review: Claude Opus 5.5. Independent review and coordination: GPT-6.1 Sol, through Claude Code and Codex in T3 Code.
Takeover
Credits @thelonewander3r for #11648. Rebuilt on current main because the contribution is on a fork; the SDK group-precedence implementation is retained. Ported the two behavioral tests with distinct paths to catch swapped values. The validation above describes the original fork head; replacement validation follows.
Evidence
Linux x86_64, Electron 44.9.3 under
headless-desktop/Xvfb; GUI-likeenv -i, isolated HOME/T3 home per run,T3CODE_DEV_SEED=0. Synthetic SDK discovery only, no emulator launch.Fixture matrix, 44/44 runtime results, all scripts, manifests, filtered backend environments, stills and recordings. U=absent, E=empty, W=whitespace; h/r are profile roots, i/j inherited roots. Each linked tuple opens its real Electron still; raw tuples and selected-root sentinels are in the archive.
843f4e3529
e90cc01e4b
Before — profile-only SDK unavailable:
After — profile-only SDK discovered:
Verification log
vp test run apps/desktop/src/shell/DesktopShellEnvironment.test.ts, 12 existing → 14 passing. Removing the fix or capture names fails hydration; per-variable filling fails inherited-selection protection.Final merged-head verification
The historical 44/44 matrix and PASS2 replay above were captured at e90cc01e4b, with before shell source from 843f4e3529; those captures are not attributed to the merged head. Earlier PASS1 labeling at b6c944c9b8 differs only in tests.
Final local head 131173e0f4 merges the reviewed head with main 3eb836664e. Desktop/web/shared shell and local device source are unchanged; the complete patch against main remains byte-identical, two files and 47 additions.
Fresh web/backend/Electron rebuild at that exact final head passed, followed by real Electron A1-after and critical inherited-ROOT C3-after captures. A1 backend inherits (h,r) from profile; C3 retains (absent,j), selects j and does not fill HOME from profile. Both show SDK installed/no AVD; both still pairs are stable, recordings fully decode, focused tests pass 14/14, and cleanup reports no remaining recorded live PIDs. Historical C11-after empty final-tree caveat remains unchanged.
Final-head addendum — SUFFICIENT, new capture/log/script bundle. Synthetic Linux discovery only; Windows/macOS runtime and actual emulator boot remain unverified. No new code review or CI result is claimed by this addendum.