Skip to content

fix(hosts): keep project lists usable with SSH hosts - #5102

Merged
7Sageer merged 1 commit into
release/2026-11-19from
fix/release-1119-ssh-projects
Nov 19, 2026
Merged

7Sageer merged 1 commit into
release/2026-11-19from
fix/release-1119-ssh-projects

Conversation

@7Sageer

@7Sageer 7Sageer commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Requirement or Bug

桌面端和 Web 的本机项目侧栏在加载第一批旧会话后会提前停止翻页。启用 SSH 项目后,失联的主机也可能拖住聚合查询,直到客户端超时,连本机项目列表都显示为空。

Bug Reproduction Steps

  1. 打开一个至少有 11 条未归档且有消息的本机项目,在侧栏展开会话。第 6~10 条出现后,继续展开的入口消失。
  2. 连接一台 SSH 主机。让主机停止响应并在 SSH 连接判定断开前刷新页面,可以看到项目列表请求超时。

Root Cause

侧栏用 before_id 翻页,跨主机聚合用 next_page_token 判断来源是否还有数据。按会话 ID 分页的响应通过 has_more 表达这个事实,聚合层会丢掉该信号。

项目发现使用 30 秒的 SSH 请求时限,客户端的 30 秒时限更早开始。等待任一远端发现超时会让客户端错过已经查到的本机结果。

Code Changes

   单项目按会话 ID 分页
-  经过本机跨主机聚合,重新计算 has_more
+  由项目所在的主机返回该页的 has_more

   聚合项目列表和会话列表
-  远端项目发现沿用 30 秒的 SSH 请求时限
+  每台主机的项目发现最多等待 5 秒,超时后使用已返回的来源

app-core 将单项目的 ID 游标请求交给现有的主机路由。kap-server 在共享的项目发现入口设置时限,因此首屏并发的项目列表和会话列表都能在主机发现超时后继续处理。

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
侧栏加载本机项目的旧会话 第一次展开后可能停止 按项目所属主机返回的 has_more 继续翻页 使用桌面端或 Web 侧栏浏览项目历史的用户 原有侧栏入口
SSH 主机失联时加载聚合列表 远端项目发现可能耗尽客户端超时预算 单台主机项目发现 5 秒后按不可用处理,已响应来源仍参与聚合 桌面端、Web 和调用 hosts=include 的 KAP 客户端。超过 5 秒才响应的主机可能暂时缺席 可稍后刷新,也可通过现有主机代理单独查询

回归覆盖 before_id 和 after_id 的项目路由,以及一台 SSH 主机不响应时保留正常主机的项目和本机的会话分组。

验证记录
  • 新增 3 项回归用例均在修复前失败。
  • 在发布分支原基底 cab0c0e5ad 上,客户端、主机路由、KAP 主机聚合、SSH 传输和 API 快照共 186 项测试通过。测试使用模拟 SSH 传输。
  • 更新到发布基底 5be33daf1d 后,pnpm lint、KAP 类型检查和桌面端类型检查通过。

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue. 复现步骤见正文。
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 60ffb54

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@moonshot-ai/kap-server Patch
kimi-code-app Patch
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T10:26:19.512035Z 60ffb54 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@7Hanrui

7Hanrui commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@codex review

@pkg-pr-new

pkg-pr-new Bot commented Nov 19, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@60ffb54
npx https://pkg.pr.new/@moonshot-ai/kimi-code@60ffb54

commit: 60ffb54

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 60ffb544d2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7Sageer
7Sageer merged commit 0b73b62 into release/2026-11-19 Nov 19, 2026
18 checks passed
@7Sageer
7Sageer deleted the fix/release-1119-ssh-projects branch November 19, 2026 10:44
@github-actions github-actions Bot mentioned this pull request Nov 19, 2026
Grapedge added a commit that referenced this pull request Nov 23, 2026
* fix(core): add Claude 5 output token ceilings (#5096)

* fix(core): add Claude 5 output token ceilings

* chore: add Claude 5 output ceiling changeset

* fix(markdown): keep table actions inside clipped containers (#5098)

* fix(markdown): keep table actions inside clipped containers

* fix(markdown): observe table action clipping ancestors

---------

Co-authored-by: kimi-agent-bot <[email protected]>

* fix(hosts): keep project lists usable with SSH hosts (#5102)

* ci: release packages (#5094)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: preserve first prompt through project creation (#5161)

Co-authored-by: kimi-agent-bot <[email protected]>

* fix(agent-core-v2): align fork slicing with restored turn ids (#5165)

* fix(agent-core-v2): align fork slicing with restored turn ids

* chore: add restored fork fix changeset

* fix(core): prevent AJV diagnostics from polluting TUI input (#5168)

* refactor(core): route AJV logs through utils logger

* chore(core): add AJV logger changeset

* chore(core): clarify AJV logger changeset

* fix: support UUID generation in insecure browser contexts (#5173)

* fix: support UUID generation in insecure browser contexts

* chore: update pnpm deps hash

* fix: resolve crypto bindings in UUID lint rule

---------

Co-authored-by: kimi-agent-bot <[email protected]>

* fix(client): keep draft thinking effort after sending (#5170)

* fix(client): keep draft thinking effort after sending

* chore: add cli changeset for draft thinking fix

* test(client): use function stub for websocket in thinking test

* fix(client): preserve thinking effort during model normalization

* fix(client): reconcile profile updates and model fallbacks

* fix(client): scope draft thinking preservation

* fix(tui): defer queued prompts until the loop drains (#5166)

* fix(tui): defer queued prompts until the loop drains

- add core and v2 drained/idle lifecycle events
- consume reminder-only queues without starting a model turn
- gate TUI queue dispatch and completion notifications on lifecycle state
- document notification-handoff queue behavior and add a CLI patch changeset

* fix(tui): close loop lifecycle races

- emit idle only after the current macro is revalidated
- keep queued input pending through compaction and delayed dispatch
- reject stale idle after new work starts

* fix(loop): correlate lifecycle events by generation

- track macro generations in the core and v2 loop state
- replace TUI macro inference with event-generation correlation
- preserve compaction guards for queued dispatch

* fix(desktop): simplify multi-select folder picker actions (#5174)

* fix(kap-server): report :wait settled only after the session is on disk (#5176)

:wait settled as soon as the turn left the in-memory activity view, but
the engine writes wire records through a batched log that flushes in a
later task. A server killed right after :wait reported idle could lose
the end of the finished turn.

Before it replies with a settled session, :wait now flushes the wire of
every agent in the session and drains pending metadata writes. A failed
write surfaces as an error instead of a settled reply. The KAP guide
states the guarantee. A new test in sessions.test.ts slows down the disk
write of the turn end and checks that the record is on disk when :wait
returns.

(cherry picked from commit fc33c6d)

Co-authored-by: kai <[email protected]>

* ci: release packages (#5163)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(client): keep config-derived draft thinking effort after sending (#5191)

Co-authored-by: liruifengv <[email protected]>

* ci: release packages (#5192)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(kap-server): resume sessions with unavailable models (#5212)

* fix(kap-server): resume sessions with unavailable models

* fix: let users replace unavailable session models

* fix: scope unavailable model recovery state

---------

Co-authored-by: kimi-agent-bot <[email protected]>

* fix(plugins): detect MCP OAuth with targeted probes (#5197)

* fix(plugins): detect MCP OAuth with targeted probes

* fix(plugins): use the MCP inspect route

* fix(plugins): preserve OAuth requirements across inspection and disconnect

* fix(chat): show pending MCP browser authorization (#5246)

* fix(chat): show pending MCP browser authorization

* fix(chat): resolve MCP authorization lint findings

* fix(chat): preserve MCP authorization failure details

* fix(mcp): preserve cancellation during OAuth reconnect

* fix(desktop): cache feedback form per host and let reply reasons wrap (#5303)

* ci: release packages (#5232)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* test: port removed-model recovery coverage to testkit

* test: dedupe anthropic output ceiling cases

---------

Co-authored-by: Haozhe <[email protected]>
Co-authored-by: kimi-agent-bot <[email protected]>
Co-authored-by: 7Sageer <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: kimi-agent-bot <[email protected]>
Co-authored-by: liruifengv <[email protected]>
Co-authored-by: qer <[email protected]>
Co-authored-by: kai <[email protected]>
Co-authored-by: Luyu Cheng <[email protected]>
Co-authored-by: grapedge <[email protected]>
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