Skip to content

fix(renderer): keep Desktop-internal environments out of the connection list - #972

Merged
BytePioneer-AI merged 1 commit into
BytePioneer-AI:mainfrom
ump45nose:pr/settings-hide-desktop-envs
Nov 21, 2026
Merged

BytePioneer-AI merged 1 commit into
BytePioneer-AI:mainfrom
ump45nose:pr/settings-hide-desktop-envs

Conversation

@ump45nose

Copy link
Copy Markdown
Contributor

Summary

Settings → Connections builds its Host list from the Renderer's known Host IDs and only filters out durable. Codex Desktop also reports its own internal environments (IDs starting with env_e_) there, so they appeared as connection Hosts and Harness availability was probed for each one.

isListedConnectionHost now excludes durable and env_e_*, and is used for the three places that list or refresh connection Hosts. Request routing for those IDs is unchanged.

Related issues

N/A

Test plan

  • New renderer-binding-probe-host-catalog.test.ts case: env_e_ Hosts are left out of the connection list and refresh. On current main without the fix it fails; with the fix the file passes (29 tests). npx tsc -b passed.
  • This has run in my fork's Desktop builds since v0.21.0.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

Summary

Summary by CodeRabbit

  • Bug Fixes
    • 连接主机列表会排除 durable 和以 env_e_ 开头的主机;local、remote-mac 和 ssh:mac 等主机仍会显示。
    • 主机可用状态、连接快照和完整刷新现在采用一致的筛选规则。指定主机刷新时,仍仅跳过 durable。

新增 isListedConnectionHost,用于排除 durable 和以 env_e_ 开头的 Host。可用性状态初始化、连接快照和未指定 Host 的全量刷新均采用此筛选。

Changes: 连接 Host 过滤

Layer / File(s) Summary
筛选规则及应用
packages/renderer-extension/src/renderer-binding-probe.ts, packages/renderer-extension/test/renderer-binding-probe-host-catalog.test.ts
新增 isListedConnectionHost,并将其用于可用性状态初始化、连接快照和未指定 Host 的全量刷新。测试验证 local、remote-mac 和 ssh:mac 保留,durable 和 env_e_internal 排除。指定 Host 的刷新仍仅特别跳过 durable。

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related PRs

  • BytePioneer-AI/codex-host#758:同样涉及过滤 durable 和 remote-control:env_e_<id>,并覆盖 Connections 列表、Harness 探测和 known Hosts。

Suggested reviewers: bytepioneer-ai, mouzhi

Merge Risk: Low · up to 2ee31

Codex Desktop's internal environments no longer appear in Settings → Connections or in the list refresh. One possible side effect remains. If an internal environment ever becomes the active Host, it may still be probed once for the active Composer. This is likely intended behavior and has low impact.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed 标题描述了本次变更的主要目的:让 Codex Desktop 内部环境不再出现在 Settings → Connections 的连接列表中。变更摘要显示 isListedConnectionHost 排除 durable 和 env_e_ 前缀的 Host,并用于列表、刷新和初始化逻辑,与标题一致。标题长度为 76 个字符,略长,但仍清楚、具体。
Description check Passed 描述说明了问题背景(连接列表仅过滤 durable,Desktop 内部 env_e_ 环境被显示并被探测)、新增的 isListedConnectionHost 筛选逻辑及其使用位置、测试计划和 tsc 检查结果。这与变更摘要中的 packages/renderer-extension 改动和新增测试直接相关。
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments: 1

packages/renderer-extension/src/renderer-binding-probe.ts-2859-2859: 1

2859-2859: Minor · Functional Correctness · Heavy lift

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

避免全量刷新间接探测内部 Host

如果活动 Host 从 local 切换到 env_e_internal,且该 Host 有客户端,Line 2857 的 reconcileHarnessAvailabilityHost() 会在此筛选之前调用 refreshHarnessAvailabilityForHost。因此,未指定 Host 的列表刷新仍会探测该内部 Host。

请区分列表刷新和活动 Composer 所需的刷新,避免列表刷新触发这次探测,同时保留显式 Host 路由。

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 528f9db and 2ee3146.

Files selected for processing: 2

  • packages/renderer-extension/src/renderer-binding-probe.ts
  • packages/renderer-extension/test/renderer-binding-probe-host-catalog.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

Review details

Context from checks skipped due to timeout: 8

  • GitHub Check: CodeRabbit
  • GitHub Check: Static checks
  • GitHub Check: Check macos-26
  • GitHub Check: Web Host tests
  • GitHub Check: Check Linux ARM64
  • GitHub Check: Check windows-latest
  • GitHub Check: Check ubuntu-22.04
  • GitHub Check: Vitest
Additional context used

Code guidelines: 2

AGENTS.md — auto-discovered
CLAUDE.md — auto-discovered
Path-based instructions: 1

Source excerpt: `renderer-extension` must not import Node.js built-ins, Electron private APIs, or Harness SDKs.

CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/renderer-extension/src/renderer-binding-probe.ts
  • packages/renderer-extension/test/renderer-binding-probe-host-catalog.test.ts
Additional comments: 1

packages/renderer-extension/src/renderer-binding-probe.ts: 1

203-203: Functional Correctness

Comment rejected. The review assumes that a connected remote-control:env_e_... Host is a Desktop-internal environment. Desktop's routing and remote-session code treat remote-control: connections as connectable Hosts. Desktop excludes the remote-control:env_e_... ID from knownHostIds only when it is disconnected. A connected Remote Control connection is therefore not internal under the inspected Desktop contract, and the prefix check need not change.

ump45nose added a commit to ump45nose/codex-host that referenced this pull request Nov 20, 2026
Every manifest line is now a branch with only its own change, cut from v0.22.0 or from the one branch named in its comment. Drops lines upstream v0.22.0 already has (BytePioneer-AI#913-BytePioneer-AI#917), the covered replay-integration, shared-remote-threads-and-delegation (now thin BytePioneer-AI#970/BytePioneer-AI#971/BytePioneer-AI#972 lines), external-side-chat (now thin BytePioneer-AI#969), remote-ssh-share-local-data, the net-zero Claude Desktop entrypoint pair, and the user-instructions lines rejected upstream as BytePioneer-AI#741. rr-cache holds the recorded resolutions for merging the thin branches onto v0.22.0.

Signed-off-by: Vincent <[email protected]>
@BytePioneer-AI
BytePioneer-AI merged commit 1b2b34d into BytePioneer-AI:main Nov 21, 2026
4 of 8 checks passed
@BytePioneer-AI

Copy link
Copy Markdown
Owner

Merged, thanks @ump45nose! Cleanly extends the existing durable filter to Desktop-internal env_e_* environments across registration, listing, and batch refresh, with all 29 host-catalog tests passing.

ump45nose added a commit to ump45nose/codex-host that referenced this pull request Nov 27, 2026
Eleven manifest lines still carried fork copies of changes that upstream has
already released. Each one names a merged PR whose head commit is an ancestor
of v0.28.2, so the line only re-applies the pre-review copy of code that the
release tag already contains, and that duplication is what turns the manifest
replay into conflicts.

Removed lines and their merged PRs:

- thin/cursor-fast-selection (BytePioneer-AI#782)
- thin/delegation-inspect-fast-models (BytePioneer-AI#986)
- thin/delegation-catalog-parent (BytePioneer-AI#970)
- thin/settings-hide-desktop-envs (BytePioneer-AI#972)
- thin/settle-turns-after-session-fault (BytePioneer-AI#969)
- thin/external-thread-turn-recency (BytePioneer-AI#973)
- thin/claude-code-todo-tools (BytePioneer-AI#976)
- thin/reasoning-summary-parts (BytePioneer-AI#967)
- thin/shared-archived-thread-revival (BytePioneer-AI#988)
- fix/desktop-mcp-session-reap-v0.22 (BytePioneer-AI#981)
- fix/macos-descriptor-mode (BytePioneer-AI#1004)

For the two lines whose comments noted that the fork copy predated the PR's
review changes (BytePioneer-AI#969, BytePioneer-AI#976), the reviewed upstream version replaces it.

Checked with `scripts/vincent-release.sh audit` (ancestor and patch-cherry
checks) and by replaying the manifest onto v0.28.2 in a scratch worktree: these
eleven lines no longer merge, and the fifteen remaining lines are fork-only
changes that need re-cutting from the new tag.

Lines for fork-only additions are untouched: the extras documented for BytePioneer-AI#470,
BytePioneer-AI#987 and BytePioneer-AI#989 stay, and the lines for the closed PRs BytePioneer-AI#576, BytePioneer-AI#783, BytePioneer-AI#784, BytePioneer-AI#785 and
BytePioneer-AI#396 stay.
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.

2 participants