[Bug]: Local environment can't be turned back on once disabled (toggle hidden behind "No environment selected")
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #17359 来自 @ScottN-PV —— 已合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- desktop
调研方向
从 apps/web 中的 Connections 设置路由开始,找到 connections-environment 部分,然后追踪渲染“No environment selected”占位符和本地环境切换开关的分支。确保主环境 ID 为 null 时仍可操作该开关;当禁用本地环境不再隐藏用于重新启用它的控件时,即为完成。如果存在相关的 Connections 设置测试,请运行。
由索引模型根据 Issue 内容生成。
描述
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- In the desktop app, have at least one remote environment connected.
- Open Settings → Connections and turn off Local environment in the "This machine" card, then confirm.
- After the restart, go back to Settings → Connections to turn it back on.
Expected behavior
The "This machine" card still shows the Local environment switch, so the local environment can be turned back on.
Actual behavior
The "This machine" card shows only "No environment selected — Connect an environment to view its settings and access." The switch isn't rendered anywhere. Selecting or using a connected remote environment doesn't bring it back, and searching settings for "Local environment" opens the same empty card.
The chat empty state says "turn the local environment back on in Connections", but the UI gives no way to do that.
Cause (from the shipped client bundle): in the Connections settings route, the connections-environment section branches on the primary environment id. When it's null (which it always is while the local environment is disabled), it renders the "No environment selected" placeholder. The local environment toggle component (the one that calls window.desktopBridge.setLocalEnvironmentEnabled) is only rendered in the other branch, so it can't be reached once local is off.
Suggested fix: render the local environment toggle in the "No environment selected" branch too (or whenever desktopBridge.getLocalEnvironmentEnabled?.() === false).
Impact
Major degradation or frequent failure
Version or commit
0.0.46-nightly.20261007.2787
Environment
Desktop app (nightly), connected to one remote environment over Tailscale.
Workaround
Open DevTools in the desktop app and run:
await window.desktopBridge.setLocalEnvironmentEnabled(true)
The local backend restarts and the "This machine" card (with the switch) comes back.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 3 小时 39 分钟
- 30 天内合并 PR
- 301
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
pingdotgg/t3code#22819 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
相似的 Issue
-
Add: Pbs Kids未关闭check:passed streams:add
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 2 天内回复
-
maintanance
难度 2/5 1-3 小时 新手友好度 76/100
inmanta/web-console#7583 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
deltachat/deltachat-desktop#6881 · 1 条评论 ·
维护者通常 3 天内回复
-
[Bug Report][3.13.7] VDataTable with select-strategy="single" shows select-all checkbox in mobile mode可能已有人在做 @lazerg 今天认领。 未关闭S: triage
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
phivk/rubiks-lab#33 ·
维护者通常 1 天内回复